Migrate from DeepInfra to Railwail
Migration Guides

Migrate from DeepInfra to Railwail

Switch from DeepInfra to Railwail. Same OpenAI-compatible API, same hosted Llama / Mixtral / DeepSeek / Flux, EU hosting, EUR billing, 275+ models on one key.

Railwail Teamยท Developer Relations7 min readMay 16, 2026

TL;DR โ€” Switch in Under 5 Minutes

  • DeepInfra is already OpenAI-compatible โ€” change baseURL only
  • All major open models mirrored: Llama 3.3, Mixtral, Qwen 2.5, DeepSeek V3 / R1
  • Image, audio, embeddings โ€” all supported
  • EU-hosted endpoint, EUR billing
  • Plus closed-source Claude, GPT-4o, Gemini behind the same key

Why Move Off DeepInfra?

DeepInfra is competitive on price for hosted open-source models. The trade-offs: US-default routing, USD-only billing, no closed-source frontier models, and a smaller image / audio catalog than Railwail. Migrating is essentially a baseURL change.

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 โ€” Change Base URL

TypeScript / JavaScript

Before (DeepInfra):

import OpenAI from "openai";

const di = new OpenAI({
  apiKey: process.env.DEEPINFRA_API_KEY,
  baseURL: "https://api.deepinfra.com/v1/openai",
});

const res = await di.chat.completions.create({
  model: "meta-llama/Meta-Llama-3.3-70B-Instruct",
  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: "llama-3.3-70b-instruct",
  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="llama-3.3-70b-instruct",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

cURL

curl https://api.railwail.com/v1/chat/completions \
  -H "Authorization: Bearer $RAILWAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama-3.3-70b-instruct",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

API Endpoint Mapping

DeepInfra endpoint โ†’ Railwail equivalent

DeepInfraRailwailNotes
POST /v1/openai/chat/completionsPOST /v1/chat/completionsIdentical
POST /v1/openai/embeddingsPOST /v1/embeddingsIdentical
POST /v1/inference/{model}Use OpenAI-shaped endpointsLegacy DeepInfra path
POST /v1/openai/audio/transcriptionsPOST /v1/audio/transcriptionsWhisper
POST /v1/openai/images/generationsPOST /v1/images/generationsFlux, SDXL
GET /v1/openai/modelsGET /v1/models275+ models

Model Mapping

DeepInfra model โ†’ Railwail

DeepInfraRailwailNotes
meta-llama/Meta-Llama-3.3-70B-Instructllama-3.3-70b-instructLlama 3.3
meta-llama/Meta-Llama-3.1-405B-Instructllama-3.1-405b-instructLargest
mistralai/Mixtral-8x7B-Instruct-v0.1mixtral-8x7b-instructMoE
Qwen/Qwen2.5-72B-Instructqwen2.5-72b-instructAlibaba
deepseek-ai/DeepSeek-V3deepseek-v3Frontier MoE
deepseek-ai/DeepSeek-R1deepseek-r1Reasoning
black-forest-labs/FLUX-1-schnellflux-schnellImage
stabilityai/sd3.5-largestable-diffusion-3.5-largeImage

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 model, Railwail in EUR

ModelDeepInfra (USD)Railwail (EUR)Notes
llama-3.3-70b-instruct$0.40 / $0.40EUR 0.37 / 0.37Input/output
llama-3.1-405b-instruct$2.50 / $3.50EUR 2.30 / 3.22Input/output
mixtral-8x7b-instruct$0.24 / $0.24EUR 0.22 / 0.22Identical
deepseek-v3$0.49 / $0.89EUR 0.45 / 0.82Input/output
flux-schnell per image$0.003EUR 0.0028Identical

Why Railwail Over DeepInfra

  • EU billing in EUR with VAT receipts
  • Frankfurt-region hosting for low EU latency
  • Same OpenAI-compatible API
  • Adds closed-source models (Claude, GPT-4o, Gemini)
  • Built-in playground at railwail.com/models
  • Per-key rate limits and spend caps

FAQ

What about DeepInfra's deploy-your-own-model feature?

Custom model deployments are not yet supported on Railwail. Keep them on DeepInfra and use Railwail for the standard catalog.

Does the embedding API work the same?

Yes. POST /v1/embeddings accepts identical request shapes for BAAI/bge, Sentence Transformers and Cohere Embed models.

What is the throughput per request?

Comparable to DeepInfra for the same model. Railwail uses vLLM with continuous batching on EU hardware.

Are streaming responses supported?

Yes. Standard OpenAI SSE stream chunks.

What about quantised model variants?

FP8 / int4 variants are exposed with -fp8 or -int4 suffix in the model slug when available.

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
  • Update baseURL to https://api.railwail.com/v1
  • Switch model IDs to Railwail short slugs
  • Read the reference at railwail.com/docs
  • 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:
DeepInfra
Migration
Llama
Open Source
API