OffRail
Features

Speech Generation

Generate speech through OffRail's OpenAI-compatible audio route.

Speech Generation

Create speech with POST /v1/audio/speech. Choose the current speech model and voice from the public catalogue.

Request

curl "https://api.offrail.ai/v1/audio/speech" \
  -H "Authorization: Bearer $OFFRAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\
    \"model\": \"$OFFRAIL_MODEL\",\
    \"input\": \"Say what should be spoken.\",\
    \"voice\": \"$OFFRAIL_VOICE\"\
  }" \
  --output speech.wav
FieldRequiredDescription
modelYesPublic speech model ID
inputYesText to synthesize
voiceYesVoice supported by the selected model
response_formatNoOutput format when the selected model supports it

The response body contains audio. Use the returned Content-Type instead of assuming a fixed format.

Speech pricing is model-specific. The public model page states whether usage is billed by character, token, second, or request.

See the speech API reference for the complete request and response schema.

On this page