Font Size:

OpenRouter LLM

Introduction

The OpenRouter element integrates with the OpenRouter API to provide access to a diverse collection of large language models (LLMs). It supports chat completions and tool-calling across multiple providers.

Through a single integration, you can choose from leading models such as OpenAI’s GPT series, Google Gemini, Anthropic Claude, DeepSeek, and Mistral. OpenRouter also includes access to certain free models, allowing you to explore and compare capabilities without immediate cost.

In addition, the element provides extensive configuration options for customizing responses. Adjustable parameters to fine-tune aspects such as variation, completeness, and structure of responses, giving you greater control over how models behave and ensuring that results are aligned with your application requirements.

Get Started

To get started with OpenRouter integration, you'll need the following:

  1. An OpenRouter account from https://openrouter.ai/.
  2. A valid API key from https://openrouter.ai/settings/keys.
  3. Access to your AI agent builder or development environment that supports LLM integration.

How to use it

To use the OpenRouter LLM Element:

Adding the OpenRouter LLM Service

  1. Remove the default OpenAI element from the AI Agent Builder.
  2. Drag and drop the OpenRouter LLM into the Define Agent.
  3. Important: You must provide a Model and a valid API key in its configuration to enable functionality.

Configure Form Properties

To properly integrate and configure OpenRouter LLM, set the following fields:

  • Model: Model name to use for the LLM service. This should be compatible with the OpenRouter API at https://openrouter.ai/models.
  • API Key: API Key for the OpenRouter API at https://openrouter.ai/settings/keys.
  • Proxy Domain: Proxy domain to use for the OpenRouter API. If not set, the default OpenRouter API URL will be used.
  • OpenRouter API URL: The base endpoint you use to send requests to OpenRouter’s service.
  • Temperature: Controls randomness. Must be a number between 0.0 and 2.0. Lower values make output more focused and deterministic; higher values make output more creative.
  • Top P: Controls diversity via nucleus sampling. Must be a number between 0.0 and 1.0. 1.0 means no filtering; lower values cut off less likely tokens.
  • Top K: Limits the sampling pool to the top K tokens by probability. Must be an integer 0 or greater. Set to 0 to disable.
  • Frequency Penalty: Penalizes tokens that have already appeared frequently to reduce repetition. Must be a number between -2.0 and 2.0.
  • Presence Penalty: Penalizes tokens based on whether they appear at all, encouraging new topics. Must be a number between -2.0 and 2.0.
  • Repetition Penalty: Reduces repeated phrases. Must be a number between 0.0 and 2.0. Values above 1.0 discourage repetition.
  • Min P: Sets a minimum probability threshold for token selection. Must be a number between 0.0 and 1.0. Helps filter out very unlikely tokens.
  • Top A: Applies an additional probability cutoff after Top P and Top K. Must be a number between 0.0 and 1.0. Used to limit choices further.
  • Max Tokens: The maximum number of tokens the model can generate in a single response. Must be an integer 1 or greater.
Created by Gabriel Last modified by Gabriel on Aug 28, 2025