OpenRouter

OpenRouter

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check the key's spending, look up past generations, and send chat completions, embeddings and image requests to any model.

7 giorni gratis · senza carta · hosting UE

Chiedi qualsiasi cosa a OpenRouter

Prova un prompt reale su OpenRouter via AnythingMCP — Claude chiama i tool e risponde. Premi Enter sul tuo messaggio per installare su Cloud.

Installa OpenRouter su Cloud
OpenRouter · live via MCP
Condividi
Opus 4.7

Claude è un'AI e può sbagliare. Verifica sempre le risposte.

Setup in 2 minuti

  1. 1Avvia la trial gratuita su cloud.anythingmcp.com.
  2. 2Clicca OpenRouter nel connector store. Incolla le credenziali quando richiesto.
  3. 3Genera una MCP API key e punta il client AI all'URL MCP generato.
Installa OpenRouter ora

Guide per OpenRouter

Setup passo-passo per i principali client AI.

Configurare OpenRouter

Direttamente dalla definizione del connettore: dove trovare le credenziali, quali permessi servono e con quale API parla questo adapter. Fornite in inglese dall'autore del connettore.

OpenRouter

This connector uses the OpenRouter API (https://openrouter.ai/api/v1), one OpenAI-compatible endpoint in front of hundreds of models from OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek and others. It searches the model catalog, compares providers, prices and benchmarks, shows what the key has spent, looks up past generations, and sends chat completions, embeddings and image requests to any model.

Setup (2 minutes)

  1. Sign in at https://openrouter.ai and add credits under Settings, Credits (free :free models work without credits, within daily limits).
  2. Open Settings, API Keys (https://openrouter.ai/settings/keys), click Create Key, give it a name and, strongly recommended, a credit limit: the key can spend the account balance up to that limit.
  3. Paste the key (it starts with sk-or-v1-) into OPENROUTER_API_KEY. It is sent as Authorization: Bearer. Requests carry HTTP-Referer and X-OpenRouter-Title headers that name AnythingMCP as the calling app on OpenRouter.
  4. Run openrouter_get_current_key to check the key.

Workflow

  • Choose a model: openrouter_list_models (filters such as q, category, supported_parameters=tools, max_price, context, sort=pricing-low-to-high) or openrouter_list_user_models for the models this key may use under the account's privacy settings and guardrails. Then openrouter_get_model for one model's details, openrouter_list_model_endpoints for the providers that serve it with their prices, uptime, latency and throughput, and openrouter_list_providers for provider slugs and data policies.
  • Compare quality and popularity: openrouter_list_benchmarks (Artificial Analysis, Design Arena, OpenRouter evals), openrouter_get_model_rankings (top models by tokens per day, week or month).
  • Run a model: openrouter_chat_completion with model and messages; models adds fallbacks, provider steers routing (order, only, sort by price or throughput, data_collection deny, zdr), response_format asks for JSON, reasoning sets the effort. openrouter_create_embeddings for vectors, openrouter_generate_image for images (returned as image content). These three spend credits: confirm with the user before repeated or large calls and set max_completion_tokens to cap a reply.
  • Spending: openrouter_get_current_key shows the key's limit, limit_remaining and usage today, this week, this month and in total. openrouter_get_generation gives the exact cost, tokens and provider of one call (its id is the id of the completion; it can take a few seconds to appear), openrouter_get_generation_content the stored prompt and output when prompt logging is on.

Reading the answers

  • Model ids are author/slug (openai/gpt-4o); split them for author and slug. Variants: :free (free, rate limited), :online (web search), :nitro (fastest provider), :floor (cheapest), :thinking.
  • Prices in the catalog are strings in USD per token ("0.0000025" = 2.50 USD per million tokens); request and image are per request or per image. The max_price filters and the routing max_price take USD per million tokens. Costs and usage in key and generation answers are USD.
  • A completion returns choices[0].message.content, the finish_reason (stop, length when the token cap was hit, tool_calls, content_filter) and usage with token counts and cost. The provider field says who served it.
  • created is Unix seconds; dates are UTC.

Paging: the model list tools return 50 models by default; pass offset 50, 100, ... with the same limit until a page comes back shorter than limit. Prefer filters and sort over reading the whole catalog.

Limits: :free models allow 20 requests a minute and 50 a day (1,000 a day once 10 USD of credits were ever bought). Paid models are limited by the account balance, the key's credit limit and any budgets an organization admin set; openrouter_get_current_key shows them. Benchmarks allow 30 requests a minute per key.

Not included: credit balance of the whole account, activity reports, analytics and key management need a separate management key and are not part of this connector; streaming, the legacy text completions endpoint, batches, video and audio are not exposed either.

Errors: 401 invalid or disabled key; 402 not enough credits or the key's limit is used up (error.metadata.limit_source says which; add credits or raise the limit); 403 blocked by a guardrail or moderation; 404 unknown model or generation; 408 timeout; 429 rate limited (wait, or use a paid variant); 502 the model's provider failed; 503 no provider matches the routing requirements (relax provider). A provider error during generation can arrive with HTTP 200 and an error object; it is reported as a failed call.

La tua AI è a due click da OpenRouter.

Installa il connettore, incolla le credenziali, chiedi all'AI. 7 giorni gratis, niente carta.