OpenRouter
Overview
The OpenRouter integration connects autobotAI to OpenRouter, a unified API gateway that exposes hundreds of large language models from multiple providers (OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, and more) behind a single OpenAI-compatible interface. Once connected, you can use OpenRouter as the LLM backend for AI Evaluator nodes, AI Agent nodes, and any prompt-driven workflow without locking the bot to a single provider.
This guide walks through setting up the OpenRouter integration in your autobotAI account.
Prerequisites
Before starting, ensure you have:
- An OpenRouter account at openrouter.ai.
- An OpenRouter API Key (
sk-or-…) issued from your account. - Sufficient credit (or a configured payment method) for the models you plan to call.
Instructions for generating an API key are in the Additional Information section.
Steps to Set Up the OpenRouter Integration
Step 1: Navigate to the Integrations page from the menu and click the + Add Integration button in the top-right corner.
Step 2: From the list, under the AI section, select OpenRouter + Add to start a new integration.
Step 3: Fill in the required fields as follows:
Note: Fields marked with an asterisk (*) are mandatory.
- Alias: A meaningful name for this integration.
- Groups: Optional grouping label for organizing multiple integrations.
- OpenRouter API Key: The
sk-or-…key issued from your OpenRouter account. Sent asAuthorization: Bearer <key>. - Skip Test Integration: Set to Yes to bypass the live key check during setup. Useful when the API is temporarily unreachable or you are seeding credentials offline. Defaults to No.
Verify the information, then click Create to complete the integration.
Step 4: After the integration is created, locate it under Integrations. Click the three-dot menu and select Test to confirm autobotAI can reach OpenRouter with the provided key.
Additional Information
How to Generate an OpenRouter API Key
- Log in to OpenRouter: go to openrouter.ai and sign in.
- Open the Keys page: from the account menu, choose Keys.
- Create a key: click Create Key, give it a descriptive name, and (optionally) set a per-key spend cap.
- Copy the key: the value (
sk-or-…) is shown once — store it in a secure secret manager.
How the Key Is Validated
When Skip Test Integration is No, the integration calls:
GET https://openrouter.ai/api/v1/auth/key
with header Authorization: Bearer <your-key>. A 200 response means the key is valid; 401 means it is invalid or revoked.
Supported Connection Interfaces
- REST API — call any OpenRouter endpoint directly.
- Python SDK — use the OpenAI Python SDK with
base_url=https://openrouter.ai/api/v1and the OpenRouter key asapi_key.
Model Selection
Any model slug from the OpenRouter catalog is callable at runtime (for example openai/gpt-5, anthropic/claude-opus-4-7, google/gemini-2.5-pro, meta-llama/llama-3.3-70b-instruct, deepseek/deepseek-r1). The integration ships with a curated default list for the AI Evaluator/AI Agent dropdowns; you can override it with any other slug supported by OpenRouter.
Troubleshooting
- "API key is invalid." — The key has been revoked or mistyped. Generate a new one from the OpenRouter dashboard.
402 Payment Requiredat runtime — The account has insufficient credit. Top up at https://openrouter.ai/credits.- Need to save credentials before the API is reachable — Toggle Skip Test Integration to Yes, save, then run a test prompt once connectivity is restored.