file content part on chat completions, Responses, or Messages. The gateway extracts the text request-locally and keeps neither the file nor the text. Accepted: text, PDF, DOCX, PPTX, XLSX, XLS. See PDF and document input.
Related
Standalone document parsing
POST /api/v1/attachments/parse extracts text without calling a model. Authenticate with an API key or an OAuth bearer with cli:inference.
file field. Let your HTTP client set the multipart boundary. Do not send model, trust_tier, or parse_mode.
token_count estimates tokens as the extracted UTF-8 byte length divided by four, rounded up. It is independent of the model tokenizer. Accepted formats are text, PDF, DOCX, PPTX, XLSX, and XLS. Scanned PDFs without embedded text have no text to extract.
Each successful parse is billed as one document-parse unit. Funding and spend caps are checked before processing. The file and extracted text are request-local; the response uses Cache-Control: no-store. There is no stored file ID to reuse.
See the parse endpoint for the multipart schema and errors.
