Skip to content

Developers

One body. A project key. A complete WAV.

Your application calls /v1/audio/speech. The console session cannot stand in for that key. An idempotency key makes a repeat of the same request a replay, not a second charge.

curl --fail --silent --show-error https://api.timbrelay.com/v1/audio/speech \
  -H "Authorization: Bearer $TIMBRELAY_PROJECT_KEY" \
  -H "Idempotency-Key: ${TIMBRELAY_REQUEST_ID:?Set a stable ID for this action}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cosyvoice3",
    "voice": "voice_preset_en_5639",
    "input": "Welcome. It is good to have you here.",
    "response_format": "wav"
  }' --dump-header speech.headers --output speech.response

# Before using speech.response as WAV, verify HTTP 200, audio/wav,
# and X-Timbrelay-Watermark: applied in speech.headers.

Preview of the program request. The host comes from this environment’s API origin. Set TIMBRELAY_REQUEST_ID to a new stable ID for each action; keep it and the exact input for retries. Changing model or text starts a new action. It uses a project key, never a console session. Voice presets are shared IDs; send one the selected model accepts. Open API test

What stays

Authorization, path, content type, idempotency, and the four body fields.

What changes

The model id, and the preset if the one you were using is not enabled for that model.

What to try

Playground is free. API test sends a paid program request with a key that stays in page memory.