Developer Platform

Build with every model. From one platform.

One OpenAI-compatible API, typed SDKs in three languages, an agent framework, local devtools, and an MCP server — backed by 500+ models across 80+ providers with automatic fallback.

Everything you need to ship

Seven products, one API key. Start with a single request and grow into a production agent without changing providers.

One OpenAI-compatible endpoint for 500+ models across 80+ providers, with automatic fallback when a provider fails.

https://openrouter.ai/api/v1

The same typed client in TypeScript, Python, and Go — streaming, tools, and structured output behave identically in every language.

npm i @openrouter/sdk

Type-safe tools, multi-turn loops, streaming, and stop conditions. Build production agents that route across every provider.

npm i @openrouter/agent

Manage OpenRouter as infrastructure-as-code with repeatable, reviewable configuration for your platform.

source = "OpenRouterTeam/openrouter"

Capture SDK telemetry in development and replay every request, token count, and error in a local web viewer.

npm install -g @openrouter/cli

Give any Model Context Protocol client — Claude Code, Cursor, or your own — access to all 500+ models.

https://mcp.openrouter.ai/mcp

Working recipes for agent harnesses, human-in-the-loop tools, evals, cost control, and image generation.

A few lines to production

Swap the model string to change providers. Nothing else about your code has to change.

import { OpenRouter } from '@openrouter/sdk';

const client = new OpenRouter({
  apiKey: process.env.OPENROUTER_API_KEY,
});

const response = await client.chat.send({
  model: 'anthropic/claude-sonnet-4',
  messages: [
    { role: 'user', content: 'Explain quantum computing in simple terms.' },
  ],
});

console.log(response.choices[0].message.content);

Live in three steps

Most teams are through their first successful request in under five minutes.

  1. 1

    Get an API key

    Create a key from your dashboard. No subscription and no card required to start.

  2. 2

    Point your client at OpenRouter

    Already using the OpenAI SDK? Change the base URL and your key. Everything else stays put.

  3. 3

    Pick any model

    Use an author/slug string. Add fallbacks so a provider outage never becomes your outage.

  4. Read the full quickstart
Your first request
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "models": [
      "anthropic/claude-sonnet-4",
      "openai/gpt-4o",
      "google/gemini-2.5-pro"
    ],
    "messages": [
      { "role": "user", "content": "Hello!" }
    ]
  }'

Start building today

Free to get started. No subscription, no card required.