AI Gateway now supports extraction models
Vercel’s AI Gateway now supports extraction models that retrieve specific details from documents, starting with ScaleDown Extract-1 for text, images, and PDFs.
Vercel has integrated extraction models into AI Gateway, enabling developers to programmatically locate and extract specific details from provided content. The first model, ScaleDown Extract-1, processes text, images, and PDFs to return structured fields such as invoice numbers or contact names. This functionality is designed to automate data retrieval from documents like invoices and contracts, reducing manual review time.
To use extraction, developers must employ the AI SDK version 7.0.176 or later. The extraction process is initiated by calling experimental_extract with the model ID scaledown/extract-1. The system returns results in a structured format where each requested field appears in result.answers, with missing fields marked as null.
ScaleDown Extract-1 provides confidence scores between 0 and 1 for each extracted field, including individual list items, allowing users to assess the reliability of matches. For text inputs, the model also returns character offsets indicating the exact location of matches within the source material.
Extraction requests are logged in AI Gateway and included in spend tracking, ensuring transparency and accountability. Vercel provides a quickstart guide for setup and authentication, streamlining the integration process for developers.