Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

openrouter-install-auth

Skill by jeremylongshore

Sets up OpenRouter API authentication for a new integration. It covers API key setup, client configuration, auth checks, key rotation and common auth errors, for developers using OpenRouter.

  • Score 79
  • 3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install openrouter-install-auth

Built from the published package, never by AI.

git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/openrouter-install-auth ~/.claude/skills/openrouter-install-auth

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install openrouter-install-auth in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill walks a user through setting up OpenRouter API credentials. It covers creating a key at openrouter.ai/keys, storing it in OPENROUTER_API_KEY, and configuring the OpenAI-compatible client at https://openrouter.ai/api/v1 with HTTP-Referer and X-Title headers. It also explains the key formats: standard, management and BYOK provider keys.

Verification calls the auth endpoint, which reports the key label, credits used, credit limit, free-tier flag and rate limit. A test request then goes to the free model google/gemma-2-9b-it:free. The skill also shows key creation and listing through the Management API and maps 401 and 403 errors to fixes. It is aimed at developers starting a new OpenRouter integration, rotating keys or troubleshooting auth issues.

Written from the project's SKILL.md and checked against it.

What it can do

  • Key setupWalks through creating an sk-or-v1 API key and storing it in an environment variable or .env file.
  • Client configurationShows how to initialize the OpenAI SDK in Python or TypeScript against the OpenRouter base URL.
  • Auth verificationCalls /api/v1/auth/key to print the key label, credits used, credit limit and rate limit.
  • Test requestSends a short chat completion to a free model to confirm the key works end to end.
  • Key rotationShows how to create and list API keys with a management key through the Management API.
  • Error referenceLists common 401 and 403 auth errors with their causes and fixes.

What you need

  • OpenRouter account
  • Python 3.8+ or Node.js 18+
  • OpenAI SDK (openai package)
  • Management key for programmatic key rotation

Try asking

  • Set up OpenRouter authentication for my Python app
  • Verify my OpenRouter key and show my credit usage
  • Help me rotate my OpenRouter API key

Good to know

  • The sk-or-v1 key is shown only once when created.
  • Management keys can only provision keys and cannot call completions.
  • Credit limits per key are optional.

Security check

B
  • Allowed to use Write, Edit without limitsIn SKILL.md

Checked automatically: skills/.curated/openrouter-install-auth/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditGrepBash(python3:*)Bash(node:*)Bash(pip:*)Bash(npm:*)

  • SKILL.md6 KB
  • references/environment-setup.md714 B
  • references/errors.md478 B
  • references/examples.md3 KB

Alternatives to openrouter-install-auth

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

openrouter-install-auth: common questions

Where do I get an OpenRouter API key?

Create one at openrouter.ai/keys. The source says the key value is shown only once, so copy it right away.

What is a management key used for?

The source says a management key is for key provisioning only and cannot call completions. It is used with the Management API to create and list keys.

Which auth errors does the skill cover?

It lists 401 invalid_api_key and missing_api_key, and 403 insufficient_credits and key_disabled, each with a suggested fix.

How do I install openrouter-install-auth?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is openrouter-install-auth free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is openrouter-install-auth safe to use?

It scores 79 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.

What are alternatives to openrouter-install-auth?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

openrouter-install-auth Install

Add to stack

Loading.