> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trynito.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PDF and document input

> PDFs and office documents as a file content part.

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](/api/api-reference/multimodal/image-input).

## The `file` Part

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "role": "user",
  "content": [
    { "type": "text", "text": "Summarize this document." },
    {
      "type": "file",
      "file": {
        "file_url": "https://example.org/report.pdf"
      }
    }
  ]
}
```

| Field | Type | Notes |
| - | - | - |
| `type` | string | `"file"` or `"input_file"`. |
| `file.file_url` | string | A URL to fetch the document from. With `input_file`, the fields sit at the top level of the part. |
| `file.file_data` | string | Inline document bytes as a data URL, as an alternative to `file_url`. |
| `file.filename` | string | Used with `file_data` to hint the format. |

`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.

## Related

* [Image input](/api/api-reference/multimodal/image-input)
* [Request format](/api/api-reference/overview/request-format)

## Extract text without inference

Upload a multipart `file` to [`POST /api/v1/attachments/parse`](/api/api-reference/server-tools/file-parser#standalone-document-parsing). The API returns extracted text, a model-independent token estimate, and the document type. No model ID is required; document parsing is billed separately.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.