OpenRouter
Access any AI model through OpenRouter
OpenRouter is a unified API gateway that gives you access to hundreds of AI models from providers like OpenAI, Anthropic, Google, Meta, Mistral, and DeepSeek through a single, OpenAI-compatible interface.
With OpenRouter, you can:
- Access many models from one place: Switch between models from different providers without changing your integration
- Compare models easily: Test and route requests across providers to find the best fit for cost, latency, and quality
- Avoid vendor lock-in: Use a single API key and endpoint regardless of the underlying provider
- Control spend: Take advantage of transparent per-model pricing and built-in usage limits
- Stay current: Reach newly released models as soon as they become available on OpenRouter
- Generate content: Produce completions, answers, and analyses with customizable parameters
The Agent Forge OpenRouter integration lets your agents call any supported model directly inside their workflows. This enables sophisticated automation that combines natural language understanding, reasoning, and content generation across the best models available.
Your agents can send prompts to a chosen model, receive completions with token usage details, and incorporate the results into their decision-making or outputs.
By connecting Agent Forge with OpenRouter, you give your workflows flexible, provider-agnostic access to state-of-the-art models — making it easy to pick the right model for each task without managing multiple integrations.
Usage Instructions
Generate completions using any model available through OpenRouter, a unified gateway to hundreds of models from OpenAI, Anthropic, Google, Meta, Mistral and more. Create responses, answer questions, and generate content with customizable parameters.
Where to Get Your OpenRouter API Key
To use the OpenRouter integration you need an API key from your OpenRouter account.
Here is the step-by-step process:
-
Create or log in to your account. Sign up at openrouter.ai if you don't already have an account.
-
Add credits to your account. OpenRouter is a paid service. Add a payment method and purchase credits so your requests can be billed.
-
Open the Keys page. Go to openrouter.ai/keys or find the Keys section in your account settings.
-
Create a new API key. Click "Create Key", give it a name, and (optionally) set a credit limit.
-
Copy and save the key. Once generated, copy the key and store it securely. For security reasons, it is only shown once.
-
Choose a model. Browse the available models at openrouter.ai/models and use the model slug (e.g.,
openai/gpt-4o,anthropic/claude-3.5-sonnet) in the block.
Tools
openrouter_chat
Generate completions using any model available through OpenRouter
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
systemPrompt | string | No | System prompt to guide the model behavior |
content | string | Yes | The user message content to send to the model |
model | string | Yes | Model to use (e.g., openai/gpt-4o, anthropic/claude-3.5-sonnet) |
max_tokens | number | No | Maximum number of tokens to generate |
temperature | number | No | Sampling temperature between 0 and 2 |
apiKey | string | Yes | OpenRouter API key |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | Generated response |
model | string | Model used |
usage | json | Token usage |
Screenshot
Notes
- Category:
tools - Type:
openrouter