openrouter
Original:🇺🇸 English
Translated
1 scripts
OpenRouter AI integration — list available models, get integration code examples for different environments, and send prompts to any OpenRouter-compatible model. Requires OPENROUTER_API_KEY env var for chat operations.
19installs
Sourceaibtcdev/skills
Added on
NPX Install
npx skill4agent add aibtcdev/skills openrouterTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →OpenRouter 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 env var.
OPENROUTER_API_KEY
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:
- (optional) — Filter models by name (case-insensitive substring match)
--filter
guide
Print integration code examples for a target environment.
bun run openrouter/openrouter.ts guide [--env <environment>] [--feature <feature>]Options:
- — Target environment:
--env|nodejs|cloudflare-worker|browser(default:all)all - — Feature to show:
--feature|chat|completion|streaming|function-calling(default:all)all
chat
Send a prompt to an OpenRouter model. Requires environment variable.
OPENROUTER_API_KEYbun run openrouter/openrouter.ts chat --prompt "Hello" [--model <model-id>] [--max-tokens <n>]Options:
- (required) — The prompt to send
--prompt - (optional) — Model ID (default:
--model)openai/gpt-4o-mini - (optional) — Max tokens in response (default: 1024)
--max-tokens
Notes
- and
modelswork without an API key.guide - requires
chatenvironment variable (get from https://openrouter.ai/keys).OPENROUTER_API_KEY - OpenRouter API base:
https://openrouter.ai/api/v1