OpenRouter is a unified API that provides access to multiple AI models from providers like Anthropic, Google, OpenAI, Meta, Mistral, and DeepSeek. The OpenRouter integration allows you to generate text using these models directly in your Glide apps.
Paid Plan Required
A paid plan is required to use this feature. Check out our pricing to find the right plan for you.
You'll need to create an account on OpenRouter if you haven't already.
In OpenRouter, head to the API keys page and create a new API key. Once you close the key window, you cannot view the key again. Save this key in a safe place.
In your Glide app, click the Settings icon in the upper-right corner.
Navigate to the Integrations tab and select OpenRouter.
Click the Add button.
Copy-paste the OpenRouter API key to finish configuring the integration. It will save automatically.
Using the Generate Text Action
The Generate Text action sends a message to any model available on OpenRouter and returns the AI-generated response.
The action can be added to a Component that supports Actions (e.g., a Button component), added to a workflow in the Workflow Editor, or in the Data Editor as a Computed Column.
In the Data Editor
Open the table where you want to use the Generate Text action.
Add a new column by clicking the (+) plus symbol to the right of the table.
New columns added with the plus button will always appear on the right. If you'd like to add a column somewhere else in your data, you can select the dropdown menu on an existing column and choose Add column right. You can also click and drag columns to rearrange them.
Name your column.
Search for OpenRouter or navigate to Integrations → OpenRouter → Generate Text.
Configure the Message field with the prompt or question you want the AI to respond to.
Select a Model.
Select Save.
In the Layout Editor
If you have not already, create a text column in the Data Editor to store OpenRouter’s results.
Add a component that supports actions such as Button, Hint, or Rich Text.
In the configuration panel on the right, in the Actions menu, search for the OpenRouter > Generate text action.
Name the action and choose an icon.
Configure the Message field with the prompt or question you want the AI to respond to.
Select a Model.
Choose the column you prepared to store the AI's response.
Click away to save your configuration.
In the Workflow Editor
Select the (+) plus symbol or the + New Workflow button.
Select the data source for the table where the action is triggered. This may need to be inside of a Loop, depending on your trigger type.
Search for the OpenRouter > Generate text action.
Configure the Message field with the prompt or question you want the AI to respond to.
Select a Model from the dropdown.
Choose the column you prepared to store the OpenRouter’s response.
Click away to save your configuration.
Advanced Settings for Generate Text
There are a variety of advanced settings that can be adjusted for the Generate Text action.
Custom Model ID allows you to specify a model using its OpenRouter identifier (e.g., anthropic/claude-3.7-sonnet:thinking).
System Prompt provides instructions that guide the AI's behavior and tone.
Max Tokens controls the maximum length of the generated response.
Temperature controls response creativity. Lower values make the output more focused, while higher values make it more creative.
Top P is an alternative way to control response randomness.
Rate Limits
OpenRouter has rate limits that vary based on your account tier and the specific model being used. These limits apply when using OpenRouter through Glide. Learn more about OpenRouter rate limits.
To learn more generally about Integrations in Glide, including how they affect your app’s usage, check out our Introduction to Integrations.