openrouter

openrouter is a skill for Claude Code from bobmatnyc/claude-mpm-skills. It costs 32 tokens per session (7,130 once invoked), scanned B, original, MIT.

A single programming interface for accessing many language models from different providers through OpenRouter, an online AI gateway.

In plain words
What is it for?
Use it to call models through an OpenAI-compatible API, stream replies, select fallback models, support vision or function calls, and monitor token costs.
Why use it?
It avoids maintaining separate integrations for each model and can provide model routing, streaming responses, fallbacks, and usage tracking.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: positional $N argument.

Good fit Use it to call models through an OpenAI-compatible API, stream replies, select fallback models, support vision or function calls, and monitor token costs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bobmatnyc/claude-mpm-skills/openrouter
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bobmatnyc/claude-mpm-skills --skill openrouter
Clone the repo
git clone --depth 1 https://github.com/bobmatnyc/claude-mpm-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openrouter

README.md
[![agentmods](https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/openrouter/github.svg)](https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/openrouter)
Your own site
<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/openrouter"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/openrouter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openrouter

Your own site · 80×15
<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/openrouter"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/openrouter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,130 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 25 Apr 2026
  • Snyk warn 25 Apr 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.07130
Opus 5 $0.00016 $0.03565
Sonnet 5 $0.00006 $0.01426
Haiku 4.5 $0.00003 $0.00713

Measured 11d ago against content hash fd560f54a082, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

openrouter scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

const res = await fetch('https://openrouter.ai/api/v1/chat/completions', { method: 'POST',
toolchains/ai/services/openrouter/SKILL.md · 1,137 lines

How it starts

The opening of the file, as written. The whole thing — 1,137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenRouter - Unified AI API Gateway

Overview

OpenRouter provides a single API to access 200+ language models from OpenAI, Anthropic, Google, Meta, Mistral, and more. It offers intelligent routing, streaming, cost optimization, and standardized OpenAI-compatible interface.

Key Features:

  • Access 200+ models through one API
  • OpenAI-compatible interface (drop-in replacement)
  • Intelligent model routing and fallbacks
  • Real-time streaming responses
  • Cost tracking and optimization
  • Model performance analytics
  • Function calling support
  • Vision model support

Pricing Model:

  • Pay-per-token (no subscriptions)
  • Volume discounts available
  • Free tier with credits
  • Per-model pricing varies

Installation:

npm install openai  # Use OpenAI SDK
# or
pip install openai  # Python

Quick Start

1. Get API Key

# Sign up at https://openrouter.ai/keys
export OPENROUTER_API_KEY="sk-or-v1-..."

2. Basic Chat Completion

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://openrouter.ai/api/v1',
  apiKey: process.env.OPENROUTER_API_KEY,
  defaultHeaders: {
    'HTTP-Referer': 'https://your-app.com',  // Optional
    'X-Title': 'Your App Name',              // Optional
  }
});

async function chat() {
  const completion = await client.chat.completions.create({
    model: 'anthropic/claude-3.5-sonnet',
    messages: [
      { role: 'user', content: 'Explain quantum computing in simple terms' }
    ],
  });

  console.log(completion.choices[0].message.content);
}

3. Streaming Response

async function streamChat() {
  const stream = await client.chat.completions.create({
    model: 'openai/gpt-4-turbo',
    messages: [
      { role: 'user', content: 'Write a short story about AI' }
    ],
    stream: true,
  });

  for await (const chunk of stream) {
    const content = chunk.choices[0]?.delta?.content || '';
    process.stdout.write(content);
  }
}

Model Selection Strategy

Read the full file on GitHub · 1,137 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 1,137 lines · 32 tokens per session scan B fd560f54a082

Subscribe to this mod's changes

openrouter is a skill published in the GitHub repository bobmatnyc/claude-mpm-skills (74 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 7,130 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

llm-integration

Claude and OpenAI API patterns, prompt design, context management, streaming, tool use, cost control, multi-model routing.

LuuOW/meridian-mcp · 29 tokens

groq-inference

Ultra-fast LLM inference on custom LPU hardware. OpenAI-compatible API at api.groq.com. Lowest latency in the industry (500-1000+ tok/s). Supports chat completions, vision, audio (Whisper STT + TTS), tool calling, JSON mode, and streaming. Free tier available. Inference only — no training.

synthetic-sciences/openscience · 77 tokens

grpc-expert

Expert-level gRPC, Protocol Buffers, microservices communication, and streaming. Use when the user mentions Protocol Buffers, microservices, RPC, or streaming, or when the task involves gRPC Fundamentals, Communication Patterns, or Production Features.

personamanagmentlayer/pcl · 53 tokens

model-strategy

Multi-model orchestration and model-switching strategy. Score-based model selection, reasoning-effort routing, cross-agent delegation (Gemini, Codex, Ollama), advisor pairing, escalation triggers, permission matrix, and cost-efficiency optimization.

ellmos-ai/skills · 52 tokens

kimi-code-api

Integration guidance for Kimi Code, a coding model service, using its login flow, tokens, chat requests, and model-list requests.

LSTM-Kirigaya/jinhui-skills · 80 tokens

serving-llms-vllm

Use when deploying production LLM APIs, optimizing inference latency/throughput, or serving models with limited GPU memory. Supports OpenAI-compatible endpoints, quantization (GPTQ/AWQ/FP8), and tensor parallelism.

NousResearch/hermes-agent · 27 tokens