Parse a document into structured JSON
parse_documentExtract clean, schema-guaranteed JSON from a PDF or image. Provide the document via url or base64. Pass an optional JSON schema to constrain the output shape, and instructions to guide extraction. Returns the extracted data plus a confidence score and a review_needed flag. Costs 1 credit per successful call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) URL of the PDF or image to parse. | |
| base64 | No | Base64-encoded document bytes (alternative to `url`). Provide `media_type` alongside it. | |
| redact | No | When true, PII (emails, SSNs, card numbers, phones, etc.) is masked in the output before it leaves the server. | |
| schema | No | Optional JSON Schema describing the exact output shape you want. When provided, the returned `data` conforms to it. | |
| schema_id | No | Optional named template to use instead of a hand-written schema, e.g. "invoice", "receipt", "resume". Call the list_schemas tool for the full set. Ignored when `schema` is provided. | |
| media_type | No | MIME type for `base64` input, e.g. application/pdf, image/png, image/jpeg. | |
| instructions | No | Optional natural-language guidance for what to extract. |