OptionalenableWhen true, includes citation metadata locating each extracted value in the source. Depending on the type of input, citations can be one of two types:
For raw text (STRING) inputs, a citation is a span of text in the original input. Each object in metadata.citations has an id (integer matching a citation_ids entry on a field), a start (inclusive 0-based character offset into the input string), and a stop (exclusive 0-based character offset into the input string).
For PDF documents and images (when using ai_extract downstream of ai_parse_document), a citation is a bounding box in the original input. Each object in metadata.citations has an id (integer matching a citation_ids entry on a field) and a bbox (array of {coord, page_id} objects, identical in shape to element.bbox in ai_parse_document output; coord is pixel coordinates on the page image as [x0, y0, x1, y1], and page_id is a 0-based page index).
OptionalenableWhen true, includes a per-field confidence score in the response.
OptionalinstructionsNatural-language guidance that steers how data is extracted (up to 20,000 characters).
OptionalmodeExtraction mode. Supported modes: "precision" — more powerful extraction for complex schemas, long documents, and reasoning-heavy extractions. Defaults to none (standard extraction).
OptionalversionThe function version to invoke. Defaults to the latest version. Supported versions: ["2.1"].
ai_extract