API Documentation
Integrate file conversions into your application with our simple REST API. Convert documents, images, data formats, and more programmatically.
Quick Start
1. Get your API key from the dashboard
2. Make a POST request to convert files:
curl -X POST https://converter.am/api/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "type=pdf-to-markdown"Authentication
All API requests require authentication using a Bearer token in the Authorization header:
Authorization: Bearer cvt_your_api_key_hereKeep your API key secure. Never expose it in client-side code or public repositories.
Endpoints
POST
/api/v1/convertRequest Body (multipart/form-data)
| Parameter | Type | Description |
|---|---|---|
| file | File | The file to convert (max 10MB) |
| type | String | Conversion type (e.g., "pdf-to-markdown") |
Response
{
"success": true,
"conversion": "pdf-to-markdown",
"result": "# Converted content...",
"binary": false,
"usage": {
"current": 42,
"limit": 5000,
"remaining": 4958
}
}Supported Conversions
Documents
pdf-to-markdown
pdf-to-text
docx-to-markdown
docx-to-html
docx-to-text
html-to-markdown
html-to-text
markdown-to-html
Data Formats
json-to-yaml
yaml-to-json
json-to-csv
csv-to-json
json-to-xml
xml-to-json
csv-to-markdown
json-to-markdown
Images
png-to-jpg
png-to-webp
png-to-avif
jpg-to-png
jpg-to-webp
jpg-to-avif
webp-to-png
webp-to-jpg
Chess
pgn-to-png
pgn-to-jpg
pgn-to-gif
fen-to-png
fen-to-jpg
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
| UNAUTHORIZED | 401 | Missing or invalid Authorization header |
| INVALID_API_KEY | 401 | The provided API key is invalid |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests per minute |
| USAGE_LIMIT_EXCEEDED | 429 | Monthly usage limit reached |
| MISSING_FILE | 400 | No file was provided in the request |
| MISSING_TYPE | 400 | No conversion type specified |
| UNSUPPORTED_TYPE | 400 | The conversion type is not supported |
| FILE_TOO_LARGE | 400 | File exceeds the 10MB size limit |
Pricing
MOST POPULAR
Pro
$9/month
- 5,000 API calls/month
- All conversion types
- Priority support
- Higher rate limits
Business
$49/month
- 50,000 API calls/month
- All conversion types
- Priority support
- Highest rate limits
- Dedicated support
Code Examples
JavaScript / Node.js
const form = new FormData();
form.append('file', fs.createReadStream('document.pdf'));
form.append('type', 'pdf-to-markdown');
const response = await fetch('https://converter.am/api/v1/convert', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
body: form,
});
const result = await response.json();
console.log(result.result);Python
import requests
with open('document.pdf', 'rb') as f:
response = requests.post(
'https://converter.am/api/v1/convert',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
files={'file': f},
data={'type': 'pdf-to-markdown'}
)
result = response.json()
print(result['result'])cURL
curl -X POST https://converter.am/api/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@image.png" \
-F "type=png-to-jpg" \
| jq -r '.result' | base64 -d > output.jpgRate Limits
Rate limits are applied per API key. The following headers are included in every response:
| Header | Description |
|---|---|
| X-RateLimit-Remaining | Requests remaining in current minute |
| X-Usage-Current | Total requests this month |
| X-Usage-Limit | Monthly request limit for your tier |