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 afile-... 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 animage_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.