Migrate from ElevenLabs to Railwail
Migration Guides

Migrate from ElevenLabs to Railwail

Switch from ElevenLabs to Railwail. Same Multilingual v3, Turbo v2.5 and Flash v2 voices, OpenAI-compatible TTS API, EU hosting, EUR billing, 275+ models on one key.

Railwail Teamยท Developer Relations8 min readMay 16, 2026

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 IDElevenLabs nameRailwail voice slug
21m00Tcm4TlvDq8ikWAMRacheleleven-rachel
AZnzlk1XvdvUeBnXmlldDomieleven-domi
EXAVITQu4vr4xnSDxMaLSaraheleven-sarah
ErXwobaYiN019PkySvjVAntonieleven-antoni
MF3mGyEYCl7XYWbV9V6OEllieleven-elli
TxGEqnHWrfWFTfGW9XjXJosheleven-josh
VR6AewLTigWG4xSOukaGArnoldeleven-arnold
pNInz6obpgDQGcFmaJgBAdameleven-adam
yoZ06aMxZJJ28mfd3POQSameleven-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 stream
After (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.mp3

API Endpoint Mapping

ElevenLabs endpoint โ†’ Railwail equivalent

ElevenLabsRailwailNotes
POST /v1/text-to-speech/{voice_id}POST /v1/audio/speechPass voice in body
POST /v1/text-to-speech/{voice_id}/streamPOST /v1/audio/speech (stream=true)SSE chunks
POST /v1/speech-to-textPOST /v1/audio/transcriptionsUse whisper or scribe
GET /v1/voicesGET /v1/voices?provider=elevenlabsList ElevenLabs voices
POST /v1/voice-generation/generate-voiceNot supported โ€” use ElevenLabs Voice Lab directlyVoice 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

ElevenLabsRailwailNotes
eleven_multilingual_v3eleven-multilingual-v3Best quality, 70+ languages
eleven_multilingual_v2eleven-multilingual-v2Legacy
eleven_turbo_v2_5eleven-turbo-v2-5Low latency
eleven_flash_v2_5eleven-flash-v2-5Fastest
eleven_english_v1eleven-english-v1Legacy EN-only
scribe_v1scribe-v1STT

Pricing Comparison (per 1k characters, May 2026)

Same model and voice, Railwail in EUR

ModelElevenLabs (USD)Railwail (EUR)Notes
eleven-multilingual-v3$0.30 per 1k charsEUR 0.28Identical
eleven-turbo-v2-5$0.15 per 1k charsEUR 0.14Identical
eleven-flash-v2-5$0.05 per 1k charsEUR 0.046Identical
scribe-v1 per minute STT$0.40EUR 0.37Identical

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

Railwail Team

Developer Relations

The Railwail team writes integration guides for developers migrating from single-provider AI APIs to a unified multi-model platform.

Tags:
ElevenLabs
Migration
TTS
Text to Speech
Voice