About openrouter
openrouter is a command-line skill for discovering models and sending prompts through OpenRouter. It also provides integration examples for Node.js, Cloudflare Workers, and browsers.
Key features
- 01List models, capabilities, and pricing
- 02Filter models by name
- 03Print integration examples by environment
- 04Send prompts to OpenRouter models
Use cases
- 01Compare available models and pricing
- 02Find example code for a target environment
- 03Request a response from a selected model
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ aibtcdev/ skills --skill openrouterAfter installing, type/openrouterin Claude Code to confirm it loaded.
Bundled filesAGENT.mdopenrouter.ts
Details
From the project READMEOpenRouter Skill
Provides AI integration capabilities via OpenRouter — a unified API for 100+ LLMs.
- Model Discovery — List available OpenRouter models with capabilities, context windows, and pricing.
- Integration Guide — Get code examples and patterns for integrating OpenRouter in different environments (Node.js, Cloudflare Workers, browser).
- Chat — Send a prompt to any OpenRouter model and return the response. Requires
OPENROUTER_API_KEYenv var.
Usage
bun run openrouter/openrouter.ts <subcommand> [options]
Subcommands
models
List available OpenRouter models with capabilities and pricing.
bun run openrouter/openrouter.ts models [--filter <term>]
Options:
--filter(optional) — Filter models by name (case-insensitive substring match)
guide
Print integration code examples for a target environment.
bun run openrouter/openrouter.ts guide [--env <environment>] [--feature <feature>]
Options:
--env— Target environment:nodejs|cloudflare-worker|browser|all(default:all)--feature— Feature to show:chat|completion|streaming|function-calling|all(default:all)
chat
Send a prompt to an OpenRouter model. Requires OPENROUTER_API_KEY environment variable.
bun run openrouter/openrouter.ts chat --prompt "Hello" [--model <model-id>] [--max-tokens <n>]
Options:
--prompt(required) — The prompt to send--model(optional) — Model ID (default:openai/gpt-4o-mini)--max-tokens(optional) — Max tokens in response (default: 1024)
Notes
modelsandguidework without an API key.chatrequiresOPENROUTER_API_KEYenvironment variable (get from https://openrouter.ai/keys).- OpenRouter API base:
https://openrouter.ai/api/v1
Comments
Markdown supported