> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up OpenRouter in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/openrouter
Last updated: 2026-11-24

Share OpenRouter with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or API key sign-in, 21 tools (13 read-only).

---

To give your team OpenRouter in Claude, ChatGPT, Cursor and other AI clients, an admin shares the OpenRouter integration in a Metorial portal, and each person signs in to OpenRouter with their own account. Agents can access 400+ AI models from dozens of providers through a single unified API. The integration has 21 tools, 13 read-only, 6 write and 2 destructive, plus 2 triggers.

**What you will learn**

- How an admin shares OpenRouter in a portal and how each person connects
- What OpenRouter asks for when you connect, and where to find it
- How to keep the 13 read-only tools and reject the other 8

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with OpenRouter for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **API Key** | API token | `token` |
| **OAuth PKCE** (default) | OAuth | Signs in to OpenRouter |

The portal and `metorial setup` use **OAuth PKCE** unless someone picks another method.

### API Key

To connect, a person enters:

- `token`: OpenRouter API key (starts with sk-or-)

### OAuth PKCE

People sign in to OpenRouter and approve the permissions it lists.

### Setup settings

Whichever method you pick, setup also asks for:

- `siteUrl` (optional): Your site URL for rankings on openrouter.ai (sent as HTTP-Referer header)
- `appTitle` (optional): Your app title shown on openrouter.ai (sent as X-OpenRouter-Title header)

## Use your own OpenRouter OAuth app

With your own OAuth app, people see your company's name on the OpenRouter consent screen, and the client ID and secret belong to you.

1. **Start the credentials in Metorial**

   In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose OpenRouter and copy the **Redirect URI**.

2. **Register the app with OpenRouter**

   Create an OAuth app or client in OpenRouter and add the redirect URI from Metorial as its redirect or callback URL.

3. **Finish in Metorial**

   Copy the app's client ID and client secret. Back in Metorial, enter a **Name**, the **Client ID** and the **Client Secret**, review **Scopes**, and select **Create**. Then pick these credentials for the OpenRouter integration.

## Admin: share OpenRouter in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose OpenRouter. Under **Auth Method**, keep **OAuth PKCE** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to OpenRouter as themselves.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from OpenRouter.

4. **Choose who gets it**

   Add the access groups that should see OpenRouter. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user OpenRouter integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search openrouter
```

## Employee: connect OpenRouter

### In the portal

1. **Open OpenRouter in the catalog**

   Sign in to your portal and open OpenRouter. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. An OpenRouter sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search openrouter
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **OAuth PKCE**. To connect with **API Key** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your OpenRouter connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list openrouter
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 13 read-only tools, such as `get_model` and `get_api_key`, and lose the 6 write tools, such as `create_api_key` or `update_api_key`, and the 2 destructive tools, such as `delete_api_key` or `delete_guardrail`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list openrouter
metorial tools <integration-id>
metorial call <integration-id> list_providers -d '{}'
```

`metorial tools` lists the 21 tools, minus any you rejected. `list_providers` takes no input. It lists OpenRouter upstream model providers and metadata useful for provider routing, privacy review, status checks, and guardrail/provider allowlists.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (13)

- `get_model`: Retrieve detailed information about a specific AI model on OpenRouter, including its pricing, context window, architecture, supported parameters, and top provider details. Needs `modelId`.
- `list_models`: List all available AI models on OpenRouter with their metadata, pricing, and capabilities.
- `list_guardrails`: List OpenRouter guardrails for the authenticated account, including spending limits, model/provider allowlists and denylists, ZDR enforcement, workspace, and pagination metadata.
- `list_api_keys`: List API keys for the authenticated OpenRouter account, including usage, limits, BYOK usage, workspace, disabled state, and expiration metadata.
- `get_key_info`: Retrieve information about the currently authenticated API key, including its label, usage, spending limit, and rate limit configuration.
- `create_embedding`: Generate vector embeddings for text input using OpenRouter's embedding models. Needs `model` and `input`.
- `get_credits`: Check your OpenRouter account credits balance and total usage.
- `get_generation_stats`: Retrieve detailed statistics for a specific generation by its ID, including token counts, cost, latency, and provider information. Needs `generationId`.
- `list_providers`: List OpenRouter upstream model providers and metadata useful for provider routing, privacy review, status checks, and guardrail/provider allowlists.
- `list_embedding_models`: List OpenRouter models available through the embeddings router, including pricing, context length, architecture, and supported metadata.
- `list_model_endpoints`: List the upstream provider endpoints available for a specific OpenRouter model. Needs `modelId`.
- `get_api_key`: Retrieve metadata for a single OpenRouter API key by hash. Needs `keyHash`.
- `get_guardrail`: Retrieve a single OpenRouter guardrail by ID. Needs `guardrailId`.

### Write tools (6)

- `create_guardrail`: Create an OpenRouter guardrail to control spending, provider/model routing, content filters, workspace scope, and zero-data-retention requirements.
- `send_chat_completion`: Send messages to any of 400+ AI models through OpenRouter's unified API. Needs `model` and `messages`.
- `create_api_key`: Create a new OpenRouter API key. Needs `name`.
- `update_guardrail`: Update an OpenRouter guardrail's name, description, spending limit, provider/model restrictions, content filters, or ZDR settings. Needs `guardrailId`.
- `create_response`: Create a response using OpenRouter's OpenResponses-compatible API. Needs `input`.
- `update_api_key`: Update an OpenRouter API key name, spending limit, limit reset interval, disabled state, or BYOK-limit behavior. Needs `keyHash`.

### Destructive tools (2)

- `delete_api_key`: Delete an OpenRouter API key by hash. Needs `keyHash`.
- `delete_guardrail`: Delete an OpenRouter guardrail by ID. Needs `guardrailId`.

## Triggers

OpenRouter has 2 triggers, which fire on events in OpenRouter:

- `inbound_webhook`
- `credit_balance_change`: Triggers when the OpenRouter credit balance changes, indicating new usage or deposits.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use OpenRouter there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [OpenRouter on metorial.com](https://metorial.com/integrations/openrouter): the integration overview