Convert API Documentation
Document processing, OCR, and audio transcription API for extracting text from PDFs, images, documents, and audio files in 60+ languages.
https://api.ainoflow.ioAuthorization: Bearer your_api_key_hereInput Formats
Images (OCR): PDF, JPEG, PNG, TIFF, BMP, WebP, GIF
Documents: Word (.doc, .docx), RTF, ODT, TXT
Spreadsheets: Excel (.xls, .xlsx), ODS
Presentations: PowerPoint (.ppt, .pptx), ODP
Audio: WAV, MP3, M4A, MP4, WebM, OGG, FLAC, AAC, Opus
Output Formats
text - Plain text extraction or transcription
pdf - Searchable PDF with OCR layer
Main Endpoints
/api/v1/convert/submit-fileRequest Body (multipart/form-data):
file languages outputs models ocr webhookUrl reference jobExpiryInMinutes response Response:
{
"id": "uuid",
"status": "processing", // created, accepted, processing, completed, failed, cancelled
"reference": "doc123", // Your reference ID
"models": "auto", // Processing model used
"processingTimeInSeconds": 0.5,
"responseMode": "polling", // How results are returned
"content": [{ // Optional - Direct mode only
"text": "string",
"pdf": "string"
}],
"files": [{ // Optional - Persisted mode only
"models": "tesseract",
"text": {
"url": "https://...",
"expiration": "2024-01-16T10:30:05Z"
},
"pdf": {
"url": "https://...",
"expiration": "2024-01-16T10:30:05Z"
}
}],
"error": { // Optional - If processing failed
"message": "string"
}
}/api/v1/convert/submit-base64Request Body (application/json):
documentBase64 filename languages outputs models response Example:
{
"documentBase64": "JVBERi0xLjQK...",
"filename": "document.pdf",
"languages": "en,de",
"outputs": "text,pdf"
}/api/v1/convert/submit-urlRequest Body (application/json):
sourceUrl languages outputs models response Example:
{
"sourceUrl": "https://example.com/document.pdf",
"languages": "en,de",
"outputs": "text,pdf"
}/api/v1/convert/jobs/{jobId}Path Parameters:
jobId Response:
{
"id": "uuid",
"status": "completed", // created, accepted, processing, completed, failed, cancelled
"reference": "doc123", // Your reference ID
"models": "tesseract", // Model used
"responseMode": "polling",
"createdAt": "2024-01-15T10:30:00Z",
"startedAt": "2024-01-15T10:30:01Z", // When processing started
"completedAt": "2024-01-15T10:30:05Z",
"expiryAt": "2024-01-16T10:30:00Z", // When job expires
"processingTimeInSeconds": 5.2,
"content": [{ // Optional - Direct mode only
"text": "string",
"pdf": "string"
}],
"files": [{ // Download URLs for results
"models": "tesseract", // Models used
"text": {
"url": "https://...",
"expiration": "2024-01-16T10:30:05Z"
},
"pdf": {
"url": "https://...",
"expiration": "2024-01-16T10:30:05Z"
}
}]
}Example Usage
Submit File (Multipart)
curl -X POST https://api.ainoflow.io/api/v1/convert/submit-file \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf" \ -F "languages=en,de" \ -F "outputs=text,pdf" \ -F "response=polling"
Submit Base64
curl -X POST https://api.ainoflow.io/api/v1/convert/submit-base64 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"documentBase64": "JVBERi0xLjQK...",
"filename": "document.pdf",
"languages": "en,de",
"outputs": "text"
}'Submit URL
curl -X POST https://api.ainoflow.io/api/v1/convert/submit-url \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceUrl": "https://example.com/document.pdf",
"languages": "en,de",
"outputs": "text,pdf"
}'Transcribe Audio File
curl -X POST https://api.ainoflow.io/api/v1/convert/submit-url \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceUrl": "https://example.com/meeting.mp3",
"languages": "en",
"outputs": "text"
}'Check Job Status
curl https://api.ainoflow.io/api/v1/convert/jobs/{jobId} \
-H "Authorization: Bearer YOUR_API_KEY"Common Error Codes
Additional Features
Language codes (comma-separated): en, de, fr, es, it, pt, ru, pl, uk, cs, and many more.
Examples: en (English), de (German), fr (French), es (Spanish), ru (Russian), zh-cn (Chinese Simplified), ar (Arabic), ja (Japanese)
Set response: "webhook" and provide webhookUrl to receive POST notifications.
Webhook payload contains the complete job status with download URLs, identical to the GET /jobs/{jobId} response.