Migrate from Azure OpenAI to Railwail
Migration Guides

Migrate from Azure OpenAI to Railwail

Switch from Azure OpenAI Service to Railwail. Drop deployment names, just use model IDs. Same GPT-4o and embeddings, EU hosting, EUR billing, 275+ models on one key.

Railwail Teamยท Developer Relations9 min readMay 16, 2026

TL;DR โ€” Switch in Under 10 Minutes

  • No Azure subscription, no resource creation, no deployment names โ€” just API keys
  • Replace /openai/deployments/{deployment}/chat/completions with /v1/chat/completions
  • Use model IDs (gpt-4o) instead of deployment names (my-gpt4o-deployment)
  • Drop api-version query param โ€” Railwail uses semantic versioning
  • EU hosting on demand, EUR billing, plus 274 non-OpenAI models on the same key

Why Move Off Azure OpenAI?

Azure OpenAI is the enterprise-grade way to use GPT-4o with Microsoft compliance guarantees. The friction: each model requires a separate Azure deployment (with quotas to request), API versions to track, endpoint URLs that bake in your resource name, and a Microsoft-flavoured SDK path. If your team does not need the full Azure stack (Entra ID integration, VNet, Private Link), Railwail offers a simpler unified 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 โ€” Switch from Deployment Names to Model IDs

Azure forces you to create a 'deployment' for each model variant and refer to it by your chosen deployment name. Railwail uses standard OpenAI model IDs โ€” no deployments to provision.

TypeScript / JavaScript

Before (Azure OpenAI):

import { AzureOpenAI } from "openai";

const azure = new AzureOpenAI({
  apiKey: process.env.AZURE_OPENAI_API_KEY,
  endpoint: "https://my-resource.openai.azure.com",
  apiVersion: "2025-01-01",
  deployment: "my-gpt4o-deployment",
});

const res = await azure.chat.completions.create({
  model: "my-gpt4o-deployment",  // Same as deployment name
  messages: [{ role: "user", content: "Hello" }],
});
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.chat.completions.create({
  model: "gpt-4o",  // Real model ID, no deployment name
  messages: [{ role: "user", content: "Hello" }],
});

Python

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["RAILWAIL_API_KEY"],
    base_url="https://api.railwail.com/v1",
)

resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

cURL โ€” Side-by-Side

Before (Azure):

curl https://my-resource.openai.azure.com/openai/deployments/my-gpt4o-deployment/chat/completions?api-version=2025-01-01 \
  -H "api-key: $AZURE_OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Hello"}]}'
After (Railwail):
curl https://api.railwail.com/v1/chat/completions \
  -H "Authorization: Bearer $RAILWAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}'
Notice the URL is no longer parameterised by resource and deployment, and you use the standard Authorization: Bearer header instead of api-key.

API Endpoint Mapping

Azure OpenAI endpoint โ†’ Railwail equivalent

Azure OpenAIRailwailNotes
POST /openai/deployments/{d}/chat/completionsPOST /v1/chat/completionsmodel in body, not URL
POST /openai/deployments/{d}/completionsPOST /v1/completionsLegacy
POST /openai/deployments/{d}/embeddingsPOST /v1/embeddingsmodel in body
POST /openai/deployments/{d}/images/generationsPOST /v1/images/generationsDALL-E
POST /openai/deployments/{d}/audio/speechPOST /v1/audio/speechTTS
POST /openai/deployments/{d}/audio/transcriptionsPOST /v1/audio/transcriptionsWhisper
GET /openai/models?api-version=...GET /v1/modelsAll models, no api-version
POST /openai/deployments/{d}/extensions/chat/completionsPOST /v1/chat/completionsUse standard tools array

Model Mapping

Replace whatever Azure deployment name you used with the canonical OpenAI model ID.

Azure deployment (or upstream model) โ†’ Railwail

Azure model variantRailwailNotes
gpt-4o (Standard)gpt-4oSame model
gpt-4o (Global Standard)gpt-4oSame
gpt-4o (DataZone EU)gpt-4o + region=euPin to EU
gpt-4o-minigpt-4o-miniSame
gpt-4-turbogpt-4-turboSame
o1-preview / o1-minio1-preview / o1-miniSame
text-embedding-3-small / largetext-embedding-3-small / largeSame
dall-e-3dall-e-3Same
whisperwhisper-1Same
tts-1, tts-1-hdtts-1, tts-1-hdSame

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.

Pricing Comparison (per 1M tokens, May 2026)

Same OpenAI model on both platforms

ModelAzure OpenAI (USD)Railwail (EUR)Notes
gpt-4o input (Standard)$2.50EUR 2.30Same
gpt-4o output (Standard)$10.00EUR 9.20Same
gpt-4o-mini input$0.15EUR 0.14Same
gpt-4o input (DataZone EU)$2.50 + datazone premiumEUR 2.30Cheaper on Railwail
text-embedding-3-small$0.02EUR 0.018Same
o1-preview input$15.00EUR 13.80Same

For most teams, the cost difference is the FX and Azure's data-zone premium. Railwail's EU-pinned routing is included in the base price.

Why Railwail Over Azure OpenAI

  • No Azure subscription, no resource provisioning
  • No deployment names โ€” just model IDs
  • No api-version query string to track
  • Single OpenAI-style SDK across all models
  • Plus access to Claude, Gemini, Llama, Mistral, DeepSeek โ€” Azure OpenAI is OpenAI-only
  • EUR billing with VAT receipts
  • EU-pinned hosting available without paying Azure's DataZone premium
  • Same content moderation pre-filter โ€” Azure's mandatory filter is matched by Railwail's optional /v1/moderations

FAQ

Do I lose Azure's data zone / EU residency guarantees?

No. Pass region: 'eu' as an extension parameter (or set it per-key in the dashboard) to pin GPT-4o calls to EU inference regions. The underlying model runs on the same Microsoft-managed Azure EU regions.

What about Entra ID / managed identity authentication?

Railwail uses API keys with optional IP allowlisting. For Entra-style federation, contact enterprise@railwail.com โ€” SAML and OIDC for the dashboard are available on enterprise plans.

Can I use Azure-on-your-data (AOAI extensions / RAG with Azure Search)?

Azure-on-your-data is an Azure-proprietary extension. Railwail supports stateless retrieval โ€” pass your retrieved documents in the system or user message yourself. This is more portable and works with any vector store (pgvector, Pinecone, Qdrant).

Are content filters configurable?

Railwail does not apply mandatory pre-filtering. Use POST /v1/moderations explicitly to filter input or output. This gives you more control than Azure's per-deployment filter levels.

What about Provisioned Throughput Units (PTUs)?

PTU-style dedicated capacity for high-volume workloads is available on Railwail Enterprise plans. Contact enterprise@railwail.com for capacity reservations.

Are Azure Cognitive Services / Speech / Vision migrated too?

Azure Cognitive Services (Speech-to-Text, Translator, Document Intelligence) are not part of Azure OpenAI โ€” those are separate Azure products. Railwail offers Whisper STT, OpenAI TTS, ElevenLabs TTS, and document OCR equivalents.

Sponsored

Pay Only for What You Use

Transparent per-token pricing with no monthly minimums. Start with free credits and scale as you grow.

Next Steps

  • Sign up at railwail.com
  • Generate an API key
  • Replace AzureOpenAI client with OpenAI client (still openai package)
  • Replace deployment names with model IDs (my-gpt4o-deployment โ†’ gpt-4o)
  • Drop apiVersion and endpoint params
  • Read the reference at railwail.com/docs
  • Compare pricing at railwail.com/pricing
  • View provider catalog at railwail.com/providers

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:
Azure OpenAI
Migration
GPT-4o
Azure AI
Enterprise