Sign in
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

FieldRangeGuidance
temperature0-2Lower values keep output stable; higher values increase expressive variance.
top_p0-1Controls cumulative probability cutoff for token selection.
top_k1-10000Restricts candidate token set before sampling.
repetition_penalty1-2Reduces 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 Key

List generation records for the authenticated org.

Response

FieldTypeRequiredDescription
data[]GenerationNoGeneration 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 Key

Create a text-to-speech generation job.

Request Body

FieldTypeRequiredDescription
textstringYesInput prompt between 1 and 5000 chars.
voice_idstringYesVoice identifier from voices endpoints.
temperaturenumberNo0-2, default 0.8.
top_pnumberNo0-1, default 0.95.
top_kintegerNo1-10000, default 1000.
repetition_penaltynumberNo1-2, default 1.2.

Response

FieldTypeRequiredDescription
dataGenerationNoCreated 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 Key

Fetch one generation by id.

Response

FieldTypeRequiredDescription
dataGenerationNoGeneration 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 Key

Stream generated audio as WAV.

Response

FieldTypeRequiredDescription
Content-Typeaudio/wavNoReturned for successful audio stream.
Cache-Controlprivate, max-age=3600NoPrivate 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.wav

Live API playground

In-browser

Requests are executed from your browser and API keys stay in memory only.

GET/api/v1/voices/system

Public endpoint, no API key required.

Run a request to inspect status, headers, and payload.

Search documentation

Find pages, endpoints, and sections.