Turn messy text or a web page into JSON that matches your schema.
extract_data
aiAI
~30–60 neurons per call with the `fast` model.
Two ways to say what you want:
fields — a list of names, optionally annotated: ["title", "price:number", "inStock:boolean", "tags:array"].schema — a full JSON Schema object, when you need nesting or descriptions.The model is constrained to JSON output and the result is validated before it is returned, so you either get
conforming data or an invalid_input error — never half-parsed prose.
For pages with a stable DOM, scrape is cheaper and more repeatable. Use this one when the layout varies or the value you want is buried in prose.
| Parameter | Type | Default | Description |
|---|---|---|---|
| text | string | — | Source content. |
| url | string | — | Fetch this page and extract from it. |
| fields | string[] | — | Shorthand field list. Annotate types with name:type — string (default), number, boolean, array. |
| schema | object | — | Full JSON Schema for the desired object. Overrides fields. |
| instructions | string | — | Extra guidance, e.g. "prices in USD, dates as ISO 8601". |
| model | `fast` | `balanced` | `quality` | "fast" |
Quality/cost tier. fast uses an 8B model (~30 neurons/call), quality a 70B model (~10× the neurons). |
`data` is the extracted object.
| Parameter | Type | Default | Description |
|---|---|---|---|
| data | object | — | Extracted values. |
| model | string | — | Model used. |
| schemaUsed | object | — | The JSON Schema that was enforced. |