POST
/
parse
curl --request POST \
  --url https://api.contextual.ai/v1/parse \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form parse_mode=standard \
  --form 'page_range=<string>' \
  --form enable_split_tables=true \
  --form max_split_table_cells=123
{
  "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
raw_file
file
required

The file to be parsed. The file type must be PDF, DOC / DOCX, PPT / PPTX.

parse_mode
enum<string>

The settings to use for parsing. 'basic' is for simple, text-only documents. 'standard' is for complex documents with images, complex hierarchy, and/or no natively encoded textual data (e.g. for scanned documents).

Available options:
basic,
standard
page_range
string

Optional string representing page range to be parsed. Format: comma-separated indexes (0-based) e.g. '0,1,2,5,6' or ranges (inclusive of both ends) e.g. '0-2,5,6'

enable_split_tables
boolean

Controls whether tables are split into multiple tables by row with the headers propagated. Use for improving LLM comprehension of very large tables. Disabled in 'basic' parsing_mode.

max_split_table_cells
integer

Threshold number of table cells beyond which large tables are split if enable_split_tables is True. Disabled in 'basic' parsing_mode.

Response

200
application/json
Successful Response

/parse response object.

job_id
string
required

Unique ID of the parse job