Agent skill · marketing growth · jeremylongshore

openrouter-team-setup

Configure OpenRouter for multi-user teams with per-user keys, budget

Why this skill is useful

Adds executable scripts for managing team API keys and budgets in OpenRouter that are not available in public documentation.

What it needs

Requires curl, jq, python3 installed locally. Requires openrouter account access. About 5k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

OpenRouter Team Setup Overview OpenRouter supports team usage through per-user API keys with individual credit limits, management keys for programmatic key provisioning, and usage attribution via headers. This skill covers key provisioning, per-user budgets, usage tracking, and governance policies for multi-user deployments. Prerequisites A management key (sk-or-v1-...) with provisioning rights exported as OPENROUTERMGMTKEY — created separately at openrouter.ai/keys; it can create/list/delete API keys but cannot call completions A regular OpenRouter API key exported as OPENROUTERAPIKEY for the shared-key attribution pattern — see the openrouter-install-auth skill for setup Python 3.8+ with the OpenAI SDK and requests; sqlite3 (stdlib) backs the per-user budget database curl and jq for the Team Key Dashboard Script Instructions 1. Create a management key at openrouter.ai/keys and export it as OPENROUTERMGMTKEY. 2. Provision one key per team member via Key Provisioning via Management API — createteamkey(name, creditlimit) posts to /api/v1/keys; record the one-time key value and keep the keyhash for later listing/revocation. 3. Alternatively, keep a single shared key and attribute usage per user with the Shared Key with User Attribution pattern (X-Title: my-app:{userid} header shows each user in the dashboard). 4. Enforce spend locally with Per-User Budget Enforcement — initialize the userusage / userbudgets sqlite tables, call checkuserbudget before each request and recorduserusage after. 5. Gate expensive models per tier with the Model Governance allowlists (enforcemodelpolicy downgrades disallowed requests). 6. Monitor continuously: run the Team Key Dashboard Script (curl + jq against /api/v1/keys) and generate the weekly Team Usage Report from the sqlite DB. 7. Revoke keys for departed members with deleteteamkey(keyhash) (DELETE /api/v1/keys/{hash}). …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/openrouter-team-setup--1d92e5

View the source on GitHub

Browse the @skills marketplace