OpenRouter
If you installed lfx directly with uv pip install lfx, install this provider from the long-tail metapackage:
uv pip install "lfx-bundles[<bundle>]"
Replace <bundle> with this page's provider name, for example qdrant.
To install every long-tail provider at once, run uv pip install "lfx[bundles]".
See the Bundle list for the exact extra name.
If you installed Langflow with uv pip install langflow, these bundle components are already included.
Bundles contain custom components that support specific third-party integrations with Langflow.
This page describes the components that are available in the OpenRouter bundle.
To configure OpenRouter once for all flows, you can also use the OpenAI Compatible model provider with the base URL https://openrouter.ai/api/v1.
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 an Agent or Smart Transform component.
For more information, see Language model components.
OpenRouter text generation parameters
Some parameters are hidden by default in the visual editor. You can modify all component parameters through the component inspection panel that appears when you select a component.
| Name | Type | Description |
|---|---|---|
| api_key | SecretString | Input parameter. Your OpenRouter API key for authentication. |
| model_name | Dropdown | Input parameter. The model to use for chat completion. Options are fetched live from the OpenRouter model catalog. |
| temperature | Float | Input parameter. Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7. |
| max_tokens | Integer | Input parameter. The maximum number of tokens to generate. |
| site_url | String | Input parameter. Your site URL for attribution in OpenRouter rankings. |
| app_name | String | Input parameter. Your app name for attribution in OpenRouter rankings. |
Was this page helpful?