Migration guides The Switchboard Turn price savings into action. Step-by-step guides with code snippets, compatibility scores and gotchas.
Prices checked 13 Nov 2026
Guides Migrate from OpenAI Anthropic
⇄ Migrate to Anthropic Google DeepSeek
OpenAI to Anthropic
Compatibility 85%
Difficulty Easy
Time 1-2 hours
Cheapest output price Same price GPT-6 Luna $0.50 vs Claude Haiku 5.5 $0.50 per million output tokens Migration steps Install the Anthropic SDK: npm install @anthropic-ai/sdk Replace API key environment variable: OPENAI_API_KEY → ANTHROPIC_API_KEY Update the client initialization code Modify message format (role/content structure is similar) Update function calling to use Claude's tool_use format Test with a subset of your prompts to verify output quality Before (OpenAI) Copy
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
const response = await client.chat.completions.create({
model: "gpt-5.4",
messages: [
{ role: "system", content: "You are helpful." },
{ role: "user", content: "Hello!" }
],
});
console.log(response.choices[0].message.content);After (Anthropic) Copy
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const response = await client.messages.create({
model: "claude-sonnet-5-5",
max_tokens: 1024,
system: "You are helpful.",
messages: [
{ role: "user", content: "Hello!" }
],
});
// Thinking is on by default, so content can start with a thinking block
for (const block of response.content) {
if (block.type === "text") console.log(block.text);
}Watch out for System prompts work differently -- Claude uses a dedicated system parameter Function calling syntax differs -- Claude uses tool_use blocks Token counting methods are different Max context window varies by model OpenAI to Google
Compatibility 75%
Difficulty Medium
Time 2-4 hours
Cheapest output price ▼ 20% lower GPT-6 Luna $0.50 vs Gemini 2.5 Flash-Lite $0.40 per million output tokens Migration steps Install Google AI SDK: npm install @google/generative-ai Replace API key: OPENAI_API_KEY → GOOGLE_API_KEY Update client initialization with GoogleGenerativeAI Convert messages to Gemini's parts-based format Update streaming handlers if using SSE Configure safety settings as needed Before (OpenAI) Copy
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
const response = await client.chat.completions.create({
model: "gpt-5.4",
messages: [
{ role: "user", content: "Hello!" }
],
});After (Google) Copy
import { GoogleGenerativeAI } from '@google/generative-ai';
const genAI = new GoogleGenerativeAI(
process.env.GOOGLE_API_KEY
);
const model = genAI.getGenerativeModel({
model: "gemini-3.8-flash"
});
const result = await model.generateContent("Hello!");
console.log(result.response.text());Watch out for Gemini uses a different message format (parts-based) Safety settings are more granular in Gemini Streaming API differs significantly Function calling uses a different schema format OpenAI to DeepSeek
Compatibility 95%
Difficulty Easy
Time 30 minutes
Cheapest output price ▲ 140% higher GPT-6 Luna $0.50 vs DeepSeek V4.1 Flash $1.20 per million output tokens Migration steps Update the base URL to DeepSeek's endpoint Replace API key: OPENAI_API_KEY → DEEPSEEK_API_KEY Change model name to deepseek-flash (or deepseek-v4-pro) Test -- most code works without changes Before (OpenAI) Copy
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
const response = await client.chat.completions.create({
model: "gpt-5.4",
messages: [
{ role: "user", content: "Hello!" }
],
});After (DeepSeek) Copy
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.DEEPSEEK_API_KEY,
baseURL: "https://api.deepseek.com",
});
const response = await client.chat.completions.create({
model: "deepseek-flash",
messages: [
{ role: "user", content: "Hello!" }
],
});
// Same response format -- it just works!Watch out for DeepSeek uses OpenAI-compatible API -- minimal changes needed Vision works on deepseek-flash but not on deepseek-v4-pro Weekday peak hours (01:00-04:00 and 06:00-10:00 UTC) bill at double the off-peak rate Rate limits and quotas differ Response format may have subtle differences Anthropic to OpenAI
Compatibility 85%
Difficulty Easy
Time 1-2 hours
Cheapest output price Same price Claude Haiku 5.5 $0.50 vs GPT-6 Luna $0.50 per million output tokens Migration steps Install OpenAI SDK: npm install openai Replace API key: ANTHROPIC_API_KEY → OPENAI_API_KEY Move system prompt into messages array Update response parsing from text blocks in content to choices[0].message.content Update tool calling format if used Before (Anthropic) Copy
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
const response = await client.messages.create({
model: "claude-sonnet-5-5",
max_tokens: 1024,
system: "You are helpful.",
messages: [
{ role: "user", content: "Hello!" }
],
});After (OpenAI) Copy
import OpenAI from 'openai';
const client = new OpenAI();
const response = await client.chat.completions.create({
model: "gpt-5.4",
messages: [
{ role: "system", content: "You are helpful." },
{ role: "user", content: "Hello!" }
],
});Watch out for OpenAI uses system messages in the messages array, not a separate parameter Function calling syntax is different (tools vs tool_use) Response structure differs (choices[] vs content[])