Skip to main content

Update PVC Sample

POST 

https://api.knoxstudio.ai/v1/voices/pvc/:voice_id/samples/:sample_id

Optional trim, speaker selection, and noise removal. Not billed.

Request​

Path Parameters​

NameTypeRequiredDescription
voice_idStringYesVoice ID.
sample_idStringYesSample ID.

Request Headers​

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

Request Body​

NameTypeRequiredDescription
remove_background_noiseBooleanNoIsolate speech in the sample.
selected_speaker_idsList of StringsNoSpeakers to keep after separation.
trim_start_timeIntegerNoTrim start (ms or samples, forwarded).
trim_end_timeIntegerNoTrim end.
file_nameStringNoOptional display name.

cURL Example​

curl -X POST https://api.knoxstudio.ai/v1/voices/pvc/voice_id/samples/sample_id \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"remove_background_noise":true}'

Response​

Success Response (200)​

Updated sample 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.