Docs

Start here

Save a preset

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

Save a palette or a lighting rig — 200 at most.

Save a palette or a lighting rig — 200 at most. 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
kindstringyes—One of "palette", "lighting".
namestringyes—0 to 60 characters.
paletteobjectno—
palette.namestringyes—0 to 60 characters.
palette.swatchesstring[]yes—
rigobjectno—
rig.lightsobject[]yes—
rig.lights[].colorstringyes—
rig.lights[].intensitynumberyes—0 to 1.
rig.lights[].diffusionnumberyes—0 a bare bulb, 1 a cloud. 0 to 1.
rig.lights[].azimuthnumberyes—Degrees around the subject, 0 in front. 0 to ….
rig.lights[].elevationnumberyes—-90 to 90.
rig.ambientobjectyes—
rig.ambient.colorstringyes—
rig.ambient.intensitynumberyes—0 to 1.

#Example request

curl -X POST https://api.auray.ai/v1/studio/presets \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "kind": "palette",
  "name": "Sodium night",
  "palette": {
    "name": "Sodium night",
    "swatches": [
      "#0b0d17",
      "#1d2340",
      "#3a2f5b",
      "#f2a541",
      "#f6d18b",
      "#c0392b",
      "#16a085",
      "#ecf0f1"
    ]
  }
}'

#Responses

#201 Created

Created.

FieldTypeRequiredDefaultDescription
objectstringyes—One of "preset".
idstringyes—
kindstringyes—One of "palette", "lighting".
namestringyes—0 to 60 characters.
paletteobjectno—
palette.namestringyes—0 to 60 characters.
palette.swatchesstring[]yes—
rigobjectno—
rig.lightsobject[]yes—
rig.lights[].colorstringyes—
rig.lights[].intensitynumberyes—0 to 1.
rig.lights[].diffusionnumberyes—0 a bare bulb, 1 a cloud. 0 to 1.
rig.lights[].azimuthnumberyes—Degrees around the subject, 0 in front. 0 to ….
rig.lights[].elevationnumberyes—-90 to 90.
rig.ambientobjectyes—
rig.ambient.colorstringyes—
rig.ambient.intensitynumberyes—0 to 1.
created_atstringyes—
updated_atstringyes—
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

#409 Conflict

#413 Payload Too Large

#429 Too Many Requests

#500 Internal Server Error

#503 Service Unavailable

#Status codes

StatusMeaning
201Created.
400Bad Request
401Unauthorized
403Forbidden
409Conflict
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