Generate speech

post/audio/speech

Request

  • Base URL: https://www.ninjachat.ai/api/v1
  • URL: https://www.ninjachat.ai/api/v1/audio/speech
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Safely retry the same logical write without duplicate billing or execution.

Request body

model'tts-1' | 'tts-1-hd' required
inputstring required
voice'alloy' | 'ash' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer' required
response_format'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'
speednumber

Response

Binary audio. X-Request-ID and X-NinjaChat-Cost-USD identify the billed request. Buffered until successful generation so retries can safely replay.

Changes

No recorded changes to this operation across all 1 revision of this API.