Cinema Studio

Ask where to upload a file

A ticket for one file: PUT its bytes to upload_url with headers before expires_at — never through this API — then file it by naming upload_id (POST …/items, an element's files, a project's cover_up…

POST
/v1/studio/uploads
POST
/v1/studio/uploads
Ask where to upload a file
A ticket for one file: PUT its bytes to upload_url with headers before expires_at — never through this API — then file it by naming upload_id (POST …/items, an element's files, a project's cover_up…
Authorizationstringrequired
Your API key. It is sent only when you press Send, to this request alone, and never stored.
Ask where to upload a file
curl --request POST \
  --url 'https://api.auray.ai/v1/studio/uploads' \
  --header 'Authorization: Bearer <api-key>'
  --header 'Content-Type: application/json' \
  --data '{
  
}'
{
  "object": "<string>",
  "upload_id": "<string>",
  "upload_url": "<string>",
  "method": "<string>",
  "headers": {},
  "expires_at": "<string>",
  "max_bytes": 123,
  "kind": "<string>",
  "request_id": "<string>"
}
Ask where to upload a file
curl -X POST https://api.auray.ai/v1/studio/uploads \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "purpose": "item",
  "project_id": "3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d",
  "content_type": "image/png",
  "bytes": 482113,
  "name": "plate.png"
}'
{
  "object": "<string>",
  "upload_id": "<string>",
  "upload_url": "<string>",
  "method": "<string>",
  "headers": {},
  "expires_at": "<string>",
  "max_bytes": 123,
  "kind": "<string>",
  "request_id": "<string>"
}

A ticket for one file: PUT its bytes to upload_url with headers before expires_at — never through this API — then file it by naming upload_id (POST …/items, an element's files, a project's cover_upload_id, or POST …/scripts for a script). The PUT is signed for the type and size declared; only what then landed is filed. A file that would take what a project's owner keeps past the room their plan gives — their studio.max_items times their studio.bytes_per_item (on GET /v1/plans) — is refused 409 studio_limit_reached with limit storage. Takes a key holding studio:write — Account offers it unticked — or the desktop's own session key. Spends nothing.

Authorizations

Authorizationstringheaderrequired

Bearer auray_sk_… — studio:write — Account offers it unticked; the desktop's session key holds it.

Body

application/json
purposestringrequired
An item of a project, a picture, clip or sound of an element, a project's cover, a frame of a clip as its poster (a picture of at most 2,000,000 bytes, filed by changing the item with poster_upload_id), or a script to read into the project (filed by POST …/scripts). One of "item", "element", "cover", "poster", "script".
project_idstring
Required for an item, a cover and a poster.
content_typestringrequired
A script is one of six types, one a format — fountain text/x-fountain, fdx application/xml, txt text/plain, md text/markdown, pdf application/pdf, docx application/vnd.openxmlformats-officedocument.wordprocessingml.document — of at most 10,000,000 bytes by default (the ticket's max_bytes says the bound in force), and takes no other purpose. One of "image/png", "image/jpeg", "image/webp", "video/mp4", "video/webm", "video/quicktime", "audio/mpeg", "audio/wav"
and 11 more"audio/x-wav", "audio/ogg", "audio/flac", "audio/mp4", "model/gltf-binary", "text/x-fountain", "application/xml", "text/plain", "text/markdown", "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
bytesintegerrequired
The file's exact size: the PUT is signed for it. The most a file of its kind may be is the bound in force, which the ticket answers in max_bytes and upload_too_large names. 1 to 2000000000.
namestring
0 to 120 characters.

Response

application/json

Created.

objectstringrequired
One of "upload".
upload_idstringrequired
upload_urlstringrequired
A URL.
methodstringrequired
One of "PUT".
headersobjectrequired
Send these exactly: the PUT is signed for this type, and for the length declared.
expires_atstringrequired
max_bytesintegerrequired
kindstringrequired
One of "image", "video", "audio", "model3d", "script".
request_idstring
Mirrored in the X-Request-Id header.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

Was this page helpful?

Ask where to upload a file
curl -X POST https://api.auray.ai/v1/studio/uploads \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "purpose": "item",
  "project_id": "3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d",
  "content_type": "image/png",
  "bytes": 482113,
  "name": "plate.png"
}'
{
  "object": "<string>",
  "upload_id": "<string>",
  "upload_url": "<string>",
  "method": "<string>",
  "headers": {},
  "expires_at": "<string>",
  "max_bytes": 123,
  "kind": "<string>",
  "request_id": "<string>"
}

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close search.