v13

latestOpenAPI 3.1.02026-08-0777148834.4 KB
Parsing

Parse Bytes

Converts raw text, source code, web/data, PDF, Microsoft Office, and image bytes into LLM-usable Markdown.

post/parse

Query parameters

extension'txt' | 'text' | 'md' | 'markdown' | 'html' | 'htm' | 'xhtml' | 'xml' | 'rss' | 'atom' | 'csv' | 'tsv' | 'yaml' | 'yml' | 'py' | 'java' | 'js' | 'jsx' | 'mjs' | 'cjs' | 'json' | 'jsonl' | 'ndjson' | 'php' | 'sh' | 'bash' | 'zsh' | 'fish' | 'rb' | 'ts' | 'tsx' | 'rtf' | 'srt' | 'css' | 'scss' | 'less' | 'styl' | 'sass' | 'svg' | 'pdf' | 'docx' | 'doc' | 'xlsx' | 'xlsm' | 'xlsb' | 'xltx' | 'xltm' | 'xls' | 'pptx' | 'pptm' | 'ppsx' | 'ppsm' | 'potx' | 'potm' | 'ppt' | 'pps' | 'pot' | 'jpg' | 'jpeg' | 'jpe' | 'png' | 'gif' | 'bmp' | 'tiff' | 'tif' | 'webp' | 'ppm' | 'pbm' | 'pgm' | 'pnm'

Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.

Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.

boolean
OR
'true' | 'false'

Preserve hyperlinks in Markdown output

boolean
OR
'true' | 'false'

Include image references in Markdown output

boolean
OR
'true' | 'false'

Shorten base64-encoded image data in the Markdown output

boolean
OR
'true' | 'false'

Extract only the main content from HTML-like inputs

boolean
OR
'true' | 'false'

When true for PDF inputs, OCR the selected pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it. pdf.start/pdf.end limit the inclusive page range. Billed at 1 credit per page OCR actually recovered, on top of the base request cost. When false, no OCR runs.

startinteger

First 1-based PDF page to parse. When omitted, parsing starts at the first page.

endinteger

Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Must be greater than or equal to start when both are provided.

PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5}.

clientstring

Optional client identifier used for usage attribution.

Optional client identifier used for usage attribution.

zdr'enabled' | 'disabled'

Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.

Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Requires zero data retention to be enabled for your organization (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.

tagsstring[]

Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.

[
  "production",
  "team-alpha"
]

Response

Successful response

successtrue required

Indicates success

markdownstring required

Input bytes converted to GitHub Flavored Markdown

type'html' | 'xml' | 'json' | 'jsonl' | 'text' | 'csv' | 'tsv' | 'markdown' | 'yaml' | 'python' | 'java' | 'javascript' | 'php' | 'shell' | 'ruby' | 'typescript' | 'rtf' | 'srt' | 'css' | 'scss' | 'less' | 'stylus' | 'sass' | 'svg' | 'pdf' | 'docx' | 'doc' | 'xlsx' | 'xls' | 'pptx' | 'ppt' | 'jpg' | 'png' | 'gif' | 'bmp' | 'tiff' | 'webp' | 'ppm' | 'pbm' | 'pgm' | 'pnm' required

Detected content type used for parsing