Options
Updated
Shape#
options is a JSON-encoded string sent as a form field — not nested multipart data:
-F 'options={"model":"invoice","store_db":true}'
Malformed JSON returns 400 invalid_options.
Accepted keys#
| Key | Type | Default | Description |
|---|---|---|---|
model | string | — | Prompt template name (document type) |
document_type | string | invoice | Synonym for model; either works |
store_db | boolean | false | Store the result server-side |
Any other key is ignored.
document_type defaults to invoice#
model and document_type and the server assumes invoice. A
passport sent without a type is extracted as though it were an invoice: you get a
successful 200, plausible-looking output, and a wasted credit.Always set the type explicitly. Values are lowercased and trimmed server-side.
store_db#
Defaults to false — results are not retained server-side unless you ask for it.
{"model":"invoice","store_db":true}
Set it to true and the result is stored and the response carries an extraction_id you can reference later. Leave it off and no extraction_id is returned, because there is nothing to reference.
Per-chunk options on multi-page documents#
process takes the same options object, and the model is chosen per chunk — the split itself is model-independent.
mixed_models warning on collect, and the combined result may be inconsistent. Use the
same model for every chunk unless you have a specific reason not to.The form field must be named exactly options; anything else returns 400 invalid_options naming the fields it did receive.
Unknown models#
An unrecognised template name returns 400 unknown_model. Call models to see what your key may use — it costs no credits.
Something wrong or missing on this page? Tell us.