Providers
openrouter
OpenRouter — one API to route across 100+ providers with transparent pricing.
import { openrouter } from '@agentskit/adapters'
const adapter = openrouter({
apiKey: process.env.OPENROUTER_API_KEY!,
model: 'anthropic/claude-sonnet-4',
appUrl: 'https://www.agentskit.io',
appName: 'AgentsKit',
})#Options
| Option | Type | Default |
|---|---|---|
apiKey | string | required |
model | string | required |
baseUrl | string | https://openrouter.ai/api/v1 |
appUrl | string | — (optional attribution) |
appName | string | — |
fetch | typeof fetch | global |
#Why openrouter
- Single key, many providers. Good for experimentation.
- Transparent per-model pricing; automatic fallbacks.
- Pair with
createFallbackAdapterfor extra resilience.
#Env
| Var | Purpose |
|---|---|
OPENROUTER_API_KEY | API key |
#Related
Explore nearby
- PeerProviders
25 native chat and embedder adapters, plus higher-order adapters that compose candidates. Separate from the 140-provider models catalog.
- PeerChoosing an adapter
Capability decision table and rules of thumb for picking a chat adapter.
- PeerHosted chat adapters
17 managed-LLM adapters. Same contract; swap by changing one import.