Docs

Start here

Ask where to upload a file

POST/v1/studio/uploadson https://api.auray.ai/v1

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, or a project's cover…

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, or a project's cover_upload_id). The PUT is signed for the type and size declared; only what then landed is filed. Takes a key holding studio:write — Account offers it unticked — or the desktop's own session key. Spends nothing.

#Authentication

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

#Request

#Body

application/json, required.

FieldTypeRequiredDefaultDescription
purposestringyes—An item of a project, a picture or clip of an element, a project's cover, or 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). One of "item", "element", "cover", "poster".
project_idstringno—Required for an item, a cover and a poster.
content_typestringyes—One of "image/png", "image/jpeg", "image/webp", "video/mp4", "video/webm", "video/quicktime", "audio/mpeg", "audio/wav", "audio/x-wav", "audio/ogg", "audio/flac", "audio/mp4", "model/gltf-binary".
bytesintegeryes—The file's exact size: the PUT is signed for it. 1 to 200000000.
namestringno—0 to 120 characters.

#Example request

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"
}'

#Responses

#201 Created

Created.

FieldTypeRequiredDefaultDescription
objectstringyes—One of "upload".
upload_idstringyes—
upload_urlstringyes—A URL.
methodstringyes—One of "PUT".
headersobjectyes—Send these exactly: the PUT is signed for this type, and for the length declared.
expires_atstringyes—
max_bytesintegeryes—
kindstringyes—One of "image", "video", "audio", "model3d".
request_idstringno—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

#400 Bad Request

#401 Unauthorized

#403 Forbidden

#404 Not Found

#413 Payload Too Large

#429 Too Many Requests

#500 Internal Server Error

#503 Service Unavailable

#Status codes

StatusMeaning
201Created.
400Bad Request
401Unauthorized
403Forbidden
404Not Found
413Payload Too Large
429Too Many Requests
500Internal Server Error
503Service Unavailable

Every refusal names its code, and every code is explained at Errors.

Start typing to search every page of the documentation.

Up arrow Down arrow to moveEnter to openEscape to close