Text to Speech
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
TTS model in provider/model format.
sarvam/bulbul:v2The text to convert to speech.
The quick brown fox.Model-specific (e.g. Sarvam). BCP-47 language code of the output speech (e.g. en-IN, hi-IN).
en-INModel-specific (e.g. Sarvam). The speaker voice to use.
anushkaModel-specific (e.g. Sarvam). Adjusts the pitch of the generated speech.
Model-specific (e.g. Sarvam). Adjusts the speed of the speech (e.g. 0.5x to 2.0x).
1Model-specific (e.g. Sarvam). Adjusts the loudness of the generated speech.
Model-specific (e.g. Sarvam). Output audio sample rate in Hz.
22050Model-specific (e.g. Sarvam). Enables text normalization / preprocessing before synthesis.
Model-specific (e.g. Sarvam). The audio codec/format of the response.
Model-specific. Sampling temperature for generation.
Model-specific (e.g. Sarvam). Allows returning a cached response for identical requests.
The generated speech. Returns a JSON object containing the base64-encoded audio (not a raw binary stream).
Array of base64-encoded audio clips (WAV). Usually one entry.
The model used to generate the audio.
sarvam/bulbul:v2The upstream provider that served the request.
sarvamBad Request - The request is malformed. This could be due to missing parameters, invalid formats, or routing errors.
Note: the 400 body shape is not uniform. Validation errors return the structured object below, but routing/model errors may instead return a plain string: { "error": "<message>" }. A few endpoints (e.g. some file operations) may return a plain-text body rather than JSON.
Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.
Note: the 401 error body uses code, message, param, and type (there is no status field), and type is invalid_request_error.
Insufficient Credits - Your account or API key has run out of credits. Add more credits and retry the request.
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Server Error
Last updated
