Parse Bytes
Changed onConverts raw text, source code, web/data, PDF, Microsoft Office, and image bytes into LLM-usable Markdown.
Request
- Base URLhttps://api.context.dev/v1
- URLhttps://api.context.dev/v1/parse
- AuthHTTP bearer
Query parameters
Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.
Preserve hyperlinks in Markdown output
Include image references in Markdown output
Shorten base64-encoded image data in the Markdown output
Extract only the main content from HTML-like inputs
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.
Optional client identifier used for usage attribution.
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.
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" ]
Request body application/octet-stream
Response
Successful response
Changes
- breaking
queryrequest parameterincludeImageslist-of-types was narrowed by removing typesstring - breaking
queryrequest parameterincludeLinkslist-of-types was narrowed by removing typesstring - breaking
queryrequest parameterocrlist-of-types was narrowed by removing typesstring - breaking
queryrequest parametershortenBase64Imageslist-of-types was narrowed by removing typesstring - breaking
queryrequest parameteruseMainContentOnlylist-of-types was narrowed by removing typesstring - breaking
for the
queryrequest parameterincludeImages, the type changed from no type toboolean - breaking
for the
queryrequest parameterincludeLinks, the type changed from no type toboolean - breaking
for the
queryrequest parameterocr, the type changed from no type toboolean - breaking
for the
queryrequest parametershortenBase64Images, the type changed from no type toboolean - breaking
for the
queryrequest parameteruseMainContentOnly, the type changed from no type toboolean
- breaking
- info
endpoint added
- info