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

# create_file_upload

> Upload a local file for a tool's file input.

## Arguments

| Argument | Required | Type | Description |
| - | - | - | - |
| `name` | Yes | string, up to 255 characters | The file's name, as the website will see it, for example receipt.pdf |
| `media_type` | Yes | string, up to 255 characters | The file's media type, such as application/pdf; its first bytes must match it |
| `size` | No | integer | The file's size in bytes; if given, the upload's Content-Length must match |

## Output

The new file, with its `id` and one-time `upload_url`, and the `curl -T` command that sends its bytes. Pass the `id` as a tool's file field. See [Send a file to a run](/guides/files/send-a-file).

<CodeGroup>
  ```json Arguments theme={null}
  { "name": "receipt.pdf", "media_type": "application/pdf", "size": 48213 }
  ```

  ```json Result theme={null}
  {
    "id": "file_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "name": "receipt.pdf",
    "media_type": "application/pdf",
    "size": 48213,
    "sha256": null,
    "status": "awaiting_upload",
    "direction": "input",
    "job_id": null,
    "created_at": "2026-10-08T17:00:00.000Z",
    "expires_at": "2026-10-08T18:00:00.000Z",
    "upload_url": "https://api.pomerado.ai/v1/file-uploads/cccccccccccccccccccccccccccccccc"
  }
  ```
</CodeGroup>

<Accordion title="Details">
  Returns the file's id and a one-time upload\_url: send the file's bytes there once with an HTTP PUT and no Authorization header, for example curl -T receipt.pdf '\<upload\_url>', then pass id as the file field's value. The file must be at most 25 MiB unless the deployment says otherwise, its first bytes must match media\_type, and executables are refused. A file serves one run, is erased when that run's job ends, and is erased after an hour if unused. A file field also takes an https URL or a data: URI of at most 512 KB instead.

  **Effect:** May change a website or your account.
</Accordion>


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