llms.txt Content
# OYYI API
> Image processing, PDF document manipulation, and background removal API.
Base URL: `https://oyyi.xyz/api`
API Reference: [https://oyyi.xyz/docs](https://oyyi.xyz/docs)
## Authentication
All API endpoints require a Bearer token in the Authorization header. Generate API keys from the Developer Dashboard at `https://oyyi.xyz/dashboard`.
```
Authorization: Bearer oyyi_sk_live_<your_key>
```
Supported input formats: JPEG, PNG, WebP, GIF, TIFF (varies by endpoint).
## Rate Limits
Rate limits are enforced on an hourly sliding window:
| Tier | Limit |
|------|-------|
| Free | 20 requests/hour |
| Premium | 100 requests/hour |
Rate limit headers returned on every response: `X-RateLimit-Limit`, `X-RateLimit-Remaining`.
## File Size Limits
Maximum file size per request by tier:
| Tier | Limit |
|------|-------|
| Free | 10 MB |
| Premium | 100 MB |
Exceeding the limit returns a 413 Payload Too Large error.
## Error Codes
| Code | Description |
|------|-------------|
| 400 | Bad Request — `{ "error": "..." }` or Spring Boot error for PDF |
| 401 | Unauthorized — missing or invalid Bearer token |
| 429 | Rate Limited — exceeded hourly quota |
| 500 | Server Error — internal processing error |
## Image Processing API
61 endpoints for image manipulation, analysis, and generation.
**Endpoint:** `POST /api/image/{operation}`
**Request format:** `multipart/form-data` with a `file` field (the source image) and operation-specific parameters.
**Response format (default):** JSON with base64-encoded image data.
```json
{
"image": "<base64-encoded image data>",
"format": "JPEG",
"width": 800,
"height": 600,
"size": 12345
}
```
**Response format (binary):** Set `Accept: image/*` header to get raw image bytes directly (no base64, no JSON wrapper). Metadata returned in response headers:
| Header | Description |
|--------|-------------|
| `Content-Type` | MIME type of the output image |
| `X-Image-Format` | Image format name —