API Reference
Base URL: https://api.jetweb.baduno.com
Authentication
All requests require an access token via header or body:
X-Access-Token: your-token-here
// or in request body:
access_token: your-token-here
POST /convert
Convert a single image to WebP or AVIF.
Request:
Content-Type: multipart/form-data
file: [image file] (required)
format: webp | avif (default: webp)
quality: 1-100 (default: 85 for webp, 80 for avif)
max_width: number (optional)
max_height: number (optional)
Response:
Content-Type: image/webp or image/avif
Response Headers:
X-Original-Size: 123456
X-Converted-Size: 45678
X-Savings: 63%
X-Processing-Time: 120ms
X-CDN-Image-ID: uuid
X-CDN-URL-WebP: https://cdn.jetweb.baduno.com/...
X-CDN-URL-AVIF: https://cdn.jetweb.baduno.com/...
POST /convert/batch
Convert up to 10 images in one request.
Request:
Content-Type: multipart/form-data
files: [image files] (max 10)
format: webp | avif
quality: 1-100
Response:
{
"success": true,
"results": [...],
"totalProcessed": 10,
"successCount": 10
}
GET /access-token/:token
Validate an access token and check usage limits.
Response:
{
"api_limit_usage": 150,
"api_limit_max": 10000,
"api_subscription_active": true,
"api_subscription_premium": true // true for Starter/Pro/Business, false for Free
}
Error Response (limit reached):
{
"error_message": "Monthly conversion limit exceeded",
"error_fatal_status": false,
"api_limit_usage": 500,
"api_limit_max": 500
}
GET /info
Get API information and supported formats.
GET /health
Health check endpoint.