List voices
Lists the voices each speech model offers, with language and an audio sample. A B3OS endpoint (not part of the OpenAI API), so it uses B3OS lists and errors: `503 infer_backend_unavailable` with `Retry-After` while the voice service is down. All voices arrive in one page (`next_cursor` is always `null`).
GET
/v1/infer/audio/voices
Lists the voices each speech model offers, with language and an audio sample. A B3OS endpoint (not part of
the OpenAI API), so it uses B3OS lists and errors: `503 infer_backend_unavailable` with `Retry-After` while
the voice service is down. All voices arrive in one page (`next_cursor` is always `null`).
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)
Query Parameters
model
string
optional
query
Only voices of this model.
Responses
200
The voices.
application/jsonobject
string
REQUIRED
Enum:
listdata
object[]
REQUIRED
Array of:
id
string
REQUIRED
object
string
REQUIRED
Enum:
voicemodel
string
REQUIRED
name
string
REQUIRED
language
string
REQUIRED
BCP 47 tag.
sample_url
string (uri)
A short audio sample of the voice, a B3OS static asset: `https://beta.b3os.org/assets/voices/<voice>.<ext>`
(B3OS's own media are never served from `usercontent.b3os.org`, which holds customer bytes only).
next_cursor
string | null
REQUIRED
400
The request failed validation (`invalid_request`, `invalid_url`).
401
Missing, malformed, expired or revoked credentials (`unauthorized`).
403
Authenticated but not allowed (`forbidden`, `egress_denied`).
429
A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500
Something failed inside B3OS (`internal`). Retry with backoff.
503
The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X GET 'https://beta-api.b3os.org/v1/infer/audio/voices' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/infer/audio/voices', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/infer/audio/voices', headers=headers)print(response.json())
200
Response
{ "object": "list", "data": [ { "id": "af_heart", "object": "voice", "model": "kokoro-82m", "name": "Heart", "language": "en-US", "sample_url": "https://beta.b3os.org/assets/voices/af_heart.mp3" } ], "next_cursor": null}
API Playground
Try this endpoint
GET
/v1/infer/audio/voices