API Documentation
Multilingual OCR API
Extract text from images in multiple languages including Arabic, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Vietnamese
Overview
The Multilingual OCR API extracts text from image files supporting multiple languages including Arabic, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Vietnamese and more. It returns the recognized text in plain text format. It uses a unified JSON request format, accepting either URL references or base64-encoded image data.
Authentication
The API supports two authentication methods:
- API Key: Pass your API key as a query parameter
?key=YOUR_API_KEY
Extract Multilingual Text from Image
Extract text from an image file using multilingual OCR technology, supporting multiple language recognition.
Request
POST /api/multilingual-ocr
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
document | object | Yes | Document object |
document.type | string | Yes | Fixed value "image_url" |
document.image_url | string | Yes | Image URL or base64 data |
filename | string | No | Filename (recommended for base64 data) |
key | string | No | API key (query parameter, optional for logged-in users) |
Supported Languages:
- Arabic (العربية)
- French (Français)
- German (Deutsch)
- Italian (Italiano)
- Japanese (日本語)
- Korean (한국어)
- Portuguese (Português)
- Russian (Русский)
- Spanish (Español)
- Vietnamese (Tiếng Việt)
Examples:
Using Image URL:
curl -X POST "https://llmocr.com/api/multilingual-ocr?key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": {
"type": "image_url",
"image_url": "https://llmocr.com/image.jpg"
}
}'
Using Base64 Image Data:
curl -X POST "https://llmocr.com/api/multilingual-ocr?key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": {
"type": "image_url",
"image_url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA..."
},
"filename": "my-image.jpg"
}'
Response
Parameters:
Parameter | Type | Description |
---|---|---|
id | string | Database record ID |
filename | string | Filename |
content | string | Multilingual text content extracted from image (plain text format) |
format | string | Output format, fixed as "text" |
timestamp | number | Processing completion timestamp |
payload | string | API endpoint URL |
Example:
{
"id": "67891",
"filename": "foreign-text.jpg",
"content": "Bonjour! Comment allez-vous?\n\nこんにちは、元気ですか?\n\nHola, ¿cómo estás?\n\nGuten Tag! Wie geht es Ihnen?",
"format": "text",
"timestamp": 1640995200000,
"payload": "https://llmocr.com/api/multilingual-ocr?key=YOUR_API_KEY"
}