Migration guide
Migrate from OpenAI to Meridian
Drop-in replacement. Change two lines, keep your existing SDK calls, and get lower latency with no vendor lock-in.
Step 1
Change your base URL
Point the OpenAI SDK to Meridian's API endpoint. All endpoints are compatible.
baseURL: "https://api.meridian.sh/v1"Step 2
Replace your API key
Generate a key from your Meridian dashboard and swap it in. Keys start with mr-.
apiKey: "mr-..."Step 3
Everything else stays the same
Chat completions, streaming, function calling, embeddings — all work identically. No SDK changes beyond the two lines above.
Side-by-side diff
OpenAI
Meridian
import OpenAI from "openai";
import OpenAI from "openai";
const client = new OpenAI({
const client = new OpenAI({
apiKey: "sk-...",
apiKey: "mr-...",
baseURL: "https://api.openai.com/v1",
baseURL: "https://api.meridian.sh/v1",
});
});
const completion = await client.chat.completions.create({
const completion = await client.chat.completions.create({
model: "gpt-4o",
model: "meridian-1",
messages: [{ role: "user", content: "Hello" }],
messages: [{ role: "user", content: "Hello" }],
});
});
That's it. Two lines changed. Zero rewrites. Start building →