Bring your own transcript
canvasId and canvasVideoId and exactly one of segments or srtKey. To run speech-to-text instead, see Transcribe a video.What you need
- Project key with
canvas:create,canvas:read, andtranscript:edit. You do not needservice:transcribe. connectionId, bucket, and video object key from Connect storage. The video must already exist in the bucket.
1. Create a canvas
POST /v1/canvases creates the pool only. Each videoSources[] item needs sourceLanguage. Save canvasId and the canvasVideoId you will attach captions to. One video or several — same route.
curl -X POST "{BASE_URL}/v1/canvases" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "{CANVAS_NAME}",
"videoSources": [{
"connectionId": "{CONNECTION_ID}",
"bucket": "{S3_BUCKET}",
"sourceKey": "{S3_VIDEO_KEY}",
"sourceLanguage": "{SOURCE_LANGUAGE}"
}]
}'# Same POST — two pool videos, each with its own sourceLanguage.
# Generate still takes one canvasVideoId per job (videoAssets[0] or videoAssets[1]).
curl -X POST "{BASE_URL}/v1/canvases" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "{CANVAS_NAME}",
"videoSources": [
{
"connectionId": "{CONNECTION_ID}",
"bucket": "{S3_BUCKET}",
"sourceKey": "{S3_VIDEO_KEY}",
"sourceLanguage": "en"
},
{
"connectionId": "{CONNECTION_ID}",
"bucket": "{S3_BUCKET}",
"sourceKey": "{S3_VIDEO_KEY_TA}",
"sourceLanguage": "ta",
"label": "Tamil master"
}
]
}'2. Create a version
POST /v1/canvases creates the video pool only — it does not create a cut. versions on that response is empty. Then POST /v1/canvases/:canvasId/versions. Optional label only (omit it and the API assigns v1, v2, …). Save canvasVersionId from this response, not from canvas create. Walkthrough: Create a canvas version.
curl -X POST "{BASE_URL}/v1/canvases/{CANVAS_ID}/versions" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{ "label": "v1" }'3. Import timed segments
POST /v1/transcriptions/import attaches captions to that cut + pool video. Send required canvasId and canvasVideoId, recommended canvasVersionId, and segments ({ start, end, text } in seconds). Do not send connectionId, bucket, sourceKey, or sourceLanguage — those come from the pool video. The response is the transcript version (textSourceId, canvasVideoId). Full fields: Transcripts → Import onto a canvas.
cva_… you want; import again for another video.curl -X POST "{BASE_URL}/v1/transcriptions/import" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{
"canvasId": "{CANVAS_ID}",
"canvasVersionId": "{CANVAS_VERSION_ID}",
"canvasVideoId": "{CANVAS_VIDEO_ID}",
"name": "Human captions",
"segments": [
{ "start": 0.0, "end": 4.2, "text": "Hello world." },
{ "start": 4.5, "end": 8.0, "text": "Welcome back." }
]
}'Or import an uploaded .srt
Same route. Send srtKey instead of segments — exactly one of segments, srtKey, or vttKey. The object must already be in the same bucket as the pool video (upload with storage purpose: "transcript_srt", then pass that key).
curl -X POST "{BASE_URL}/v1/transcriptions/import" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{
"canvasId": "{CANVAS_ID}",
"canvasVersionId": "{CANVAS_VERSION_ID}",
"canvasVideoId": "{CANVAS_VIDEO_ID}",
"name": "Human captions",
"srtKey": "{S3_SRT_KEY}"
}'WebVTT works the same way — send vttKey for an already-uploaded .vtt object.
curl -X POST "{BASE_URL}/v1/transcriptions/import" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{
"canvasId": "{CANVAS_ID}",
"canvasVersionId": "{CANVAS_VERSION_ID}",
"canvasVideoId": "{CANVAS_VIDEO_ID}",
"name": "Human captions",
"vttKey": "{S3_VTT_KEY}"
}'4. Read the transcript
Import returns immediately. Refresh GET /v1/canvases/:canvasId for versions[].artifacts.transcripts[], or fetch the working copy with GET /v1/transcriptions/:textSourceId. Segment edits are the same as after ASR — see Working with transcripts.
curl "{BASE_URL}/v1/canvases/{CANVAS_ID}" \
-H "Authorization: Bearer {PROJECT_KEY}"
curl "{BASE_URL}/v1/transcriptions/{TEXT_SOURCE_ID}" \
-H "Authorization: Bearer {PROJECT_KEY}"Library import (no canvas)
If the captions are not attached to a canvas cut, use POST /v1/projects/:projectId/text-sources/import instead. That route takes connectionId, bucket, sourceKey, and sourceLanguage on the body. Canvas import does not — it reads those from the pool video you name with canvasVideoId.
Run the script
Replace {…} placeholders. After canvas create, copy canvasId and videoAssets[0].canvasVideoId. After version create, copy canvasVersionId. Import returns textSourceId immediately.
# Video object must already exist at {S3_VIDEO_KEY}.
# Import is sync — no worker, no ASR credits.
curl -X POST "{BASE_URL}/v1/canvases" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "{CANVAS_NAME}",
"videoSources": [{
"connectionId": "{CONNECTION_ID}",
"bucket": "{S3_BUCKET}",
"sourceKey": "{S3_VIDEO_KEY}",
"sourceLanguage": "{SOURCE_LANGUAGE}"
}]
}'
curl -X POST "{BASE_URL}/v1/canvases/{CANVAS_ID}/versions" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{ "label": "v1" }'
curl -X POST "{BASE_URL}/v1/transcriptions/import" \
-H "Authorization: Bearer {PROJECT_KEY}" \
-H "Content-Type: application/json" \
-d '{
"canvasId": "{CANVAS_ID}",
"canvasVersionId": "{CANVAS_VERSION_ID}",
"canvasVideoId": "{CANVAS_VIDEO_ID}",
"name": "Human captions",
"segments": [
{ "start": 0.0, "end": 4.2, "text": "Hello world." },
{ "start": 4.5, "end": 8.0, "text": "Welcome back." }
]
}'
curl "{BASE_URL}/v1/transcriptions/{TEXT_SOURCE_ID}" \
-H "Authorization: Bearer {PROJECT_KEY}"