openrouter-install-auth

Featured

Set up OpenRouter API authentication and configure API keys. Use when starting a new OpenRouter integration, rotating keys, or troubleshooting auth issues. Triggers: 'openrouter setup', 'openrouter api key', 'configure openrouter auth', 'sk-or key'.

API & Backend 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# OpenRouter Install & Auth ## Overview Set up OpenRouter API credentials, configure the OpenAI-compatible client, verify authentication, and check credit balance. OpenRouter keys start with `sk-or-v1-` and authenticate against `https://openrouter.ai/api/v1`. ## Prerequisites - OpenRouter account (free at [openrouter.ai](https://openrouter.ai)) - Python 3.8+ or Node.js 18+ - OpenAI SDK (`pip install openai` or `npm install openai`) ## Quick Setup ### 1. Generate an API Key 1. Go to [openrouter.ai/keys](https://openrouter.ai/keys) 2. Click **Create Key**, name it (e.g., `my-app-dev`) 3. Copy the `sk-or-v1-...` value immediately (shown only once) 4. Optionally set a credit limit on the key for spend control ### 2. Configure Environment ```bash # .env file (add .env to .gitignore!) OPENROUTER_API_KEY=sk-or-v1-your-key-here # Or export directly export OPENROUTER_API_KEY="sk-or-v1-your-key-here" ``` ### 3. Initialize the Client **Python:** ```python from openai import OpenAI client = OpenAI( base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"], default_headers={ "HTTP-Referer": "https://your-app.com", # For analytics attribution "X-Title": "Your App Name", # Shows in dashboard }, ) ``` **TypeScript:** ```typescript import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://openrouter.ai/api/v1", apiKey: process.env.OPENROUTER_API_KEY, defaultHeaders: { "HTTP-Referer...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

openrouter-team-setup

Configure OpenRouter for multi-user teams with per-user keys, budget controls, and usage attribution. Triggers: 'openrouter team', 'openrouter multi-user', 'openrouter organization', 'team api keys openrouter'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering error codes, unexpected failures, or debugging API responses. Triggers: 'openrouter error', 'openrouter 401', 'openrouter 429', 'openrouter 402', 'fix openrouter'.

2,266 Updated today
jeremylongshore
API & Backend Listed

openrouter-usage

Query OpenRouter API costs, credits, and usage breakdown by model, provider, and date. This skill should be used when checking API spending, auditing costs, or generating usage reports for the last 30 days.

33 Updated yesterday
tdimino
AI & Automation Featured

openrouter-openai-compat

Migrate from OpenAI to OpenRouter with minimal code changes. Use when switching to OpenRouter or maintaining dual compatibility. Triggers: 'openrouter openai compatible', 'openrouter drop-in', 'openai to openrouter', 'openrouter migration'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

openrouter-reference-architecture

Design production architectures using OpenRouter as the LLM gateway. Use when planning system design, reviewing architecture, or scaling AI applications. Triggers: 'openrouter architecture', 'openrouter system design', 'openrouter at scale', 'llm gateway architecture'.

2,266 Updated today
jeremylongshore