API reference · Account
Start a file sent in parts
POST/api/studio/uploadsSigned in session
For a file larger than one request carries (the export's Share it). The types and caps of a stored file; parts of 3500000 bytes; at most 4 open (409 too_many_uploads); one not completed in 6 hours is swept with its parts. A 404 with code storage_off while the operator keeps no files for the studio. The signed in account; same origin for a write.
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| content_typerequired | string | One of "image/png", "image/jpeg", "image/webp", "audio/mpeg", "audio/wav", "audio/ogg", "audio/webm", "audio/mp4", "audio/aac", "video/mp4", "video/quicktime", "video/webm". |
| bytesrequired | integer | At least 1. |
| name | string | |
| project_id | string or null | The film it is kept with. |
| doc_asset_id | string or null |
Example
{
"content_type": "image/png",
"bytes": 1
}Answer 201
The upload, its parts to send.
| Field | Type | What it is |
|---|---|---|
| id | string | |
| object | string | One of "studio.upload". |
| content_type | string | |
| bytes | integer | |
| part_bytes | integer | |
| parts | integer | |
| parts_received | integer | |
| status | string | One of "open", "completing". |
| expires_at | integer |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 402OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
- 409OpenAI shaped error.
- 413OpenAI shaped error.
- 415OpenAI shaped error.
- 429OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.