Documentation Index
Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
POST /v3/universal-ai/async (async)
Model string pattern: ocr/ocr_async/{provider}[/{model}]
| Field | Type | Required | Description |
|---|
| file | file_input | Yes | PDF or image file ID from /v3/upload or direct file URL |
Output
| Field | Type | Required | Description |
|---|
| raw_text | string | Yes | |
| pages | array[object] | No | List of pages |
| lines | array[object] | No | List of lines |
| text | string | Yes | Text detected in the line |
| words | array[object] | No | List of words |
| text | string | Yes | Text detected in the word |
| bounding_box | object | Yes | Bounding boxes of the words in the word |
| left | float | Yes | Left coordinate of the bounding box |
| top | float | Yes | Top coordinate of the bounding box |
| width | float | Yes | Width of the bounding box |
| height | float | Yes | Height of the bounding box |
| confidence | float | Yes | Confidence score of the word |
| bounding_box | object | No | Bounding box of the line, can be None |
| left | float | Yes | Left coordinate of the bounding box |
| top | float | Yes | Top coordinate of the bounding box |
| width | float | Yes | Width of the bounding box |
| height | float | Yes | Height of the bounding box |
| confidence | float | Yes | Confidence of the line |
| number_of_pages | int | Yes | Number of pages in the document |
Available Providers
| Provider | Model String | Price |
|---|
| amazon | ocr/ocr_async/amazon | $1.5 per 1,000 pages |
| microsoft | ocr/ocr_async/microsoft | $10 per 1,000 pages |
| mistral | ocr/ocr_async/mistral | $1 per 1,000 pages |
Quick Start
This is an async feature. The initial response returns a job ID. Poll GET /v3/universal-ai/async/{job_id} until the job completes.
import requests
url = "https://api.edenai.run/v3/universal-ai/async"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"model": "ocr/ocr_async/amazon",
"input": {
"file": "YOUR_FILE_UUID_OR_URL"
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())