OpenRouter

Generate text using popular AI models through OpenRouter.

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.

Adding the OpenRouter Integration

1

You’ll need to create an account on OpenRouter if you haven’t already.

2

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.

3

In your Glide app, click the Settings icon in the upper-right corner.

4

Navigate to the Integrations tab and select OpenRouter.

5

Click the Add button.

6

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.

1

Open the table where you want to use the Generate Text action.

2

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.
3

Name your column.

4

Search for OpenRouter or navigate to Integrations → OpenRouter → Generate Text.

5

Configure the Message field with the prompt or question you want the AI to respond to.

6

Select a Model.

7

Select Save.

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.

Frequently Asked Questions

OpenRouter provides access to hundreds of models from different providers. You can browse and compare available models here.