Docs

Start here

Change a film

POST/v1/studio/projects/{project}/films/{film}on https://api.auray.ai/v1

Change a film over the revision it was read at: its name, its document, or both.

Change a film over the revision it was read at: its name, its document, or both. A change from an older revision is refused revision_conflict with the current rev, so two windows never overwrite each other unseen; one that names nothing answers the film as it is. The document is read as a new film's is. Needs the edit_items capability. 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

#Path parameters

NameTypeRequiredDescription
projectstringyes
filmstringyes

#Body

application/json, required.

FieldTypeRequiredDefaultDescription
namestringno—A new name; the old one is kept when none is sent. 1 to 80 characters.
docobjectno—A film's document, exactly these keys: its shape, its clips in order, and its soundtrack. At most 60 clips and 10 minutes of film — every clip's kept length, less each fade — and 32 KB of JSON.
doc.vintegeryes—One of 1.
doc.aspectstringyes—Across or up. Every clip is fitted into the frame, never stretched or cut. One of "16:9", "9:16".
doc.clipsobject[]yes—
doc.clips[].item_idstringyes—A video item of the project, in lower case.
doc.clips[].in_msintegeryes—0 to ….
doc.clips[].out_msintegeryes—… to 86400000.
doc.clips[].transitionstringyes—How it joins the clip before it: at once, or by a cross-fade of picture and sound. The first clip cuts in. One of "cut", "fade".
doc.clips[].fade_msintegeryes—0 for a cut; 200 to 3000 for a fade, and at most half the shorter of the two clips it joins. Two clips joined by a fade overlap by its length. 0 to 3000.
doc.soundobjectyes—
doc.sound.clipsstringyes—The clips' own sound, kept or every clip silent. One of "keep", "mute".
doc.sound.musicnull or objectyes—One music bed under the clips, from in_ms into the sound; one that runs on past the film's end fades out over its last moments, and one that ends sooner simply ends. Null for none.
base_revintegeryes—The rev the film was read at. 1 to ….

#Example request

curl -X POST https://api.auray.ai/v1/studio/projects/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d/films/6d7e8f90-1a2b-4c3d-8e4f-5a6b7c8d9e0f \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "doc": {
    "v": 1,
    "aspect": "16:9",
    "clips": [
      {
        "item_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
        "in_ms": 0,
        "out_ms": 5000,
        "transition": "cut",
        "fade_ms": 0
      },
      {
        "item_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
        "in_ms": 400,
        "out_ms": 4800,
        "transition": "fade",
        "fade_ms": 500
      }
    ],
    "sound": {
      "clips": "keep",
      "music": {
        "item_id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
        "gain_db": -12,
        "in_ms": 0
      }
    }
  },
  "base_rev": 3
}'

#Responses

#200 OK

OK.

FieldTypeRequiredDefaultDescription
objectstringyes—One of "film".
idstringyes—
project_idstringyes—
namestringyes—0 to 80 characters.
docobjectyes—A film's document, exactly these keys: its shape, its clips in order, and its soundtrack. At most 60 clips and 10 minutes of film — every clip's kept length, less each fade — and 32 KB of JSON.
doc.vintegeryes—One of 1.
doc.aspectstringyes—Across or up. Every clip is fitted into the frame, never stretched or cut. One of "16:9", "9:16".
doc.clipsobject[]yes—
doc.clips[].item_idstringyes—A video item of the project, in lower case.
doc.clips[].in_msintegeryes—0 to ….
doc.clips[].out_msintegeryes—… to 86400000.
doc.clips[].transitionstringyes—How it joins the clip before it: at once, or by a cross-fade of picture and sound. The first clip cuts in. One of "cut", "fade".
doc.clips[].fade_msintegeryes—0 for a cut; 200 to 3000 for a fade, and at most half the shorter of the two clips it joins. Two clips joined by a fade overlap by its length. 0 to 3000.
doc.soundobjectyes—
doc.sound.clipsstringyes—The clips' own sound, kept or every clip silent. One of "keep", "mute".
doc.sound.musicnull or objectyes—One music bed under the clips, from in_ms into the sound; one that runs on past the film's end fades out over its last moments, and one that ends sooner simply ends. Null for none.
revintegeryes—A change names the rev it was read at. 1 to ….
duration_msintegeryes—Every clip's kept length, less each fade. 0 to ….
sourcesobject[]yes—Every clip — and the music — that cannot be exported as it is now; empty when nothing stops it.
sources[].atstringyes—One of "clip", "music".
sources[].indexintegeryes—The clip's place in doc.clips; null for the music. 0 to …. May be null.
sources[].item_idstringyes—
sources[].problemstringyes—Gone from the project, in the Trash, still being copied in, withheld after a report, held while a report is looked at, a clip that is no video, music that is no sound, no stored file, or a file larger than a film reads. One of "missing", "trashed", "pending", "withheld", "held", "not_video", "not_audio", "no_file", "too_large".
exportablebooleanyes—It holds a clip and nothing in sources stops it.
latest_exportnull or objectyes—Its newest export, whatever its state; null before the first.
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

#404 Not Found

#409 Conflict

#413 Payload Too Large

#429 Too Many Requests

#500 Internal Server Error

#503 Service Unavailable

#Status codes

StatusMeaning
200OK.
400Bad Request
401Unauthorized
403Forbidden
404Not Found
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