POST
/
v1
/
async
/
submit
/
document
/
partition
curl --request POST \
  --url https://api.aryn.cloud/v1/async/submit/document/partition \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'options={
  "selected_pages": [
    123
  ],
  "extract_images": true,
  "extract_table_structure": true,
  "use_ocr": true,
  "ocr_images": true,
  "ocr_language": "abaza",
  "threshold": "auto",
  "chunking_options": {
    "strategy": "context_rich",
    "tokenizer": "openai_tokenizer",
    "tokenizer_options": {},
    "max_tokens": 123,
    "merge_across_pages": true
  },
  "output_label_options": {
    "title_candidate_elements": [
      "<string>"
    ],
    "promote_title": true,
    "orientation_correction": true
  },
  "output_format": "json"
}'
{
  "task_id": "aryn:t-47gpd3604e5tz79z1jro5fc"
}

This is the Aryn DocParse API for submitting a document to be partitioned (and optionally chunked) asynchronously. Use the async partition result API to poll the asynchronous partitioning job and get its result when it’s done.

This takes all the same parameters as the synchronous partitioning endpoint and in addition accepts a webhook url in the optional header X-Aryn-Webhook. When the task stops running, Aryn will POST to the provided webhook url with a body like the one below:

{
  "done": [
    {
      "task_id": "aryn:t-47gpd3604e5tz79z1jro5fc"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

User-Agent
string | null
X-Aryn-Webhook
string

Body

multipart/form-data
file
file
required
options
object

Response

202
application/json
Successful Response
task_id
string

The ID of the async task.