file part to a chat message to parse and run inference together. For text extraction alone, upload a document to POST /api/v1/attachments/parse; it returns text, token_count, and document_type without selecting a model.
- Supply
file_data(a base64 data URL) orfile_url.file_idis not supported. - The model must advertise
supports_file_attachments; otherwisemodel does not support file attachments. - Images are not parsed here. See Image Input.
Accepted Kinds
Text, PDF, DOCX, PPTX, XLSX, XLS. Anything else:file type is not supported for server-side parsing. Scanned or image-only PDFs have no text to extract.
Limits
- Inline attachments: 1 MiB decoded; use
file_urlfor larger. Chat request body: 64 MiB. - PDF parsing: isolated process, 10-second timeout, 2,000 pages, 50 MiB extracted text.
- A safety limit fails the request with a sanitized error rather than a shortened document.
Related
PDF and Document Input
Attaching files.
Server-Side Tools
Overview.
Image Input
Images in chat.

