TL;DR โ Switch in Under 5 Minutes
- DeepSeek's API is OpenAI-compatible โ change baseURL only
- DeepSeek V3, R1, Coder, Math, R1-Distill all available on Railwail
- EU-hosted endpoint โ addresses common compliance concerns about routing requests through China
- EUR billing with VAT receipts
- Plus access to Claude, GPT-4o, Gemini, Llama through the same key
Why Move Off DeepSeek Direct?
DeepSeek's frontier-quality models (V3, R1) at low prices are compelling. The trade-off many EU teams encounter: the deepseek.com direct API routes requests through China, which can be a regulatory or compliance blocker. Railwail hosts DeepSeek's open-weight models on EU infrastructure (Hetzner Frankfurt) so you get the same model with EU data residency.
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 (DeepSeek direct):
import OpenAI from "openai";
const ds = new OpenAI({
apiKey: process.env.DEEPSEEK_API_KEY,
baseURL: "https://api.deepseek.com/v1",
});
const res = await ds.chat.completions.create({
model: "deepseek-chat",
messages: [{ role: "user", content: "Hello" }],
});After (Railwail, EU-hosted):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: "deepseek-v3",
messages: [{ role: "user", content: "Hello" }],
});Python โ Reasoning with R1
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="deepseek-r1",
messages=[{"role": "user", "content": "Prove that the square root of 2 is irrational."}],
)
print(resp.choices[0].message.reasoning_content) # chain-of-thought
print(resp.choices[0].message.content) # final answercURL
curl https://api.railwail.com/v1/chat/completions \
-H "Authorization: Bearer $RAILWAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v3",
"messages": [{"role": "user", "content": "Hello"}]
}'API Endpoint Mapping
DeepSeek endpoint โ Railwail equivalent
| DeepSeek direct | Railwail | Notes |
|---|---|---|
| POST /v1/chat/completions | POST /v1/chat/completions | Identical |
| POST /v1/completions (FIM) | POST /v1/completions | deepseek-coder FIM |
| POST /beta/chat/completions (prefix) | Use stop param + messages | Prefix continuation |
| GET /v1/models | GET /v1/models?provider=deepseek | List DeepSeek models |
Model Mapping
DeepSeek model โ Railwail
| DeepSeek direct | Railwail | Notes |
|---|---|---|
| deepseek-chat | deepseek-v3 | Frontier MoE |
| deepseek-reasoner | deepseek-r1 | Reasoning model |
| deepseek-coder | deepseek-coder | Code generation |
| deepseek-math | deepseek-math | Math specialist |
| deepseek-r1-distill-qwen-32b | deepseek-r1-distill-qwen-32b | R1 distilled |
| deepseek-r1-distill-llama-70b | deepseek-r1-distill-llama-70b | R1 distilled |
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 DeepSeek model, Railwail in EUR
| Model | DeepSeek direct (USD) | Railwail (EUR) | Notes |
|---|---|---|---|
| deepseek-v3 input (cache miss) | $0.27 | EUR 0.25 | Same |
| deepseek-v3 input (cache hit) | $0.07 | EUR 0.064 | 90% cache discount preserved |
| deepseek-v3 output | $1.10 | EUR 1.01 | Same |
| deepseek-r1 input | $0.55 | EUR 0.51 | Same |
| deepseek-r1 output | $2.19 | EUR 2.01 | Same (incl. reasoning tokens) |
| deepseek-coder input | $0.14 | EUR 0.13 | Same |
Why Railwail Over DeepSeek Direct
- EU hosting โ data residency in Frankfurt, no routing to Chinese servers
- EUR billing with VAT receipts
- Same OpenAI-compatible API
- Adds Claude, GPT-4o, Gemini for the rest of your stack
- Per-key rate limits and spend caps
- Built-in playground for R1 reasoning chain inspection
FAQ
Is my data really not sent to China?
Correct. Railwail hosts DeepSeek's open-weight models (V3, R1, R1-Distill, Coder) on Hetzner Frankfurt GPU instances. Your requests and the model weights run entirely within Hetzner's EU data centres. The original DeepSeek company's servers in China are not involved.
Do I get the same model quality?
Yes โ same open-source weights from huggingface.co/deepseek-ai. Output distribution is identical at matched sampling params.
Is reasoning_content returned for R1?
Yes. The chain-of-thought reasoning is available in choices[0].message.reasoning_content. The final answer is in choices[0].message.content.
Does the prompt caching discount work?
Yes. DeepSeek's automatic context caching is preserved โ repeated prompt prefixes trigger the cache-hit pricing tier.
What about the FIM (fill-in-the-middle) mode for deepseek-coder?
POST /v1/completions with deepseek-coder and prefix/suffix params triggers FIM.
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 (deepseek-chat โ deepseek-v3, deepseek-reasoner โ deepseek-r1)
- Read the reference at railwail.com/docs
- Compare pricing at railwail.com/pricing