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

# File

> The file block — a download card with icon, name, size, and button.

A download card — file icon, name, easy-to-read size, and a download button.

<ParamField body="type" type="string" required>
  `"file"`
</ParamField>

<ParamField body="url" type="string">
  An `https://` URL. Cannot be mixed with `file_id`.
</ParamField>

<ParamField body="file_id" type="string">
  An uploaded file. Required when there is no `url`.
</ParamField>

<ParamField body="name" type="string">
  1–255 characters. Optional — leave it out with `url` and we take the filename from the URL, so `…/Q2%20report.pdf` shows as `Q2 report.pdf`. With `file_id`, we use the stored name.
</ParamField>

<ParamField body="size_bytes" type="integer">
  Filled in for you with `file_id`.
</ParamField>

<ParamField body="mime_type" type="string">
  Filled in for you with `file_id`. Picks the icon.
</ParamField>

<CodeGroup>
  ```json An uploaded file theme={null}
  { "type": "file", "file_id": "6f1c2a84", "name": "june-report.pdf" }
  ```

  ```json An external URL theme={null}
  { "type": "file", "url": "https://acme.example.com/reports/Q2%20report.pdf" }
  ```
</CodeGroup>

See [Sending files](/sending-messages/files) for the upload flow.
