Skip to content

Type to search the docs and the model list.

Audio

Music and sound effects, speech, and transcription.

Music and sound

POST /v1/audio/generations with model, prompt and, where the model allows it, duration (seconds), instrumental or loop. It runs as a job, exactly like video: follow /v1/jobs/{id}/events, poll, or pass a webhook_url. The finished MP3 is on cdn.ewest.ai for 7 days.

# 1. Create the job
curl https://api.ewest.ai/v1/audio/generations \
  -H "Authorization: Bearer $EWEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ewest/eleven-music-v2.5", "prompt": "upbeat lo-fi beat with warm piano", "duration": 30}'
# → 202 {"id": "job_…", "type": "audio", "status": "queued", "progress": 0, …}

# 2. Follow it (Server-Sent Events), or poll GET /v1/jobs/job_…
curl -N https://api.ewest.ai/v1/jobs/job_…/events -H "Authorization: Bearer $EWEST_KEY"
# → … "output": {"url": "https://cdn.ewest.ai/aud/….mp3"}

Speech

POST /v1/audio/speech with model, input (the text) and voice returns the audio file, like OpenAI's API. Voices differ per model (see the model page). With "response_format": "url" you get a cdn.ewest.ai link instead, kept for 7 days.

curl https://api.ewest.ai/v1/audio/speech \
  -H "Authorization: Bearer $EWEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ewest/eleven-v4-turbo", "input": "Welcome to eWest."}' \
  --output speech.audio

# Add "response_format": "url" to get {"url": "https://cdn.ewest.ai/aud/…"} instead of the bytes.

Transcription

POST /v1/audio/transcriptions takes an audio file (multipart, up to 25 MB and 20 minutes) or a public audio_url in JSON. response_format is json (default), text or verbose_json (language, duration and word timestamps where the model provides them). The file must be mp3, wav, m4a, ogg, flac or webm; Files lists the errors for files that are too big, too long or in another format.

curl https://api.ewest.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $EWEST_KEY" \
  -F model=ewest/scribe-v2 \
  -F file=@meeting.mp3 \
  -F response_format=verbose_json

# → {"text": "…", "language": "en", "duration": 92.4, "words": [{"word": "Hello", "start": 0.1, "end": 0.4}, …]}