Skip to main content
POST
Synthesize speech
Synthesizes text with the given voice and returns the raw audio bytes in the response body. The voice must be enrolled (status ready).
Unlike the JSON endpoints, a successful response is the audio file itself - not a JSON envelope. Errors still return the standard envelope.

Authorization

string
required
Your workspace API key (flv_…).

Path parameters

string
required
The voice id.

Body

string
required
The text to synthesize. Maximum 10,000 characters. Billed per character against your plan’s monthly allowance; repeating an identical request (same voice, text, and parameters) is served from cache and not billed again.
string
BCP-47 language code (for example en, hi). Defaults to the voice’s primary language.
string
default:"wav"
Output encoding. One of wav, s16le, s24le, s32le, f32le, f64le. wav is a self-contained file; the s*/f* formats are raw, headerless PCM.
integer
default:24000
Output sample rate in Hz. Defaults to the provider’s native rate (24000); values above it are upsampled.
integer
default:32
Number of inference steps, 1–32 (a quality/latency trade-off). Provider default (32) if omitted.
number
Style/expressiveness control, 0.0–1.0. Provider default if omitted.

Response headers

string
The audio MIME type, e.g. audio/wav for output_format: wav.
string
The sample rate of the returned audio, in Hz (when reported by the provider).
string
A public URL to the stored audio file, when object storage is enabled. Useful for download/share.
string
Your remaining character allowance for the month (present when billing is active). An exhausted allowance returns 402 when enforcement is on - see Errors.
See Synthesize parameters for the full field reference.

Prompt

Copy this into your coding agent (Claude Code, Cursor, Codex…) to implement this endpoint.