Upload a file
POST /file
Stores the file under the SHA-256 of its content. Uploading the same
bytes again returns the same file_id with already_exists: true.
Reference stored files from a task with { "file_id": "..." }.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
File content. The part’s filename and content type are stored as metadata.
Responses
Section titled “ Responses ”Stored
object
Lowercase hex SHA-256 of the file content
Malformed request body or parameters (invalid_request)
object
Human-readable message
Stable machine-readable error code. Clients should treat unknown codes as internal_error.
Example
{ "error": "Failed to deserialize the JSON body into the target type: missing field `cmd`", "code": "invalid_request"}Missing or wrong API key (unauthorized)
object
Human-readable message
Stable machine-readable error code. Clients should treat unknown codes as internal_error.
Example
{ "error": "Missing or invalid API key", "code": "unauthorized"}Headers
Section titled “Headers ”The body exceeds the configured size limit (payload_too_large)
object
Human-readable message
Stable machine-readable error code. Clients should treat unknown codes as internal_error.
Example
{ "error": "The request body is larger than the configured limit", "code": "payload_too_large"}The API key has used up its requests (rate_limited). Sent only when
the service enables per-key rate limiting (RATE_LIMIT_PER_MINUTE).
Retry after the Retry-After header.
object
Human-readable message
Stable machine-readable error code. Clients should treat unknown codes as internal_error.
Example
{ "error": "Rate limit exceeded for this API key", "code": "rate_limited"}Headers
Section titled “Headers ”Seconds until the key may make another request
Too many concurrent uploads or the store is full (capacity_exhausted)
object
Human-readable message
Stable machine-readable error code. Clients should treat unknown codes as internal_error.
Example
{ "error": "Too many uploads in progress", "code": "capacity_exhausted"}