curl --request PATCH \
--url https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"translation_text": "Hoy repasamos las novedades de doblaje."
}
'
{
"object": "transcript_edit_result",
"segments": [
{
"object": "segment",
"id": "8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22",
"project_id": "6f1c2b7e-8a4d-4e3f-9b5c-1d0a7e2f3c58",
"start_seconds": 3.4,
"end_seconds": 6.8,
"speaker_id": "SPEAKER_01",
"speaker_label": "Speaker 2",
"source": {
"text": "Today we cover the new dubbing features.",
"language": "en"
},
"translation": {
"text": "Hoy repasamos las novedades de doblaje.",
"language": "es-es"
},
"words": null,
"needs_attention": false,
"status": "ready",
"dub_state": "outdated",
"audio": null,
"selected_variant_id": null,
"translation_variants": null,
"processing_started_at": null,
"etag": "\"s-a417e9824d09b346\""
}
],
"deleted_segment_ids": [],
"operations": [
{
"index": 0,
"segment_ids": [
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
]
}
],
"effects": {
"needs_redub_segment_ids": [
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
],
"audio_dropped_segment_ids": [
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
],
"retranslation": null,
"speakers_pending_voice": [],
"instant_clone_settings_reset": [],
"restore_point_version": null,
"project_needs_redub": true
},
"warnings": []
}
Segments
Update a segment
Changes timing, speaker, source or translation text, the review flag, or retranslates.
PATCH
/
projects
/
{project_id}
/
segments
/
{segment_id}
curl --request PATCH \
--url https://api.rask.ai/v3/projects/{project_id}/segments/{segment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"translation_text": "Hoy repasamos las novedades de doblaje."
}
'
{
"object": "transcript_edit_result",
"segments": [
{
"object": "segment",
"id": "8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22",
"project_id": "6f1c2b7e-8a4d-4e3f-9b5c-1d0a7e2f3c58",
"start_seconds": 3.4,
"end_seconds": 6.8,
"speaker_id": "SPEAKER_01",
"speaker_label": "Speaker 2",
"source": {
"text": "Today we cover the new dubbing features.",
"language": "en"
},
"translation": {
"text": "Hoy repasamos las novedades de doblaje.",
"language": "es-es"
},
"words": null,
"needs_attention": false,
"status": "ready",
"dub_state": "outdated",
"audio": null,
"selected_variant_id": null,
"translation_variants": null,
"processing_started_at": null,
"etag": "\"s-a417e9824d09b346\""
}
],
"deleted_segment_ids": [],
"operations": [
{
"index": 0,
"segment_ids": [
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
]
}
],
"effects": {
"needs_redub_segment_ids": [
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
],
"audio_dropped_segment_ids": [
"8b3d1e9f-6a2c-4d7e-b5f1-3c9e7a1d5b22"
],
"retranslation": null,
"speakers_pending_voice": [],
"instant_clone_settings_reset": [],
"restore_point_version": null,
"project_needs_redub": true
},
"warnings": []
}
Changing the source without sending a translation retranslates by default. A translating segment is busy; while voicing, translation and speaker changes are refused.
When to use: for single-segment edits; for several segments, call it once per segment with that segment’s ETag.
Side effects: Commits atomically: the project’s
pipeline_status becomes transcript_edited, segment ETags change, affected segments become outdated (listed in the response’s effects) and their audio may be dropped. A change of the review flag alone changes only the segment’s flag and ETag.
Cost: Free (a redub of the change is priced by estimateDub). An edit that starts a translation counts against the payer’s translation budget (429 rate_limited, policy translation-hour) and its 5 concurrent translation jobs (429 too_many_concurrent_jobs); then nothing is written.
Idempotency: Idempotency-Key accepted (SDKs send one); retries within 24 h replay the first response.
Concurrency: If-Match with the current segment ETag is required (428 if missing or *, 412 with current_etag if stale). On 412 re-read, re-apply once and retry. Refused during processing (409 project_not_ready) and while a dub runs, from its start until its merge ends or it fails (409 dub_in_progress); 409 transcript_busy means concurrent writes kept conflicting: retry after Retry-After.
Paid text: on a project created through v3, 409 dub_payment_required until a dub of that project is charged.
Required scopes: transcripts:write
Errors: transcript_not_ready (409), segment_busy (409), project_not_ready (409), dub_in_progress (409), transcript_busy (409), too_many_concurrent_jobs (429), dub_payment_required (409)Authorizations
Headers
Path Parameters
Body
application/json
At least one field.
Response
OK: TranscriptEditResult.
Result of a segment or transcript mutation. Transient (no id).