OpenRouter

OpenRouter is a multi-model routing service that provides access to 100+ models from all major providers through a single API key. It handles provider failover, rate limiting, and model discovery.

Why OpenRouter?

  • One API key for 100+ models -- no need to manage separate accounts for each provider.
  • Automatic failover -- if one provider is down, OpenRouter can route to an alternative.
  • Unified billing -- one bill for all model usage regardless of the underlying provider.
  • Model discovery -- easily try new models without signing up for new services.
  • Rate limit pooling -- OpenRouter manages rate limits across multiple provider accounts.

Setup

Step 1: Get an API Key

  • Go to openrouter.ai and sign in or create an account.
  • Navigate to the API Keys page.
  • Create a new key and copy it (it starts with sk-or-).
  • Add credits to your OpenRouter account for usage billing.

Step 2: Add the Key to Creor

Option A: Settings UI (recommended)

  • Open Creor and go to Settings.
  • Navigate to the Providers section.
  • Find OpenRouter and enter your API key.

Option B: Environment Variable

export OPENROUTER_API_KEY="sk-or-your-key-here"

Configuration

Reference OpenRouter models using the openrouter/ prefix followed by the model identifier from openrouter.ai:

1
2
3
{
"model": "openrouter/anthropic/claude-sonnet-4"
}

Mix OpenRouter models across agents:

1
2
3
4
5
6
7
8
9
10
11
12
13
{
"agent": {
"build": {
"model": "openrouter/anthropic/claude-sonnet-4"
},
"plan": {
"model": "openrouter/openai/o3"
},
"explore": {
"model": "openrouter/google/gemini-2.5-flash-preview"
}
}
}

Model Routing

OpenRouter supports special routing features that let you dynamically select models:

Auto Router

OpenRouter offers an auto-routing model that selects the best model based on your prompt. This is useful for experimentation:

1
2
3
{
"model": "openrouter/openrouter/auto"
}

Fallback Models

OpenRouter automatically handles provider outages by routing to alternative providers hosting the same model. This happens transparently -- you do not need to configure anything.

Advanced Options

HTTP Headers

Creor automatically sends the required HTTP-Referer and X-Title headers that OpenRouter uses for analytics. No manual configuration is needed.

Model Filtering

Restrict which OpenRouter models appear in the model selector:

1
2
3
4
5
6
7
8
9
10
11
{
"provider": {
"openrouter": {
"whitelist": [
"anthropic/claude-sonnet-4",
"openai/gpt-4o",
"google/gemini-2.5-pro-preview"
]
}
}
}

Request Timeout

1
2
3
4
5
6
7
{
"provider": {
"openrouter": {
"timeout": 600000
}
}
}

Best For

  • Users who want to try many models without managing multiple API keys.
  • Teams that need a single billing source for all model usage.
  • Projects that benefit from automatic provider failover.
  • Experimentation and model comparison across providers.
  • Access to niche or newly released models not yet available elsewhere.