Installation
Install the OpenAI package (OpenRouter uses OpenAI-compatible API):Setup
Set your OpenRouter API key as an environment variable:Initialize Model
Create an OpenRouter model instance:Use with Agent
Pass the model to your agent:Configuration Options
Supported parameters for OpenRouter models:For the full list of available models and parameters, see the OpenRouter API documentation.