Set up OpenRouter in Metorial for Claude, ChatGPT and Cursor
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'll 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 with at least one access group
- An account with OpenRouter for each person who connects
- For the CLI steps: the Metorial 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.
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.
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.
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
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
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.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from OpenRouter.
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:
Employee: connect OpenRouter
In the portal
Open OpenRouter in the catalog
Sign in to your portal and open OpenRouter. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. An OpenRouter sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
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.
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.
Check it worked
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. NeedsmodelId.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. Needsmodelandinput.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. NeedsgenerationId.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. NeedsmodelId.get_api_key: Retrieve metadata for a single OpenRouter API key by hash. NeedskeyHash.get_guardrail: Retrieve a single OpenRouter guardrail by ID. NeedsguardrailId.
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. Needsmodelandmessages.create_api_key: Create a new OpenRouter API key. Needsname.update_guardrail: Update an OpenRouter guardrail's name, description, spending limit, provider/model restrictions, content filters, or ZDR settings. NeedsguardrailId.create_response: Create a response using OpenRouter's OpenResponses-compatible API. Needsinput.update_api_key: Update an OpenRouter API key name, spending limit, limit reset interval, disabled state, or BYOK-limit behavior. NeedskeyHash.
Destructive tools (2)
delete_api_key: Delete an OpenRouter API key by hash. NeedskeyHash.delete_guardrail: Delete an OpenRouter guardrail by ID. NeedsguardrailId.
Triggers
OpenRouter has 2 triggers, which fire on events in OpenRouter:
inbound_webhookcredit_balance_change: Triggers when the OpenRouter credit balance changes, indicating new usage or deposits.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use OpenRouter there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- OpenRouter on metorial.com: the integration overview