Step-by-step migration guide with Python, Node.js, and curl examples. Includes real cost comparisons showing 87–96% savings across three production workload profiles.
You are probably paying between $5 and $15 per million tokens right now. DeepSeek V3 via Nova costs $0.27 per million input tokens. That gap — 18 to 55 times cheaper — is not theoretical future savings. It is money leaving your account with every API call, and the migration to stop it takes five minutes.
Step 1: Get Your Nova API Key
Go to nova.ai and create an account. Every new account gets $1 in free credits — enough to run thousands of test calls — with no credit card required.
Once you are in the console, navigate to API Keys → Create Key. Name it something descriptive (production, staging, personal), then copy the key immediately. You will not see it again, so store it in your password manager or secrets vault now.
Step 2: Change Two Lines of Code
The Nova API is fully OpenAI-compatible. Your existing code, SDKs, and integrations work without modification. You change the base URL and the model name. Nothing else.
Python (openai SDK)
# Before — OpenAI
from openai import OpenAI
client = OpenAI(api_key="sk-your-openai-key")
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Explain async/await in Python."}],
)
# After — DeepSeek via Nova (2 lines change)
from openai import OpenAI
client = OpenAI(
api_key="nvk_your_nova_key", # <- your Nova key
base_url="https://api.nova.ai/v1", # <- Nova endpoint
)
response = client.chat.completions.create(
model="deepseek/deepseek-v3", # <- DeepSeek model
messages=[{"role": "user", "content": "Explain async/await in Python."}],
)
print(response.choices[0].message.content)Node.js (openai package)
// Before
import OpenAI from "openai";
const client = new OpenAI({ apiKey: "sk-your-openai-key" });
// After — 2 fields added
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "nvk_your_nova_key",
baseURL: "https://api.nova.ai/v1",
});
const response = await client.chat.completions.create({
model: "deepseek/deepseek-v3",
messages: [{ role: "user", content: "Explain async/await in JavaScript." }],
});
console.log(response.choices[0].message.content);curl
# Before
curl https://api.openai.com/v1/chat/completions -H "Authorization: Bearer sk-your-openai-key" -H "Content-Type: application/json" -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}'
# After — change host and Authorization header only
curl https://api.nova.ai/v1/chat/completions -H "Authorization: Bearer nvk_your_nova_key" -H "Content-Type: application/json" -d '{"model":"deepseek/deepseek-v3","messages":[{"role":"user","content":"Hello"}]}'Step 3: Verify It Works
Run this script before swapping in production. It validates basic completions, streaming, and JSON mode:
from openai import OpenAI
import json
client = OpenAI(
api_key="nvk_your_nova_key",
base_url="https://api.nova.ai/v1",
)
# Test 1: Basic completion
r = client.chat.completions.create(
model="deepseek/deepseek-v3",
messages=[{"role": "user", "content": "What is 7 times 8? Answer with just the number."}],
max_tokens=10,
)
assert "56" in r.choices[0].message.content
print("OK Basic completion")
# Test 2: Streaming
stream = client.chat.completions.create(
model="deepseek/deepseek-v3",
messages=[{"role": "user", "content": "Count to 5, comma-separated."}],
stream=True,
)
chunks = []
for chunk in stream:
delta = chunk.choices[0].delta.content or ""
chunks.append(delta)
print(delta, end="", flush=True)
print()
print("OK Streaming")
# Test 3: JSON mode
r = client.chat.completions.create(
model="deepseek/deepseek-v3",
messages=[{"role": "user", "content": 'Return {"status": "ok", "count": 42} as JSON.'}],
response_format={"type": "json_object"},
max_tokens=50,
)
parsed = json.loads(r.choices[0].message.content)
assert parsed.get("status") == "ok"
print("OK JSON mode")All three pass? You are ready for production.
Real Savings Numbers
Three representative workloads with exact numbers:
| Workload | Monthly calls | GPT-4o cost | DeepSeek V3 cost | Monthly savings |
|---|---|---|---|---|
| Chat app (500 in / 800 out tokens) | 1M | $7,000 | $465 | $6,535 (93%) |
| Code assistant (2K in / 1.5K out) | 200K | $6,500 | $877 | $5,623 (87%) |
| Doc summarizer (3K in / 800 out) | 500K | $12,500 | $845 | $11,655 (93%) |
If you are on OpenAI o1 for reasoning and switch to DeepSeek R1:
| Workload | Monthly tasks | OpenAI o1 cost | DeepSeek R1 cost | Monthly savings |
|---|---|---|---|---|
| Reasoning pipeline (3K in / 5K out) | 50K | $17,250 | $630 | $16,620 (96%) |
Model Selection Guide
Not sure which DeepSeek model to use as a replacement?
- deepseek/deepseek-v3 — Drop-in GPT-4o replacement for general tasks. $0.27/M input, $1.10/M output. Start here for 80% of workloads.
- deepseek/deepseek-r1 — Drop-in o1 replacement for math, code, and chain-of-thought reasoning. $0.55/M input, $2.19/M output. Use when intermediate reasoning steps matter.
- qwen/qwen3-235b — Strong alternative with particularly high math scores. $0.35/M input, $1.40/M output. Worth testing on technical workloads alongside V3.
Common Questions
Does JSON mode work? Yes, identical API to OpenAI: response_format: {"type": "json_object"}.
Does function calling work? Yes. The schema is identical to OpenAI's tool use spec. Test complex nested schemas before shipping to production.
What about system prompts? Fully supported. DeepSeek follows instructions precisely — if anything, more literally than GPT-4o, which can be an advantage or require minor prompt adjustment.
What is the context length? DeepSeek V3 and R1 both support 128K context, matching GPT-4o.
The only thing you stand to lose is the OpenAI bill.
Nova Team
Editorial Team at Nova