POST
/
v1
/
document
/
partition
curl --request POST \
  --url https://api.aryn.cloud/v1/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"
}'
{
  "status": [
    "<string>"
  ],
  "status_code": 123,
  "error": "<string>",
  "elements": [
    {
      "type": "<string>",
      "bbox": [
        123
      ],
      "properties": {},
      "text_representation": "<string>"
    }
  ],
  "markdown": "<string>"
}

This is the Aryn DocParse API for partitioning (and optionally chunking) a document synchronously.

Authorizations

Authorization
string
header
required

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

Headers

User-Agent
string | null

Body

multipart/form-data
file
file
required
options
object

Response

200
application/json
Successful Response
status
string[]
required
status_code
integer
required
elements
object[] | null
required
markdown
string | null
required
error
string | null

The error message if the partitioning is not successful.