v10

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-0643140398.0 KB
Files

Upload a file

Upload a file into the session's uploads directory. The file is stored under uploads/{filename} within the session scope and its relative path is returned as the file ID. Uploading a file with the same name overwrites the existing one.

post/v1/files

Query parameters

scope_idstring required

Session / container identifier (matches the container field in chat requests).

Example:session-abc123

Session / container identifier (matches the container field in chat requests).

Response

Successful Response

idstring required

Relative path of the file within the session, e.g. 'uploads/data.csv' or 'outputs/result.png'. Use this value as file_id in subsequent requests.

created_atstring date-time required

ISO-8601 timestamp when the file was created or last modified.

filenamestring required

Filename derived from the path.

mime_typestring required

MIME type detected from the file content.

size_bytesinteger required

File size in bytes.

type'file'

Object type discriminator, always 'file'.

downloadableboolean required

True for sandbox output files; False for uploaded input files.

Example response

{
  "created_at": "2024-01-15T10:30:00Z",
  "downloadable": false,
  "filename": "data.csv",
  "id": "uploads/data.csv",
  "mime_type": "text/csv",
  "scope": {
    "id": "session-abc123",
    "type": "session"
  },
  "size_bytes": 4096,
  "type": "file"
}