Generate speech

Batch and Fast return the canonical MP3 response. Streaming returns progressive audio/pcm (pcm_24000) only.

post/v1/text-to-speech

Request

  • Base URL: https://giggy.ai
  • URL: https://giggy.ai/v1/text-to-speech
  • Auth: API key in header xi-api-key

Query parameters

optimize_streaming_latencyinteger nullable

Deprecated compatibility parameter. It is accepted only when mode=streaming and does not alter inference or streaming latency.

Headers

Idempotency-Keystring

Retry-safe operation key scoped to the calling API key.

Request body

textstring required

Supported Unicode speech text. Fast and Streaming accept up to 20,000 Unicode code points; Batch accepts up to 1,250. Emoji are not accepted.

voice_idstring uuid required

A voice_id returned by /v1/voices or /v1/my-voices.

model_idstring

Accepted for compatibility only; it does not select or otherwise affect GiggySpeech inference.

mode'batch' | 'fast' | 'streaming'

Selects Batch, Fast, or Streaming generation. Defaults to Fast when omitted.

output_format'mp3_24000_160' | 'pcm_24000'

Streaming defaults to pcm_24000 and accepts only PCM16 LE, 24 kHz mono. Fast and Batch default to mp3_24000_160 and accept only MP3.

language_codestring nullable

Must match the selected voice language; it does not override that language.

pronunciation_dictionary_locatorsobject[] nullable

Accepted for compatibility only; it has no effect on GiggySpeech inference.

seedinteger nullable

If omitted or null, the server selects a seed for this generation. Retries with the same Idempotency-Key retain the same seed.

previous_textstring nullable

Accepted for compatibility only; it has no effect on GiggySpeech inference.

next_textstring nullable

Accepted for compatibility only; it has no effect on GiggySpeech inference.

previous_request_idsstring[] nullable

Accepted for compatibility only; it has no effect on GiggySpeech inference.

next_request_idsstring[] nullable

Accepted for compatibility only; it has no effect on GiggySpeech inference.

apply_text_normalization'auto' | 'on' | 'off'

Accepted for compatibility only; it has no effect on GiggySpeech inference.

apply_language_text_normalizationboolean

Accepted for compatibility only; it has no effect on GiggySpeech inference.

use_pvc_as_ivcboolean

Accepted for compatibility only; it has no effect on GiggySpeech inference.

Response

Batch and Fast return completed audio/mpeg. Streaming returns progressive audio/pcm only.

Changes

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