Skip to main content
POST
/
v1
/
cuts
Cut an asset
curl --request POST \
  --url https://roughy-api-staging.fly.dev/v1/cuts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "script": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "script": "<string>",
  "error_code": "<string>",
  "error_message": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Pass your API key as Authorization: Bearer sk_…. Mint a key from your dashboard's API-keys page.

Body

application/json

Create a cut for an asset, aligned to the supplied script (snapshotted onto the cut at create time).

asset_id
string<uuid>
required

The asset to cut.

script
string | null

Optional reference text the cut aligns to (the intended final message). Omit / null for a scriptless cut.

Maximum string length: 100000

Response

A cut with the same (asset, script) already exists; it is returned.

A cut.

id
string<uuid>
required

Cut id.

asset_id
string<uuid>
required

The source asset (video or audio) this cut belongs to.

state
enum<string>
required

Cut lifecycle state: pending / processing while the cut computes, completed when ready, failed on error. completed and failed are terminal.

Available options:
pending,
processing,
completed,
failed
script
string | null
required

The script this cut was computed with (from the create request, snapshotted at create time).

error_code
string | null
required

Machine-readable failure code when state=failed.

error_message
string | null
required

Human-readable failure detail when state=failed.

created_at
string<date-time>
required

When the cut was created.

started_at
string<date-time> | null
required

When compute started.

completed_at
string<date-time> | null
required

When the cut reached a terminal state.