Skip to main content
Runs never carry file bytes. Upload a file first, then pass its file_id in a run’s input; the agent downloads it with its run token. Agents upload files the same way — a report they produced, an image to show a reviewer in an ask — and hand you back the id. Files belong to the environment: every agent of the environment can read any of its files by id. For the agent side, see Files and events.

Upload a file

POST /v0/envs/{env}/files multipart/form-data with the file in the field file, at most 100 MiB. Needs the member or admin role.

Pass it to a run

A file id is a plain string to the input schema. Name the field however your capability wants it:
The agent downloads it with GET {api_url}/v0/files/f_9 and its run token, or inv.files.download("f_9") with an SDK.

Download a file

GET /v0/envs/{env}/files/{file_id} Any role in the environment. The bytes come as an attachment, with the file’s content type, Content-Disposition: attachment and X-Content-Type-Options: nosniff.
An agent’s output, or an ask’s files, name files by id the same way; download them with this route.
Files are kept: there is no deletion or retention policy yet.