Infer a reusable JSON Schema from a sample
infer_schemaGiven one sample document's text, propose a reusable JSON Schema for that document type. Use this when no built-in schema_id fits: infer a schema once, review it, then reuse it as schema on parse_document / parse_text across many documents for consistent output. Returns the JSON Schema plus a flat field list and an inferred doc_type. Costs 1 credit per successful call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | A single representative sample of the document type, as text. | |
| doc_type | No | Optional hint for what kind of document this is, e.g. "purchase order", "lab report". | |
| instructions | No | Optional guidance on which fields matter or how to shape the schema. |