Text to Speech
Get batch
Retrieve a batch with the status, audio URL and cost of every item.
GEThttps://api.voice.wistfare.com/v1/batches/{id}
Returns a batch and its items. Poll it until status is no longer processing. Read-only keys can call it.
from wistfareai import WistfareAI
client = WistfareAI() # reads WISTFARE_API_KEY
batch = client.text_to_speech.batches.get("batch_4d81f7")
print(batch.status, batch.totals)
# Or poll until it finishes:
batch = client.text_to_speech.batches.wait("batch_4d81f7")Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The batch id, batch_…. |
Response
200 OK:
{
"id": "batch_4d81f7",
"status": "completed",
"created_at": "2026-10-11T08:15:00Z",
"completed_at": "2026-10-11T08:16:42Z",
"items": [
{
"ref": "welcome",
"status": "succeeded",
"audio_url": "/v1/batches/batch_4d81f7/items/welcome/audio",
"seconds": 2.1,
"cost_cents": 1,
"error": null
},
{
"ref": "menu-1",
"status": "succeeded",
"audio_url": "/v1/batches/batch_4d81f7/items/menu-1/audio",
"seconds": 3.4,
"cost_cents": 1,
"error": null
}
],
"totals": { "succeeded": 2, "failed": 0, "audio_seconds": 5.5, "cost_cents": 2 }
}| Field | Type | Description |
|---|---|---|
status | string | processing, completed (all succeeded), partial (some failed) or failed (all failed). |
completed_at | string | null | When the batch finished. |
items[].ref | string | Your item id. |
items[].status | string | pending, processing, succeeded or failed. |
items[].audio_url | string | null | Path of the item's audio once it succeeded. Fetch it with your API key. |
items[].seconds | number | null | Duration of the generated audio. |
items[].cost_cents | integer | null | What the item cost. |
items[].error | object | null | {code, message} for failed items, which cost nothing. |
totals | object | succeeded, failed, audio_seconds and cost_cents across the batch. |
Errors
| Status | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing, invalid or revoked API key. |
404 | not_found | No batch with this id in the key's project. |