API Documentation
Convert HEIC images programmatically with our free REST API
Overview
The HoneyConvert API allows you to convert HEIC and HEIF images to PNG, JPEG, or WebP format programmatically. The API is free to use, requires no authentication, and supports cross-origin requests (CORS).
Endpoint
Parameters
Send a multipart/form-data request with the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
File | Required | The HEIC or HEIF file to convert (max 100MB) |
format |
String | Optional | Output format: png, jpeg, or webp. Default: png |
size |
Integer | Optional | Size percentage: 100, 75, 50, or 25. Default: 100 |
quality |
Integer | Optional | JPEG/WebP quality: 1-100. Default: 90. Ignored for PNG. |
rotate |
Integer | Optional | Rotation degrees: 0, 90, 180, or 270. Default: 0 |
crop |
String | Optional | Aspect ratio: none, 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3. Default: none |
Code Examples
Basic Conversion
With Options
Square Crop
Using requests
With Options
Using fetch (Browser)
Using Node.js (with node-fetch and form-data)
Using cURL
Response
Success (200 OK)
On success, the API returns the converted image file directly with appropriate headers:
Headers
Content-Type: image/png(or jpeg, webp)Content-Disposition: attachment; filename="photo.png"X-HoneyConvert-Format: pngX-HoneyConvert-Size: 100
Error Responses
On error, the API returns a JSON response:
Error Codes
| HTTP Status | Code | Description |
|---|---|---|
| 400 | MISSING_FILE |
No file was provided in the request |
| 400 | EMPTY_FILE |
The file field was empty |
| 400 | INVALID_FILE_TYPE |
File is not a .heic or .heif file |
| 500 | CONVERSION_FAILED |
The file could not be converted (may be corrupted) |
| 500 | SERVER_ERROR |
An unexpected server error occurred |
Rate Limits
The API is free and does not currently enforce strict rate limits. However, we ask that you:
- Keep requests under 100 per minute per IP address
- Avoid automated bulk conversions of thousands of files
- Cache converted images on your end when possible
Excessive usage may result in temporary IP blocking. For high-volume needs, please contact us.
CORS Support
The API supports Cross-Origin Resource Sharing (CORS), allowing you to make requests directly from web browsers. All responses include:
Need Help?
If you have questions or need assistance integrating the API, please contact us. We're happy to help!
Try the Converter