Skip to main content

OpenRouter

OpenRouter provides a unified interface for accessing various LLM APIs, including models from OpenAI, Meta, Perplexity, and others. It follows the OpenAI API format - see our OpenAI provider documentation for base API details.

Setup

  1. Get your API key from OpenRouter
  2. Set the OPENROUTER_API_KEY environment variable or specify apiKey in your config

Available Models

Latest releases:

Model IDContext (tokens)
amazon/nova-lite-v1300,000
amazon/nova-micro-v1128,000
anthracite-org/magnum-v4-72b16,384
anthropic/claude-3-haiku200,000
anthropic/claude-3-opus200,000
anthropic/claude-3.5-sonnet200,000
anthropic/claude-3.5-sonnet:beta200,000
cohere/command-r-08-2024128,000
deepseek/deepseek-r164,000
deepseek/deepseek-r1-distill-llama-70b131,072
google/gemini-2.0-flash-exp:free1,048,576
google/gemini-flash-1.51,000,000
google/gemini-flash-1.5-8b1,000,000
google/gemini-pro-1.52,000,000
gryphe/mythomax-l2-13b4,096
meta-llama/llama-3-70b-instruct8,192
meta-llama/llama-3-8b-instruct8,192
meta-llama/llama-3-8b-instruct:extended16,384
meta-llama/llama-3.1-70b-instruct131,072
meta-llama/llama-3.1-8b-instruct131,072
meta-llama/llama-3.2-1b-instruct131,072
meta-llama/llama-3.2-3b-instruct131,000
meta-llama/llama-3.2-11b-vision-instruct131,072
meta-llama/llama-3.3-70b-instruct131,072
microsoft/phi-416,384
microsoft/wizardlm-2-8x22b65,536
mistralai/codestral-2501256,000
mistralai/mistral-8b128,000
mistralai/mistral-nemo131,072
neversleep/llama-3-lumimaid-8b:extended24,576
openai/gpt-4o-mini128,000
openai/gpt-4o-mini-2024-07-18128,000
eva-unit-01/eva-qwen-2.5-72b16,384
eva-unit-01/eva-qwen-2.5-32b16,384
qwen/qwen-2.5-coder-32b-instruct33,000
qwen/qwen-2.5-7b-instruct32,768
qwen/qwen-2.5-72b-instruct32,768
qwen/qwq-32b-preview32,768
qwen/qvq-72b-preview128,000

For a complete list of 300+ models and detailed pricing, visit OpenRouter Models.

Basic Configuration

providers:
- id: openrouter:google/gemini-flash-1.5-8b
config:
temperature: 0.7
max_tokens: 1000

- id: openrouter:meta-llama/llama-3.3-70b
config:
temperature: 0.5
max_tokens: 2000

Features

  • Access to 300+ models through a single API
  • Mix free and paid models in your evaluations
  • Support for text and multimodal (vision) models
  • Compatible with OpenAI API format
  • Pay-as-you-go pricing