· AI dev tools
AI Gateway supports extraction models, ScaleDown Extract-1 available via AI SDK
The first available extraction model, ScaleDown Extract-1, now allows developers to pull out specific pieces of data like contact names or invoice numbers from documents you supply, delivering them…
The first available extraction model, ScaleDown Extract-1, now allows developers to pull out specific pieces of data like contact names or invoice numbers from documents you supply, delivering them back as distinct fields ready for your codebase.
These extraction models have been integrated into AI Gateway, enabling them to locate particular details within the content you furnish and format them into separate fields that your programming can utilize. ScaleDown Extract-1 is the initial model made available for this functionality. It is capable of pulling out either single text values or multiple lists of text values from various sources, including text documents, images, and PDFs, making it useful for handling things like contracts and invoices.
Currently, developers can access this extraction capability exclusively through the AI SDK. If you are using version ai@7.0.176 or a more recent release, you should utilize the `experimental_extract` function along with the model identifier `scaledown/extract-1`.
When using this model, every key within the fields will have a corresponding entry in `result.answers`; should a particular field not be located, its value will be null. Furthermore, Extract-1 provides confidence scores ranging from 0 to 1 for its matches, even for individual items within a list, which allows you to easily flag results that might need human verification. When the input is plain text, the model can additionally furnish character offsets, indicating precisely where a match was found. For processing files such as PDFs or images, you must pass them into the state as a file part. All requests made for extraction will be recorded in the AI Gateway logs and tracked for spending. For guidance on initial setup and authentication, consult the extraction quickstart guide.
Why it matters
This new capability allows developers to automate data extraction from unstructured documents like invoices and contracts directly within their code. Utilizing confidence scores and character offsets provides tools for building more robust and verifiable data processing pipelines.



