Migrate · OpenRouter
Two lines. Every model still works.
llmcloud.ai speaks the same OpenAI-compatible protocol as OpenRouter. Model IDs are compatible — provider/model names route to the same upstream — and you gain routing policies, semantic caching, guardrails and per-key IAM.
OpenRouter
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://openrouter.ai/api/v1",
apiKey: process.env.OPENROUTER_API_KEY,
});
await client.chat.completions.create({
model: "anthropic/claude-3.5-sonnet",
messages: [{ role: "user", content: "Hi" }],
});llmcloud.ai
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.llmcloud.ai/v1", // ← 1
apiKey: process.env.LLMCLOUD_API_KEY, // ← 2
});
await client.chat.completions.create({
model: "anthropic/claude-4.5-sonnet", // same shape
messages: [{ role: "user", content: "Hi" }],
});What you gain
- auto:quality / cost / speed / reasoning policies — no manual model juggling
- Semantic caching with cache-hit routing (5–70% cost cut on repeat traffic)
- Mid-stream failover across providers, not just retries
- Per-key budgets, rate limits, region pinning, model allow-lists
- PII redaction, prompt-injection classifier, content policies at the edge
- Immutable audit log, SSO/SCIM, SOC 2 posture
- MCP endpoint — mcp.llmcloud.ai works with Claude Code, Cursor, Windsurf
- Transparent per-token billing, no ‘credits’ float, BYOK with zero markup
Are model IDs compatible?+
Yes — provider/model IDs (e.g. anthropic/claude-4.5-sonnet, google/gemini-3-pro) map 1:1. Where OpenRouter uses a version alias, we accept the same alias plus the fully-qualified ID.
Do OpenRouter's :nitro and :floor variants work?+
Substitute :nitro → auto:speed and :floor → auto:cost. The router picks a matching upstream per request instead of pinning a single one.
Can I dual-write during migration?+
Yes. Point staging at llmcloud.ai first, mirror requests with an X-LLMCloud-Shadow header, and compare cost + latency dashboards side-by-side before flipping prod.