Documents
Send PDFs to document-understanding models
Send a PDF with your prompt to have a model summarize, answer questions about, or extract from it. Pass it as base64 or a URL in a document block; Gateway converts it to the served vendor’s format.
AI SDK file parts need merge-gateway-ai-sdk-provider 0.3.0 or later; earlier versions drop them silently.
Reference
Inline documents are capped at 20 MB decoded per request, all documents combined; URLs don’t count. Over the cap returns 413 payload_too_large, and a route without document input returns 400 unsupported_params. Filter by document input in the model catalog.