ElevenLabs audio media provider (ADR-016). NOT an LLM — media only.
Official API (https://api.elevenlabs.io). All three capabilities are SYNC endpoints that
return audio bytes directly (no job/polling), so every declared modality is :sync and
generate_media/2 returns the shared {:ok, %{data, mime, meta}} contract:
- speech -
POST /v1/text-to-speech/{voice_id}(modeleleven_multilingual_v2, output formatmp3_44100_128; voice defaults to Rachel and comes fromreq.settings[:voice_id]/[:voice]) - sfx -
POST /v1/sound-generation(duration_seconds,prompt_influenceknobs; alwaysaudio/mpeg) - music -
POST /v1/music/compose(modelmusic_v1default — pass"music_v2"explicitly for the current generation;music_length_ms,force_instrumental)
Auth is the xi-api-key header (NOT Bearer). Key resolution: req.api_key first, then
ELEVENLABS_API_KEY; missing keys fast-fail {:error, :missing_api_key}. base_url is
overridable via config :genai, :eleven_labs, base_url: "...".
Summary
Functions
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7.
Return config_key inference provide application config stored under :genai entry
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
Prepare endpoint and method to make inference call to
Prepare request headers
Prepare request body to be passed to inference call.
Build and run inference thread
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1.
Build and run inference thread in streaming mode
Functions
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7.
Return config_key inference provide application config stored under :genai entry
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
Prepare endpoint and method to make inference call to
Prepare request headers
Prepare request body to be passed to inference call.
Build and run inference thread
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1.
Build and run inference thread in streaming mode