Skip to main content

Working with files

Upload images and video once, then reference them by id across many requests — instead of re-sending (or base64-inlining) the same media on every call. Files are stored against your organization, addressed by a file-... id, and the endpoints are OpenAI-compatible.

The endpoints

Upload File

Upload a file and get back a file-... id.

List Files

Page through your organization’s files.

Retrieve File

Fetch a file’s metadata.

Retrieve File Content

Download the raw bytes.

Delete File

Permanently remove a file.

Referencing a file in a request

Reference an uploaded file in a chat completion by id with an image_file_id / video_file_id content part, or by passing its /v1/files/{file_id}/content URL as a standard image_url / video_url. All four forms are equivalent.
{ "type": "image_file_id", "image_file_id": { "file_id": "file-abc123" } }

Limits

Files are capped at 512 MiB each, with 100 GiB of total storage per organization. Per-endpoint rate limits are listed on each API reference page. Need higher limits? Contact us.