Parse File Bytes to Markdown
Converts raw text, source code, web/data, PDF, Microsoft Office, and image bytes into LLM-usable Markdown. The base request costs 1 credit. When OCR runs (requires ocr=true), the entire call costs 5 credits; ocr=true requests where no OCR ends up running still cost 1 credit.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Optional file extension hint. Case-insensitive; a leading dot is accepted (e.g. ".pdf").
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 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
Gates all OCR. When true, PDFs get embedded-image OCR (recognized text inserted at each image's position in page reading order, preserving the text layer; pdf.start/pdf.end limit the page range), scanned PDFs with no text layer get full-document OCR, and raster images get their visible text transcribed. When false, no OCR runs: scanned PDFs may yield no content and images return only format/dimension metadata. Calls where OCR actually runs cost 5 credits instead of 1.
PDF page-range controls. Use start/end to limit parsing (and OCR when ocr=true) to an inclusive 1-based page range.
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. Optional 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.
201 - 50["production", "team-alpha"]Body
Raw file bytes. The request body must not exceed 25 MiB.
The body is of type file.
Response
Successful response
Indicates success
true Input bytes converted to GitHub Flavored Markdown
Detected content type used for parsing
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 Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.