OpenRouter MCP by usefulapi

v1.2.1
io.usefulapi/openrouter Checked 3 days ago Published 2 days ago

Read account credits, keys, guardrails and usage, and browse the model catalog in OpenRouter.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

openrouter_get_current_key Get the current API key

Get the API key this connection uses: its label, spend and remaining limit, budgets, expiry, free-tier status and data regions. A good first call to check the connection. OpenRouter API: GET /key.

openrouter_get_credits Get credit balance

Get the account's total credits purchased and used. Needs a MANAGEMENT key (a normal API key gets HTTP 401 or 403). OpenRouter API: GET /credits.

openrouter_get_activity Get activity by endpoint

Get account activity grouped by endpoint for the last 30 completed UTC days: requests, tokens and spend. May need a MANAGEMENT key (HTTP 401 or 403 otherwise). OpenRouter API: GET /activity.

ParameterTypeDescription
api_key_hashstringOnly activity of this API key hash.
datestringOne UTC day, yyyy-mm-dd (default: the last 30 days).
group_bystringUse 'workspace' to split each row per workspace.
user_idstringOnly activity of this user id.
workspace_idstringScope the result to one workspace id.

openrouter_list_keys List API keys

List the API keys on the account, with usage and limits. Needs a MANAGEMENT key (a normal API key gets HTTP 401 or 403). OpenRouter API: GET /keys.

ParameterTypeDescription
include_disabledbooleanInclude disabled keys.
include_expiredbooleanInclude expired keys.
offsetintegerNumber of items to skip.
workspace_idstringScope the result to one workspace id.

openrouter_get_key Get an API key

Get one API key by its hash (from openrouter_list_keys): usage, limit, expiry and budgets. Needs a MANAGEMENT key. OpenRouter API: GET /keys/{hash}.

ParameterTypeDescription
hash *stringThe API key hash (from openrouter_list_keys).

openrouter_list_guardrails List guardrails

List the guardrails (spend and provider rules for keys and members). Needs a MANAGEMENT key. OpenRouter API: GET /guardrails.

ParameterTypeDescription
limitintegerMaximum number of items to return.
offsetintegerNumber of items to skip.
workspace_idstringScope the result to one workspace id.

openrouter_get_guardrail Get a guardrail

Get one guardrail by id (from openrouter_list_guardrails). Needs a MANAGEMENT key. OpenRouter API: GET /guardrails/{id}.

ParameterTypeDescription
guardrail_id *stringThe guardrail UUID (from openrouter_list_guardrails).

openrouter_get_generation Get generation metadata

Get the request and usage metadata of one past generation: model, provider, tokens, cost and latency. The id comes from the response of an earlier call (x-generation-id). OpenRouter API: GET /generation?id=.

ParameterTypeDescription
generation_id *stringThe generation id, for example gen-....

openrouter_get_generation_content Get stored generation content

Get the stored prompt, completion and error text of one past generation. Only works when the account stored that content (logging on). OpenRouter API: GET /generation/content?id=.

ParameterTypeDescription
generation_id *stringThe generation id, for example gen-....

openrouter_list_models List models

List the models OpenRouter offers: context length, prices per token, supported parameters and modalities. Filter with q, modalities or supported parameters. OpenRouter API: GET /models.

ParameterTypeDescription
input_modalitiesstringComma list, for example text,image.
limitintegerMaximum number of items to return.
offsetintegerNumber of items to skip.
output_modalitiesstringComma list, for example text or text,image.
qstringSearch text in the model name or description.
sortstringSort order the API accepts (for example price or context).
supported_parametersstringComma list of parameters, for example tools.

openrouter_list_models_for_account List models for this account

List the models this API key may use, after the account's provider and privacy settings and guardrails. Text output models by default. OpenRouter API: GET /models/user.

ParameterTypeDescription
limitintegerMaximum number of items to return.
offsetintegerNumber of items to skip.
output_modalitiesstringComma list, or all.
sortstringSort order the API accepts.

openrouter_count_models Count models

Get the total number of models OpenRouter offers, optionally by output modality. OpenRouter API: GET /models/count.

ParameterTypeDescription
output_modalitiesstringComma list, for example text.

openrouter_get_model Get a model

Get the full details of one model by its author and slug, for example openai and gpt-4o. Variant suffixes such as :free work. OpenRouter API: GET /model/{author}/{slug}.

ParameterTypeDescription
author *stringThe model author, for example openai.
slug *stringThe model slug, for example gpt-4o.

openrouter_list_model_endpoints List endpoints of a model

List the provider endpoints that serve one model, with each provider's price, context length, uptime and latency. OpenRouter API: GET /models/{author}/{slug}/endpoints.

ParameterTypeDescription
author *stringThe model author, for example openai.
slug *stringThe model slug, for example gpt-4o.

openrouter_list_providers List providers

List the upstream model providers OpenRouter routes to (name, slug, data policy links). OpenRouter API: GET /providers.

openrouter_list_embedding_models List embedding models

List the embedding models OpenRouter offers with their properties. OpenRouter API: GET /embeddings/models.

ParameterTypeDescription
limitintegerMaximum number of items to return.
offsetintegerNumber of items to skip.