Vercel has added extraction models to AI Gateway, starting with ScaleDown Extract-1, according to the release changelog. Extraction models locate specific details in provided content, such as an invoice number or contact names, and return them as separate fields that application code can consume directly. Vercel reports that teams can use the model to process invoices, contracts, and other records, and that extraction requests appear in AI Gateway logs and spend tracking.1
Confidence scores and offsets guide document review
In a document workflow, developers pass a PDF or image as a file part inside the state parameter and define target fields such as vendor, total, and line items, according to the changelog. Each key in fields produces a matching entry in result.answers, with value set to null when a field is not found. Extract-1 attaches confidence scores from 0 to 1 for matches, including individual list items, and for text input it can also return character offsets, which mark the start and end positions of a match in the source text.1
How it works
Pricing is $0.05 per million input tokens
According to the AI Gateway model directory, ScaleDown Extract-1 offers a 1M context window at an input price of $0.05 per 1M tokens, and usage is subject to ScaleDown's Terms and Privacy Policies. Vercel's extraction quickstart states that running an extraction job requires Node.js 22.18 or later, a team with available AI Gateway Credits, and an AI_GATEWAY_API_KEY environment variable exported in the shell.24
Only the AI SDK supports extraction requests
Vercel's extraction documentation states that extraction is not supported through the OpenAI-compatible or Anthropic-compatible endpoints, limiting access to the AI SDK. For scaledown/extract-1, supported field types are restricted to text and list with text items, while supported file inputs cover images and PDF files. When using an AI Gateway provider instance, developers specify the model through gateway.extractionModel('scaledown/extract-1').3
Try it
- Export your API key in the shell with
export AI_GATEWAY_API_KEY="your_ai_gateway_api_key".4 - Install the latest AI SDK by running
pnpm add ai@latest.4 - Create
index.mtsusingexperimental_extractwith modelscaledown/extract-1and your targetstateandfields.4 - Run
node index.mtsto execute the extraction and printresult.answers.4