Skip to main content

Update Source Segment

PATCH 

https://api.knoxstudio.ai/v1/dubbing/project/:project_id/transcript/segment/:segment_id

Patch a source segment. At least one of text, speaker_id, start_s, end_s is required. Not billed.

Request​

Path Parameters​

NameTypeRequiredDescription
project_idStringYesDubbing project ID.
segment_idStringYesSegment ID.

Request Headers​

NameTypeRequiredDescription
AuthorizationStringYesBearer <token> Knox API key. xi-api-key is also accepted.
Content-TypeStringYesapplication/json

Request Body​

NameTypeRequiredDescription
textStringNoReplacement source text.
speaker_idStringNoReplacement speaker ID.
start_sNumberNoStart time. If either time is sent, the span must be 0.1–25s.
end_sNumberNoEnd time.

cURL Example​

curl -X PATCH https://api.knoxstudio.ai/v1/dubbing/project/proj_123/transcript/segment/seg_789 \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello there, friend"}'

Response​

Success Response (200)​

Updated segment JSON.

Error Responses​

Validation uses HTTP 422:

{
"detail": [
{
"loc": ["body", "field"],
"msg": "…",
"type": "value_error"
}
]
}

Other errors use { "detail": "message" }.

StatusWhen
400WebSocket path called without Upgrade: websocket.
401Missing or invalid API key.
402Insufficient credits.
403Token is not allowed to use this model.
404Resource not found.
422Validation error.
429Rate limit exceeded.
500Internal server error.