DocsGenerations
Generations
Generations API
Run speech generation jobs from text prompts, monitor created records, and fetch WAV output artifacts through signed delivery routes.
Tuning controls
| Field | Range | Guidance |
|---|---|---|
| temperature | 0-2 | Lower values keep output stable; higher values increase expressive variance. |
| top_p | 0-1 | Controls cumulative probability cutoff for token selection. |
| top_k | 1-10000 | Restricts candidate token set before sampling. |
| repetition_penalty | 1-2 | Reduces repetitive phrasing in generated speech output. |
Audio readiness behavior
Audio routes can return PRECONDITION_FAILED while output is not available. Handle 412 with polling or deferred retrieval.
GET
/api/v1/generationsAPI KeyList generation records for the authenticated org.
Response
| Field | Type | Required | Description |
|---|---|---|---|
| data[] | Generation | No | Generation metadata including audio_url convenience link. |
bashcURL2 lines
curl -X GET 'https://app.clariva.ai/api/v1/generations' \
-H 'Authorization: Bearer $CLARIVA_API_KEY'POST
/api/v1/generationsAPI KeyCreate a text-to-speech generation job.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | Input prompt between 1 and 5000 chars. |
| voice_id | string | Yes | Voice identifier from voices endpoints. |
| temperature | number | No | 0-2, default 0.8. |
| top_p | number | No | 0-1, default 0.95. |
| top_k | integer | No | 1-10000, default 1000. |
| repetition_penalty | number | No | 1-2, default 1.2. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| data | Generation | No | Created generation with id and audio_url. |
bashcURL11 lines
curl -X POST 'https://app.clariva.ai/api/v1/generations' \
-H 'Authorization: Bearer $CLARIVA_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"text": "Welcome to Clariva.",
"voice_id": "voi_01jv3q2w0f4m5myn4q1q8r1g8a",
"temperature": 0.8,
"top_p": 0.95,
"top_k": 1000,
"repetition_penalty": 1.2
}'jsonResponse8 lines
{
"data": {
"id": "gen_01jv3qfshm4z5ch9w7p7n2d6xa",
"voice_name": "Aaron",
"voice_id": "voi_01jv3q2w0f4m5myn4q1q8r1g8a",
"audio_url": "/api/v1/generations/gen_01jv3qfshm4z5ch9w7p7n2d6xa/audio"
}
}GET
/api/v1/generations/{generation_id}API KeyFetch one generation by id.
Response
| Field | Type | Required | Description |
|---|---|---|---|
| data | Generation | No | Generation detail record. |
bashcURL2 lines
curl -X GET 'https://app.clariva.ai/api/v1/generations/gen_123' \
-H 'Authorization: Bearer $CLARIVA_API_KEY'GET
/api/v1/generations/{generation_id}/audioAPI KeyStream generated audio as WAV.
Response
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | audio/wav | No | Returned for successful audio stream. |
| Cache-Control | private, max-age=3600 | No | Private cache for one hour. |
bashcURL3 lines
curl -X GET 'https://app.clariva.ai/api/v1/generations/gen_123/audio' \
-H 'Authorization: Bearer $CLARIVA_API_KEY' \
--output generation.wavLive API playground
In-browserRequests are executed from your browser and API keys stay in memory only.
GET
/api/v1/voices/systemPublic endpoint, no API key required.
Run a request to inspect status, headers, and payload.
Search documentation
Find pages, endpoints, and sections.