OpenRouter MCP integration for AI agents.
Connect AI agents to OpenRouter through 13 structured actions, including get credits, create chat completion, and create coinbase charge. Review authenticati…
- ACTION CONTRACTS
- 13
- AUTHENTICATION
- API key
- SOURCE STATUS
- Provider-backed
CATALOG SOURCE REVIEWED AUGUST 23, 2026 / ACTION NAMES AND SCHEMAS DERIVED FROM WORKING MACHINES PROVIDER SOURCE
CAPABILITY PROFILE
What the OpenRouter integration exposes
The OpenRouter Agent App exposes 13 provider-backed actions for ai and developer tools work. Its current contract lets an authorized agent get the authenticated openrouter credit balance summary, create an openrouter chat completion through the openai-compatible `/chat/completions` endpoint, and call openrouter's deprecated coinbase charge endpoint for credits purchases. the upstream endpoint is currently deprecated and may return 410 gone. These operations are called through Working Machines as typed capabilities rather than through browser navigation or copied UI steps.
A connection uses API key. Before execution, the agent can inspect the selected action, its required fields, declared scopes, and expected output contract. Provider credentials remain inside the Working Machines runtime; the calling agent receives the capability and its structured result, not the underlying secret.
For reliable operation, start with the narrowest action that satisfies the task, resolve stable provider identifiers before changing state, and validate the returned object or status after execution. Availability still depends on the connected OpenRouter account, granted provider permissions, workspace policy, region, plan, and upstream API behavior.
VERIFIED ACTION SAMPLE
Real OpenRouter capabilities.
Showing 12 of 13 actions. Risk labels are conservative signals based on operation names, not substitutes for provider documentation or runtime policy.
get_creditsREADGet the authenticated OpenRouter credit balance summary.
create_chat_completionWRITECreate an OpenRouter chat completion through the OpenAI-compatible `/chat/completions` endpoint.
INPUTS: model / messages / n / stop / user
create_coinbase_chargeHIGH IMPACTCall OpenRouter's deprecated Coinbase charge endpoint for credits purchases. The upstream endpoint is currently deprecated and may return 410 Gone.
INPUTS: amount / sender / chain_id / httpReferer / xTitle
create_messageWRITECreate an OpenRouter Anthropic-format message through the `/messages` endpoint.
INPUTS: model / max_tokens / messages / user / tools
get_current_keyREADGet metadata for the currently authenticated OpenRouter API key.
INPUTS: httpReferer / xTitle
get_generationREADGet request and usage metadata for a specific OpenRouter generation.
INPUTS: id
get_models_countREADGet the total number of OpenRouter models, optionally filtered by output modalities.
INPUTS: outputModalities / httpReferer / xTitle
list_available_modelsREADList the available OpenRouter models, or return the RSS feed when requested.
INPUTS: category / supportedParameters / outputModalities / useRss / useRssChatLinks
list_embedding_modelsREADList the embedding models available through OpenRouter.
INPUTS: httpReferer / xTitle
list_model_endpointsREADList the currently available endpoints for a specific OpenRouter model.
INPUTS: author / slug
list_providersREADList the model providers currently available through OpenRouter.
list_user_modelsREADList models filtered by the current user's OpenRouter routing preferences, privacy settings, and guardrails.
INPUTS: httpReferer / xTitle
INPUT CONTRACTS
Know what the action needs before it runs.
create_chat_completion
modelREQUIRED- The model ID to use.
messagesREQUIRED- An ordered list of conversation messages.
nOPTIONAL- The number of choices to generate.
stopOPTIONAL- Stop sequences for generation.
userOPTIONAL- The end user's unique identifier.
create_coinbase_charge
amountREQUIRED- The USD amount to top up.
senderREQUIRED- The wallet address that initiated the payment.
chain_idREQUIRED- The chain ID used to initiate the payment.
httpRefererOPTIONAL- The application URL sent in the HTTP-Referer header for OpenRouter attribution and analytics.
xTitleOPTIONAL- The application display name sent in the X-Title header for OpenRouter console display.
create_message
modelREQUIRED- The model ID to use.
max_tokensREQUIRED- The maximum number of output tokens.
messagesREQUIRED- An ordered list of Anthropic-format messages.
userOPTIONAL- The end user's unique identifier.
toolsOPTIONAL- A list of JSON objects returned by OpenRouter.
get_current_key
httpRefererOPTIONAL- The application URL sent in the HTTP-Referer header for OpenRouter attribution and analytics.
xTitleOPTIONAL- The application display name sent in the X-Title header for OpenRouter console display.
PROVIDER-SPECIFIC WORKFLOWS
Jobs this Agent App can support
Inspect Get Credits
Get the authenticated OpenRouter credit balance summary. Use this as a bounded discovery step, retain the returned identifier, and avoid expanding the read beyond the task's stated scope.
get_creditsControl Create Chat Completion
Create an OpenRouter chat completion through the OpenAI-compatible `/chat/completions` endpoint. Resolve the target first, present material changes for confirmation, and make retries idempotent where the provider supports it.
create_chat_completionVerify with Get Current Key
Get metadata for the currently authenticated OpenRouter API key. Compare the returned provider state with the intended outcome and preserve stable IDs or canonical links in the run record.
get_current_keySAFETY BOUNDARY
Operate OpenRouter with explicit limits
- Authorize OpenRouter with API key and grant only the provider access required by the selected actions.
- 3 actions are change-capable by name. Confirm the target identity and material parameters before allowing a write.
- Treat `create_coinbase_charge` as high-impact operations and require an explicit approval boundary.
- No provider scope string is declared on the sampled actions. Verify the connected account's actual permissions in OpenRouter rather than assuming unrestricted access.
- After a call, inspect the structured result and execution record before reporting that the OpenRouter task completed successfully.
CONNECTION MODEL
API key
OpenRouter API key used with the Authorization Bearer header. Get it from https://openrouter.ai/settings/keys.
Working Machines stores provider credentials behind the execution boundary. An agent can use an authorized connection identity, but catalog discovery alone does not reveal OAuth tokens, API keys, or provider secrets.
- READ SIGNALS
- 10
- WRITE SIGNALS
- 2
- HIGH IMPACT
- 1
- REVIEW SIGNALS
- 0
EVIDENCE AND AVAILABILITY
Provider reference
Action names, input fields, authentication types, and counts on this page are generated from the Working Machines provider catalog. Provider behavior, quotas, object semantics, account eligibility, and regional availability remain governed by OpenRouter.