API Documentation
The Image Conversion API provides powerful image processing capabilities through a simple REST interface. Convert between all common formats, process batches, and track usage with our developer-friendly API.
Key Features
- All common image formats
- Batch processing
- Faster & more reliable
- Real-time usage tracking
- 99.9% uptime guarantee
- Comprehensive error handling
Downloads & Resources
OpenAPI Specification
Machine-readable API specification in OpenAPI 3.0 format.
Download OpenAPI YAMLPostman Collection
Ready-to-use Postman collection with all endpoints and examples.
Authentication
The API uses Bearer token authentication. First, obtain a token by authenticating with your account credentials, then include it in the Authorization header for all subsequent requests.
Base URL
https://imageconvert.cloud/api
Rate Limiting
Login endpoint: 10 requests per minute
Protected endpoints: 60 requests per minute
API Endpoints
POST /login
Authenticate with your account credentials to receive an API token.
Request
{
"email": "user@example.com",
"password": "your_password"
}
Response (200 OK)
{
"message": "Authentication successful",
"token": "1|abc123def456...",
"user": {
"id": 1,
"email": "user@example.com",
"account_level": "free",
"email_verified_at": "2024-01-01T00:00:00.000000Z"
}
}
cURL Example
curl -X POST https://imageconvert.cloud/api/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "your_password"
}'
POST /convert
Convert single images or batches up to 10 files. Supports all major image formats including modern formats like WEBP, AVIF, and HEIC.
Authentication Required
This endpoint requires a Bearer token in the Authorization header.
Single File Request
file: (binary file data)
target_format: webp
Batch Request
files[]: (binary file 1)
files[]: (binary file 2)
files[]: (binary file 3)
target_format: png
Supported Formats
All Supported Formats
Response (200 OK)
{
"success": true,
"message": "Image converted successfully",
"data": "data:image/webp;base64,UklGRk...",
"content_type": "image/webp",
"filename": "converted.webp",
"conversion_info": {
"limit": 20,
"count": 1,
"remaining": 19
}
}
cURL Examples
curl -X POST https://imageconvert.cloud/api/convert \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-F "file=@image.jpg" \
-F "target_format=webp"
curl -X POST https://imageconvert.cloud/api/convert \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-F "files[]=@image1.jpg" \
-F "files[]=@image2.png" \
-F "files[]=@image3.gif" \
-F "target_format=webp"
GET /profile
Retrieve user profile information, account details, and usage statistics.
Authentication Required
This endpoint requires a Bearer token in the Authorization header.
Response (200 OK)
{
"user": {
"id": 1,
"email": "user@example.com",
"account_level": "free",
"created_at": "2024-01-01T00:00:00.000000Z"
},
"account_info": {
"name": "Free",
"conversions_per_day": 20,
"max_file_size": "10MB",
"batch_support": true,
"max_batch_size": 10
},
"usage": {
"conversions_this_month": 5,
"conversions_remaining": 15,
"monthly_limit": 20,
"usage_percentage": 25.0
},
"statistics": {
"last_12_months": [25, 18, 32, 45, 28, 39, 22, 33, 41, 29, 35, 42],
"total_last_12_months": 389
}
}
cURL Example
curl -X GET https://imageconvert.cloud/api/profile \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
Error Handling
The API uses standard HTTP status codes and returns detailed error information in JSON format.
Common Error Responses
Status Code | Description | Common Causes |
---|---|---|
400 |
Bad Request | Invalid file format, missing parameters |
401 |
Unauthorized | Invalid or missing API token |
413 |
Payload Too Large | File exceeds maximum size limit |
422 |
Unprocessable Entity | Invalid credentials, validation errors |
429 |
Too Many Requests | Rate limit or monthly limit exceeded |
Rate Limits & Account Tiers
Account Level | Monthly Conversions | Max File Size | API Access |
---|---|---|---|
Free | 200/month | 10MB | No |
Plus | 2000/month | 50MB | No |
Pro | 10000/month | unlimited | Yes |
Enterprise | 50000/month | unlimited | Yes |
Rate Limiting
- Login endpoint: 10 requests per minute
- Protected endpoints: 60 requests per minute
- Monthly limits reset at the beginning of each month UTC
Need Help?
Having trouble integrating our API? Contact our support team for assistance.