AniwaffleDocsHomeStudio

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:

SettingValue
Base URLhttps://aniwaffle.com/v1
API keyYour Aniwaffle key, awp_...
VoiceAn 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

FieldTypeRequiredDescription
inputstringYesThe text to speak, 1–20,000 characters, including any tags.
voicestringYesAn Aniwaffle voice ID. OpenAI voice names such as alloy are not available.
response_formatstringNoSee Formats. Defaults to mp3.
modelstringNoA Waffle model ID, such as waffle:0.1-stereo-beta. Other values use Waffle Mono.
speed, instructionsNoIgnored. Use tags in input to direct the delivery.

Formats

response_formatYou receiveContent-Type
mp3, wav, flac, opus, or omittedWAV, 16-bit PCM, 48 kHz, mono or stereoaudio/wav
pcmRaw PCM, signed 16-bit little-endian, 24 kHz, no headeraudio/pcm;rate=24000;channels=N
aacAAC, 128 kbps, 44.1 kHz. Waffle Mono onlyaudio/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.wav

Errors use the same shape and codes as the rest of the API. See Errors.

Talk to our team

Tell us what you’re building. We’ll follow up by email.