Integrations
OpenAI-compatible speech
Use Aniwaffle in any tool or SDK that lets you set a custom base URL for OpenAI text-to-speech.
Overview
POST /v1/audio/speech takes the same request body as OpenAI's speech endpoint. To switch an existing integration to Aniwaffle, change three settings:
| Setting | Value |
|---|---|
| Base URL | https://aniwaffle.com/v1 |
| API key | Your Aniwaffle key, awp_... |
| Voice | An Aniwaffle voice ID from GET /v1/voices |
For a model, use waffle:0.1-stereo-beta to get stereo. Any other value, such as tts-1, uses Waffle Mono. Credits and usage are the same as for Generate speech.
Request
POSThttps://aniwaffle.com/v1/audio/speech
Body
| Field | Type | Required | Description |
|---|---|---|---|
input | string | Yes | The text to speak, 1–20,000 characters, including any tags. |
voice | string | Yes | An Aniwaffle voice ID. OpenAI voice names such as alloy are not available. |
response_format | string | No | See Formats. Defaults to mp3. |
model | string | No | A Waffle model ID, such as waffle:0.1-stereo-beta. Other values use Waffle Mono. |
speed, instructions | No | Ignored. Use tags in input to direct the delivery. |
Formats
response_format | You receive | Content-Type |
|---|---|---|
mp3, wav, flac, opus, or omitted | WAV, 16-bit PCM, 48 kHz, mono or stereo | audio/wav |
pcm | Raw PCM, signed 16-bit little-endian, 24 kHz, no header | audio/pcm;rate=24000;channels=N |
aac | AAC, 128 kbps, 44.1 kHz. Waffle Mono only | audio/aac |
Waffle does not encode MP3, FLAC or Opus, so those requests return WAV. Browsers and media players read the format from the file itself, so a WAV saved as speech.mp3 still plays.
Example
curl https://aniwaffle.com/v1/audio/speech \
--fail-with-body \
--header "Authorization: Bearer $ANIWAFFLE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "waffle",
"input": "<happy>Welcome back!</happy> Your order shipped today.",
"voice": "'"$ANIWAFFLE_VOICE_ID"'",
"response_format": "wav"
}' \
--output speech.wavErrors use the same shape and codes as the rest of the API. See Errors.