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.

Limits

Files are capped at 128 MiB each, with 100 GiB of total storage per organization. Request limits are described in each model’s Scaling guide. Need higher limits? Contact us.