API Documentation
Integrate our image conversion API into your applications. Free tier includes 1,000 requests per day.
Fast Response
Average response time under 100ms
Secure
HTTPS only, files auto-deleted
99.9% Uptime
Global CDN infrastructure
Quick Start
Authentication
No authentication required for up to 10 requests per day. For higher limits, include your API key in the header.
Authorization: Bearer YOUR_API_KEYPOST
/api/v1/convertConvert an image to a different format. Supports multipart/form-data or JSON with base64 encoded image.
Request Body
{
"image": "base64_encoded_image_data",
"format": "png",
"quality": 85,
"metadata": "keep"
}Response
{
"success": true,
"id": "conv_abc123",
"download_url": "/api/v1/download/conv_abc123",
"expires_at": "2024-01-01T12:00:00Z",
"original_size": 102400,
"converted_size": 85000
}Example (cURL)
curl -X POST https://jpgtopng.com/api/v1/convert \ -H "Content-Type: multipart/form-data" \ -F "image=@photo.jpg" \ -F "format=png"
GET
/api/v1/status/:idCheck the status of a conversion job.
Response
{
"id": "conv_abc123",
"status": "completed",
"progress": 100,
"download_url": "/api/v1/download/conv_abc123"
}GET
/api/v1/download/:idDownload the converted file. Links expire after 1 hour.
Response
Returns the converted image file as binary data.
Rate Limits
| Plan | Requests/Day | Max File Size |
|---|---|---|
| Anonymous | 10 | 10 MB |
| Free (with API key) | 1,000 | 50 MB |
| Pro | Unlimited | 500 MB |
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid request parameters |
| 401 | Invalid or missing API key |
| 413 | File size exceeds limit |
| 429 | Rate limit exceeded |
| 500 | Server error during conversion |