Find Similar Voices
POSThttps://api.knoxstudio.ai/v1/similar-voices
Upload a sample to find similar library voices. Not billed. similarity_threshold is 0–2; top_k is 1–100.
Request
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | Bearer <token> Knox API key. xi-api-key is also accepted. |
| Content-Type | String | Yes | multipart/form-data |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| audio_file | File | No | Reference audio used for similarity search. |
| similarity_threshold | Number | No | 0.0–2.0. |
| top_k | Integer | No | 1–100 results. |
cURL Example
curl -X POST https://api.knoxstudio.ai/v1/similar-voices \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-F "audio_file=@clip.wav" \
-F "top_k=10" \
-F "similarity_threshold=1.0"
Response
Success Response (200)
JSON list of similar voices and scores.
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. |