Skip to main content
POST
/
predict-async
Predict Async
curl --request POST \
  --url https://{base_url}/predict-async \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-Key: <api-key>' \
  --form 'files=<string>' \
  --form 'template_id=<string>' \
  --form 'schema=<string>' \
  --form 'page_ranges=<string>' \
  --form 'password=<string>' \
  --form 'config=<string>' \
  --form force_url=true \
  --form 'webhook=<string>' \
  --form files.0='@example-file'
{
"id": "<string>",
"status": "IN_QUEUE"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

multipart/form-data

Request for asynchronous document extraction with webhook notification.

Content-Type: multipart/form-data

Important: Complex objects (schema, page_ranges, config, webhook) must be sent as JSON-stringified values in form fields.

files
required

Document source (file upload, URL, or file ID with id:// prefix)

template_id
string

Custom or predefined template ID (also accepts 'doctype' for backward compatibility)

schema
string

JSON-stringified extraction schema object. Example - '{"invoice_number":"string","total":"number"}'

page_ranges
string

JSON-stringified array of page range objects. Example - '[{"start":1,"end":5}]'

password
string

Password for encrypted PDF documents

config
string

JSON-stringified ConfigOverride object to override template settings. See ConfigOverride schema for available options.

force_url
enum<string>

Force URL output instead of inline JSON (send as string "true" or "false")

Available options:
true,
false
webhook
string

JSON-stringified WebhookConfig object. Example - '{"url":"https://example.com/webhook","metadata":{"order_id":"123"}}'

Response

Job queued for processing

id
string

Job identifier for status tracking

status
enum<string>

Initial job status

Available options:
IN_QUEUE,
IN_PROGRESS