Create speech

Synthesize speech from text and return the raw audio bytes, with the billed character count in the X-Merge-Billed-Characters header.

Authentication

AuthorizationBearer
Your production key sent as a bearer token.

Request

This endpoint expects an object.
modelstringRequired

Text-to-speech model, for example openai/tts-1.

inputstringRequired>=1 character
Text to synthesize.
customerstring or nullOptional

Customer ID (UUID) to scope this request to, applying that customer’s routing policy, provider keys, budget, and usage attribution.

vendorstring or nullOptional
Pin the vendor that runs this request.
voicestring or nullOptional

Voice ID, model-specific, for example alloy.

response_formatenum or nullOptional

Audio format; defaults to mp3.

speeddouble or nullOptional0.25-4
Playback speed, 0.25 to 4.
instructionsstring or nullOptional

Voice direction, model-specific.

Response

Audio bytes in the requested response_format (default mp3).

Errors

422
Unprocessable Entity Error