Skip to main content

OpenRouter

Bundles contain custom components that support specific third-party integrations with Langflow.

This page describes the components that are available in the OpenRouter bundle.

For more information about OpenRouter features and functionality used by OpenRouter components, see the OpenRouter documentation.

OpenRouter text generation

This component generates text using OpenRouter's unified API for multiple AI models from different providers.

It can output either a Model Response (Message) or a Language Model (LanguageModel).

Use the Language Model output when you want to use an OpenRouter model as the LLM for another LLM-driven component, such as a Language Model or Smart Function component.

For more information, see Language Model components.

OpenRouter text generation parameters

Many OpenRouter component input parameters are hidden by default in the visual editor. You can toggle parameters through the Controls in the component's header menu.

NameTypeDescription
api_keySecretStringInput parameter. Your OpenRouter API key for authentication.
site_urlStringInput parameter. Your site URL for OpenRouter rankings (advanced).
app_nameStringInput parameter. Your app name for OpenRouter rankings (advanced).
providerStringInput parameter. The AI model provider to use.
model_nameStringInput parameter. The specific model to use for chat completion.
temperatureFloatInput parameter. Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7.
max_tokensIntegerInput parameter. The maximum number of tokens to generate (advanced).
Search