Skip to main content

Endpoint

POST /v3/universal-ai/async (async) Model string pattern: ocr/ocr_tables_async/{provider}[/{model}]

Input

FieldTypeRequiredDescription
filefile_inputYesPDF or image file ID from /v3/upload or direct file URL

Output

FieldTypeRequiredDescription
pagesarray[object]No
    tablesarray[object]No
        rowsarray[object]No
            cellsarray[object]No
                textstringYes
                row_indexintYes
                col_indexintYes
                row_spanintYes
                col_spanintYes
                confidencefloatYes
                bounding_boxobjectYes
                    leftfloatYes
                    topfloatYes
                    widthfloatYes
                    heightfloatYes
                is_headerboolNo
        num_rowsintYes
        num_colsintYes
num_pagesintYes

Available Providers

ProviderModel StringPrice
amazonocr/ocr_tables_async/amazon$15 per 1,000 pages
googleocr/ocr_tables_async/google$65 per 1,000 pages
microsoftocr/ocr_tables_async/microsoft$10 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_tables_async/amazon",
    "input": {
        "file": "YOUR_FILE_UUID_OR_URL"
    }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())