TL;DR โ Switch in Under 15 Minutes
- Drop the elevenlabs SDK โ use the OpenAI SDK's audio.speech API
- ElevenLabs voice IDs are mapped to Railwail voice slugs (Rachel โ eleven-rachel, etc.)
- Multilingual v3, Turbo v2.5, Flash v2 models all supported
- EU-hosted endpoint, EUR billing
- Plus access to OpenAI TTS, Bark, and 275+ other models on the same key
Why Move Off ElevenLabs?
ElevenLabs is the gold standard for realistic TTS. The trade-offs for EU teams: USD-only billing, US-default routing, no EU residency guarantee on the free / starter tiers, and a proprietary SDK that does not match the rest of your AI stack. Railwail exposes ElevenLabs voices through the OpenAI-compatible audio.speech API, with EU hosting and EUR billing.
Step 1 โ Get a Railwail API Key
Sign up at railwail.com and generate a key.
Sponsored
Access 100+ AI Models with One API Key
GPT-4o, Claude, Gemini, Llama, Flux, DALL-E and more โ all through a single, OpenAI-compatible endpoint. No more juggling multiple providers.
Step 2 โ Voice ID Mapping
ElevenLabs uses 20-character voice IDs like 21m00Tcm4TlvDq8ikWAM. Railwail uses human-readable slugs prefixed with eleven-. All public ElevenLabs voices have a Railwail equivalent.
ElevenLabs voice ID โ Railwail voice slug
| ElevenLabs ID | ElevenLabs name | Railwail voice slug |
|---|---|---|
| 21m00Tcm4TlvDq8ikWAM | Rachel | eleven-rachel |
| AZnzlk1XvdvUeBnXmlld | Domi | eleven-domi |
| EXAVITQu4vr4xnSDxMaL | Sarah | eleven-sarah |
| ErXwobaYiN019PkySvjV | Antoni | eleven-antoni |
| MF3mGyEYCl7XYWbV9V6O | Elli | eleven-elli |
| TxGEqnHWrfWFTfGW9XjX | Josh | eleven-josh |
| VR6AewLTigWG4xSOukaG | Arnold | eleven-arnold |
| pNInz6obpgDQGcFmaJgB | Adam | eleven-adam |
| yoZ06aMxZJJ28mfd3POQ | Sam | eleven-sam |
For custom voices (Voice Lab clones), pass the original ElevenLabs voice ID directly โ Railwail recognises 20-char IDs and routes them through to your ElevenLabs Voice Lab account (requires you to link the account in Railwail dashboard).
Step 3 โ Replace the SDK Call
TypeScript / JavaScript
Before (ElevenLabs):
import { ElevenLabsClient } from "elevenlabs";
const el = new ElevenLabsClient({ apiKey: process.env.ELEVENLABS_API_KEY });
const audio = await el.generate({
voice: "Rachel",
text: "Hello world",
model_id: "eleven_multilingual_v3",
});
// audio is a Readable streamAfter (Railwail):import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.RAILWAIL_API_KEY,
baseURL: "https://api.railwail.com/v1",
});
const res = await client.audio.speech.create({
model: "eleven-multilingual-v3",
voice: "eleven-rachel",
input: "Hello world",
response_format: "mp3",
});
const buffer = Buffer.from(await res.arrayBuffer());
require("fs").writeFileSync("out.mp3", buffer);Python
from openai import OpenAI
client = OpenAI(
api_key=os.environ["RAILWAIL_API_KEY"],
base_url="https://api.railwail.com/v1",
)
with client.audio.speech.with_streaming_response.create(
model="eleven-multilingual-v3",
voice="eleven-rachel",
input="Hello world",
response_format="mp3",
) as resp:
resp.stream_to_file("out.mp3")cURL
curl https://api.railwail.com/v1/audio/speech \
-H "Authorization: Bearer $RAILWAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "eleven-multilingual-v3",
"voice": "eleven-rachel",
"input": "Hello world",
"response_format": "mp3"
}' \
-o out.mp3API Endpoint Mapping
ElevenLabs endpoint โ Railwail equivalent
| ElevenLabs | Railwail | Notes |
|---|---|---|
| POST /v1/text-to-speech/{voice_id} | POST /v1/audio/speech | Pass voice in body |
| POST /v1/text-to-speech/{voice_id}/stream | POST /v1/audio/speech (stream=true) | SSE chunks |
| POST /v1/speech-to-text | POST /v1/audio/transcriptions | Use whisper or scribe |
| GET /v1/voices | GET /v1/voices?provider=elevenlabs | List ElevenLabs voices |
| POST /v1/voice-generation/generate-voice | Not supported โ use ElevenLabs Voice Lab directly | Voice cloning |
Sponsored
Test Any AI Model Instantly
Our built-in playground lets you compare models side by side. Find the perfect model for your use case in minutes, not days.
Model Mapping
ElevenLabs model โ Railwail
| ElevenLabs | Railwail | Notes |
|---|---|---|
| eleven_multilingual_v3 | eleven-multilingual-v3 | Best quality, 70+ languages |
| eleven_multilingual_v2 | eleven-multilingual-v2 | Legacy |
| eleven_turbo_v2_5 | eleven-turbo-v2-5 | Low latency |
| eleven_flash_v2_5 | eleven-flash-v2-5 | Fastest |
| eleven_english_v1 | eleven-english-v1 | Legacy EN-only |
| scribe_v1 | scribe-v1 | STT |
Pricing Comparison (per 1k characters, May 2026)
Same model and voice, Railwail in EUR
| Model | ElevenLabs (USD) | Railwail (EUR) | Notes |
|---|---|---|---|
| eleven-multilingual-v3 | $0.30 per 1k chars | EUR 0.28 | Identical |
| eleven-turbo-v2-5 | $0.15 per 1k chars | EUR 0.14 | Identical |
| eleven-flash-v2-5 | $0.05 per 1k chars | EUR 0.046 | Identical |
| scribe-v1 per minute STT | $0.40 | EUR 0.37 | Identical |
Why Railwail Over ElevenLabs Direct
- EU billing in EUR with VAT receipts
- Same ElevenLabs voices at same prices
- OpenAI-compatible audio.speech API โ unify with your text/image/STT stack
- Plus alternative TTS providers (OpenAI TTS, Bark, Coqui XTTS) on the same key
- Built-in playground at railwail.com/models for voice preview
- Per-key character quotas
Sponsored
Pay Only for What You Use
Transparent per-token pricing with no monthly minimums. Start with free credits and scale as you grow.
FAQ
Can I use my custom Voice Lab clones?
Yes. Link your ElevenLabs account in the Railwail dashboard (Settings โ Linked Accounts โ ElevenLabs), then pass your custom voice_id (20-char string) instead of a Railwail slug. Cost is billed by ElevenLabs through Railwail at cost-pass-through pricing.
Are stability and similarity_boost controls preserved?
Yes. Pass voice_settings: { stability: 0.5, similarity_boost: 0.75, style: 0.0, use_speaker_boost: true } as an extension parameter.
What audio formats are returned?
response_format supports mp3 (default), pcm_16000, pcm_22050, pcm_24000, pcm_44100, ulaw_8000, opus.
Is streaming supported?
Yes. Pass stream: true to receive audio chunks as they generate, which is critical for real-time apps like voice agents.
What about ElevenLabs Conversational AI / agents?
ElevenLabs' Conversational AI is a full agent product, not exposed via Railwail. For equivalent functionality, build a custom agent using Railwail's chat.completions + audio.speech + audio.transcriptions endpoints.
Is dubbing / audio-to-audio supported?
ElevenLabs Dubbing is a separate product. For dubbing workflows, transcribe with Railwail's audio.transcriptions, translate with chat.completions, then re-synthesise with audio.speech.
Next Steps
- Sign up at railwail.com
- Generate an API key
- Replace elevenlabs SDK with OpenAI SDK
- Map voice IDs to Railwail slugs (eleven-rachel etc.)
- Read the reference at railwail.com/docs
- Browse voices at railwail.com/models?category=speech_tts
- Compare pricing at railwail.com/pricing