openrouter

openrouter is a skill for Claude Code from naveedharri/benai-skills. It costs 18 tokens per session (2,676 once invoked), scanned A, original, MIT.

An API service that provides one interface for calling AI models from different providers. An API is a programmatic way for software to request a service.

In plain words
What is it for?
Use it to call multiple AI models through an OpenAI-compatible interface, select or compare models, configure response sampling, stream results, or add provider failover.
Why use it?
It avoids writing separate integrations for each model provider and supports common needs such as streaming, structured JSON, routing, fallbacks, and cost comparison.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the all-skills plugin — 99 skills shipped together

Good fit Use it to call multiple AI models through an OpenAI-compatible interface, select or compare models, configure response sampling, stream results, or add provider failover.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/naveedharri/benai-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 naveedharri/benai-skills --skill openrouter
Clone the repo
git clone --depth 1 https://github.com/naveedharri/benai-skills

Made for: Claude Code.

Or install all-skills, the plugin that ships this one along with the rest of its 99 skills.

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/naveedharri/benai-skills/openrouter/github.svg)](https://agentmods.dev/skills/naveedharri/benai-skills/openrouter)
Your own site
<a href="https://agentmods.dev/skills/naveedharri/benai-skills/openrouter"><img src="https://agentmods.dev/badge/skills/naveedharri/benai-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/naveedharri/benai-skills/openrouter"><img src="https://agentmods.dev/badge/skills/naveedharri/benai-skills/openrouter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 198
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Data Exfiltration · line 57
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00018 $0.02676
Opus 5 $0.00009 $0.01338
Sonnet 5 $0.00004 $0.00535
Haiku 4.5 $0.00002 $0.00268

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

Security

Grade A, and why

openrouter scanned grade A 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl https://openrouter.ai/api/v1/chat/completions \
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/all-skills/skills/openrouter/SKILL.md · 320 lines

How it starts

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

OpenRouter Skill

Comprehensive assistance with OpenRouter API development, providing unified access to hundreds of AI models through a single endpoint with intelligent routing, automatic fallbacks, and standardized interfaces.

When to Use This Skill

This skill should be triggered when:

  • Making API calls to multiple AI model providers through a unified interface
  • Implementing model fallback strategies or auto-routing
  • Working with OpenAI-compatible SDKs but targeting multiple providers
  • Configuring advanced sampling parameters (temperature, top_p, penalties)
  • Setting up streaming responses or structured JSON outputs
  • Comparing costs across different AI models
  • Building applications that need automatic provider failover
  • Implementing function/tool calling across different models
  • Questions about OpenRouter-specific features (routing, fallbacks, zero completion insurance)

Quick Reference

Basic Chat Completion (Python)

from openai import OpenAI

client = OpenAI(
  base_url="https://openrouter.ai/api/v1",
  api_key="<OPENROUTER_API_KEY>",
)

completion = client.chat.completions.create(
  model="openai/gpt-4o",
  messages=[{"role": "user", "content": "What is the meaning of life?"}]
)
print(completion.choices[0].message.content)

Basic Chat Completion (JavaScript/TypeScript)

import OpenAI from 'openai';

const openai = new OpenAI({
  baseURL: 'https://openrouter.ai/api/v1',
  apiKey: '<OPENROUTER_API_KEY>',
});

const completion = await openai.chat.completions.create({
  model: 'openai/gpt-4o',
  messages: [{"role": 'user', "content": 'What is the meaning of life?'}],
});
console.log(completion.choices[0].message);

cURL Request

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [{"role": "user", "content": "What is the meaning of life?"}]
  }'

Model Fallback Configuration (Python)

completion = client.chat.completions.create(
    model="openai/gpt-4o",
    extra_body={
        "models": ["anthropic/claude-3.5-sonnet", "gryphe/mythomax-l2-13b"],
    },
    messages=[{"role": "user", "content": "Your prompt here"}]
)

Read the full file on GitHub · 320 lines

Files

What ships with it

7 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. 6d ago First seen · 320 lines · 18 tokens per session scan A 996328dc5f2b

Subscribe to this mod's changes

openrouter is a skill published in the GitHub repository naveedharri/benai-skills (61 stars, last pushed 7d ago), licensed MIT. It adds 18 tokens to every session and 2,676 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.