Overview
OpenRouter gives one API key for chat models from many makers: OpenAI, Anthropic, Google, Meta, Mistral and more. Its API works like OpenAI's, so a step names the model it wants, e.g. openai/gpt-4o-mini.
- Regions: Global.
- Plans: Pay as you go with credits bought on openrouter.ai. Some models are free.
Setting up the connection
Auth type: Bearer Token.
- Sign in at openrouter.ai and buy credits, or use a free model.
- Open Keys and create a key. It starts with sk-or-.
- In Automize, open Settings → Connectors → OpenRouter → Add connection and paste the key in API key.
Rate limits
Set per key and per model by OpenRouter; free models have lower limits.
Data model
Model ─── Chat completion
messages: [{"role": "system", "content": "…"},
{"role": "user", "content": "…"}]Available operations
2 operations available. Click any row to jump to its detail.
| Operation | Category | What it does |
|---|---|---|
| Chat completion | General | Ask a model for a reply. Name the model as OpenRouter does, e.g. openai/gpt-4o-mini or anthropic/claude-3.5-sonnet. |
| List models | General | List the models OpenRouter offers, with their prices and context sizes. |
Operations
Chat completion
Ask a model for a reply. Name the model as OpenRouter does, e.g. openai/gpt-4o-mini or anthropic/claude-3.5-sonnet.
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | The model id from openrouter.ai/models, e.g. openai/gpt-4o-mini. |
Messages messages | Yes | list | The conversation, e.g. [{"role": "user", "content": "Summarise this"}]. |
Temperature temperature | No | number | 0 for steady answers, up to 2 for varied ones. |
Max tokens max_tokens | No | number | The longest reply allowed, in tokens. |
Tips
- The reply is in choices[0].message.content.
- Model ids are listed at openrouter.ai/models, or with List models.
List models
List the models OpenRouter offers, with their prices and context sizes.
No input parameters.
Tips
- Each model has its id, its price per token and how much text it takes.
FAQ
- Which key pays?
- Yours: OpenRouter charges your credits. Automize's own AI steps use a different key.