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
- Get your API key from OpenRouter
- Set the
OPENROUTER_API_KEY
environment variable or specifyapiKey
in your config
Available Models
Latest releases:
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