Subtitles and chapters API
Tracks made after a video is ready: subtitles from speech, and chapters from an LLM.
A new track replaces the old one only once it is ready.
Make subtitles or chapters
POST /v1/assets/{id}/tracks
Makes a new subtitles or chapters track. The old one keeps playing until the new one is ready. Chapters need ready subtitles and a connected LLM.
Authentication: An API key with assets:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
Idempotency-Key | header | string | no | A retry with the same key and request returns the first response; a different request is 422 idempotency_key_reused. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
kind | "subtitles", "chapters" | yes | |
supersede | boolean | no |
{
"kind": "subtitles"
}Response 202
Queued
{
"track": {
"id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
"kind": "subtitles",
"source": "generated",
"status": "preparing"
},
"job": {
"id": "job_01jq68ea3qk8sxe3rv83fez7sf",
"kind": "transcribe",
"status": "queued"
}
}Errors
Get a track
GET /v1/assets/{id}/tracks/{track_id}
A track, with its chapters once a chapters track is ready.
Authentication: An API key with assets:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
track_id | path | string | yes |
Response 200
The track; chapters once a chapters track is ready
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready",
"duration_ms": 1830400,
"chapters": [
{
"start_ms": 0,
"end_ms": 412000,
"title": "Why sorting matters"
},
{
"start_ms": 412000,
"end_ms": 1830400,
"title": "Merge sort"
}
]
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |
Delete a track
DELETE /v1/assets/{id}/tracks/{track_id}
Removes a track: its file and transcript go at once. 200 once no playlist lists it, 202 while it is unpublished.
Authentication: An API key with assets:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
track_id | path | string | yes |
Response 200
No route lists it
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "ready",
"version": 6,
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting",
"base_url": "https://media.example.com",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": true,
"status": "active"
}
],
"duration_seconds": 1830.4,
"tracks": [
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready"
}
],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:34:12Z"
}Response 202
Being unpublished
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "ready",
"version": 5,
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting",
"base_url": "https://media.example.com",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": true,
"status": "active"
}
],
"duration_seconds": 1830.4,
"tracks": [
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready"
}
],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:34:12Z"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |
Get a subtitles track's transcript
GET /v1/assets/{id}/tracks/{track_id}/transcript
A subtitles track's transcript, from the moment the track reads ready; 409 track_not_ready before. Add words=true for word timings.
Authentication: An API key with assets:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
track_id | path | string | yes | |
words | query | boolean | no | Include word timings. |
Response 200
The transcript
{
"track_id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
"language": "en",
"duration_ms": 1830400,
"text": "Today we look at three ways to sort a list.",
"segments": [
{
"id": "s0",
"start_ms": 0,
"end_ms": 4200,
"text": "Today we look at three ways to sort a list."
}
]
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 409 | track_not_ready |
| 429 | rate_limited |