Parse API Changes
The/v2/parse response is now one tree instead of two, and the values inside it changed:
-
Grounding is inline on each block. The top-level
groundingfield is removed. Every node instructurebelow the root now carries its own self-containedgroundingobject with the node’s page, Markdown range, and bounding box. Walk one tree instead of two, or flatten it into a map by blockid. See Grounding. Before:After: -
Spans are now ranges. The
spanarrays ([start, end]) are replaced byrangeobjects ({"start": n, "end": n}), still[start, end)offsets into the top-levelmarkdownstring in Unicode code points. The newmetadata.range_unitsfield declares the units ("unicode_codepoints"). -
Bounding boxes are normalized. Boxes change from integer-pixel arrays (
[left, top, right, bottom]) to objects ({"xmin": n, "ymin": n, "xmax": n, "ymax": n}) in normalized page coordinates: fractions of the page’s width and height from 0 to 1, with at most 8 decimal places. Thedpirequest option and the pagewidth,height, anddpiresponse fields are removed; to convert a box to pixels, multiply by the dimensions of whatever rendering of the page you draw on. See Working with Boxes. -
Page numbers are 1-indexed. Page 1 is the document’s first page, everywhere: in each node’s
grounding.page, inmetadata.failed_pages, and in theoptions.pagesrequest selector, where0now returns HTTP 422. Tablerowandcolpositions stay 0-indexed. -
The
partsarray is nowatomic_grounding. Each entry has the same{page, range, box}shape as a block’s owngrounding. The field appears only on leaf blocks (every type excepttable), and thegrounding.partsrequest option is replaced byatomic_grounding. See Atomic Grounding. -
Block ids are semantic. Ids follow the format
<type>-<index>, with a per-type counter in reading order:text-0is the document’s first text block andtable_cell-3is the fourth cell of its first table. Ids are stable within a response but not across re-parses. -
The
blocks.<type>.captionoption is renamed toblocks.<type>.markdown. Same behavior, new name. Requests that send an unknown or legacy option key (dpi,grounding,blocks.<type>.caption) return HTTP 422. -
New
inline_markdownoption. Setoptions.inline_markdowntotrueto have every structure node (document, page, block, and table cell) carry its ownmarkdownslice, so you don’t have to slice the top-level string by range. See Request Options. -
The
passwordfield moved intooptions. Password-protected files remain unsupported; providingoptions.passwordreturns HTTP 422. -
Metadata renames and additions. The
markdown_charsfield is renamed tooutput_markdown_chars, and the newrange_unitsandopenapi_specfields declare the range units and the spec URL. See Metadata. - Rotated images are parsed upright. Images with EXIF orientation metadata (such as phone photos) are now normalized before parsing, so bounding boxes align with the image as a viewer sees it. Previously, boxes for rotated images were computed in the unrotated frame and appeared misaligned.
Extract API Changes
The/v2/extract response follows the same conventions:
-
Spans are now ranges. In
extraction_metadata, each field’sspansarray of[start, end]pairs is replaced by arangesarray of{"start": n, "end": n}objects. See Extract API Response. Before:After: -
The
versionmetadata field is renamed tomodel_version. Themetadata.doc_idfield is unchanged. -
New
range_unitsandopenapi_specmetadata fields. Same meaning as on the Parse response. -
Billing is verifiable from the response. Credit consumption for input is now based on exactly the Markdown you submit, and
metadataaddsinput_markdown_charsandoutput_extraction_chars, the input and output bases of the charge. See Credit Consumption. -
The
credit_usagemetadata field is removed. Credits are reported once, inmetadata.billing.total_credits, matching the Parse response. -
Extract Jobs can save output to your storage. Pass
output_save_urlwhen creating a job to have the result delivered to a presigned URL; the poll response then reportsoutput_urlinstead ofresult. See Save Extraction Output to a URL. -
Extract reports partial success. The response carries new
warningsandschema_violation_errorfields, and a synchronous request returns HTTP 206 instead of 200 when either is set (job polls stay 200, with the signals insideresult). See Status 206.
Jobs and Job ID Changes
- The Parse Jobs poll response uses the same envelope as Extract Jobs. On
GET /v2/parse/jobs/{job_id}, thedatafield is renamed toresult, andfailure_reasonis replaced by anerrorobject with acodeandmessage. Timestamps are ISO-8601 strings (previously Unix seconds), acompleted_attimestamp is added, and the top-levelversionandmetadatafields are removed (the result’s metadata lives insideresult). Thecancelledstatus is retired. See Parse Asynchronously. - The create response reports the job’s status. Creating a job (
POST /v2/parse/jobsorPOST /v2/extract/jobs) returnsjob_id,status, andcreated_at. The status is normallypending, but a job that finishes very quickly can already report a terminal status. - The list endpoint is paginated. On
GET /v2/parse/jobs, each row now reportscompleted_atandmodel_version, and the response pages withpage,page_size, andhas_more. Filter with thestatusquery parameter. - Job ids have one format across the v2 APIs. New job ids follow
<service>-<id>(for example,parse-01k04g2b8xv9q3m5n7r2sd4tfe), and the same id appears on the synchronous response, the job-create response, and every poll. Treat ids as opaque strings; existing ids remain valid.
One Error Format
Errors across the v2 APIs now share one shape and one validation status code:- Every error body is
{"code": "...", "message": "..."}. Thecodeis a stable snake_case identifier (for example,validation_error,unknown_model_version,invalid_url,invalid_api_key,rate_limit_exceeded); themessageis human-readable. This replaces the previousdetailstrings and validation arrays, and matches theerrorobject on failed async jobs. - Request-validation failures return 422. Unknown model versions and invalid URLs previously returned 400; they now return 422 like every other validation failure.
- Unknown request options return 422. Option keys the API does not recognize are rejected instead of ignored, including the retired legacy parse options (
dpi,grounding,blocks.<type>.caption).