Endpoints
The file object is the OpenAI shape plus RavChat vendor fields (
project_id, path, source, session_id). source is user, assistant, or media.
Mutability — read this
Managed uploads — immutable
Managed uploads — immutable
POST /v1/files without an explicit path: stored in a managed location, immutable. OpenAI-exact semantics — each upload is a new object; overwrites are rejected.Live project files — mutable
Live project files — mutable
Agent-produced files, or uploads with an explicit
path: real files in a living workspace. The agent may modify them after you list them. /content always serves current disk truth; bytes refreshes on retrieve/list; if the underlying file is deleted, the object 404s.Uploading for the agent
A file uploaded withproject_id (or your key’s default project) lands in the workspace the agent reads. Reference it in a completion with a standard file content part:
file_data (base64 data-URL) + filename is also accepted and stored through the same upload path. The file_id must be within your key’s project scope.
Agent-produced files
Files the agent produces during a turn are indexed and returned in the response’sx_ravchat.files. The promise is “observed files”: the index captures files the agent explicitly surfaced (shown files, generated media, resolved session outputs) — not every byte the agent may have touched. All indexed files also appear in the project file listing and persist after the session ends.
Limits
- 50 MB per file (v1).
- Per-project storage quota applies (plan-dependent).
- File endpoints have their own rate limits, separate from completions.
- Files are never auto-deleted by TTL — delete explicitly. (
expires_afteris not supported in v1.)