Batch Update Target Segments
PATCHhttps://api.knoxstudio.ai/v1/dubbing/project/:project_id/language/:language_id/transcript/segments
segments must contain 1–500 entries. Not billed.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| project_id | String | Yes | Dubbing project ID. |
| language_id | String | Yes | Language target ID. |
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | Bearer <token> Knox API key. xi-api-key is also accepted. |
| Content-Type | String | Yes | application/json |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| segments | Object | Yes | Map of segment_id to { "translation": "..." }. 1–500 entries. |
cURL Example
curl -X PATCH https://api.knoxstudio.ai/v1/dubbing/project/proj_123/language/lang_456/transcript/segments \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"segments":{"seg_789":{"translation":"你好"}}}'
Response
Success Response (200)
Batch result JSON.
Error Responses
Validation uses HTTP 422:
{
"detail": [
{
"loc": ["body", "field"],
"msg": "…",
"type": "value_error"
}
]
}
Other errors use { "detail": "message" }.
| Status | When |
|---|---|
400 | WebSocket path called without Upgrade: websocket. |
401 | Missing or invalid API key. |
402 | Insufficient credits. |
403 | Token is not allowed to use this model. |
404 | Resource not found. |
422 | Validation error. |
429 | Rate limit exceeded. |
500 | Internal server error. |