Skip to main content
The gateway extracts the text request-locally before the model sees it and keeps neither the file nor the text. Accepted: PDF, DOCX, PPTX, XLSX, XLS, plain text. Images go as an image part.

The file Part

file_id is rejected; there is no Files API. Scanned or image-only PDFs have no text to extract; send page images to a vision-capable model. Extraction runs in a bounded process, so very large documents can fail rather than return shortened text; split them first. The Responses facade accepts input_file parts; the Messages facade accepts document blocks. Audio and video parts are rejected.

Extract text without inference

Upload a multipart file to POST /api/v1/attachments/parse. The API returns extracted text, a model-independent token estimate, and the document type. No model ID is required; document parsing is billed separately.