openrouter-team-setup

Featured

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'.

AI & Automation 2,926 stars 433 forks Updated yesterday 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 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. ## Key Provisioning via Management API ```python import os, requests MGMT_KEY = os.environ["OPENROUTER_MGMT_KEY"] # Management key (cannot call completions) def create_team_key(name: str, credit_limit: float = 25.0) -> dict: """Create a new API key for a team member.""" resp = requests.post( "https://openrouter.ai/api/v1/keys", headers={"Authorization": f"Bearer {MGMT_KEY}"}, json={"name": name, "limit": credit_limit}, ) resp.raise_for_status() data = resp.json()["data"] return { "key": data["key"], # sk-or-v1-... (shown once) "hash": data["key_hash"], # For later identification "name": name, "limit": credit_limit, } def list_team_keys() -> list[dict]: """List all keys with usage and limits.""" resp = requests.get( "https://openrouter.ai/api/v1/keys", headers={"Authorization": f"Bearer {MGMT_KEY}"}, ) return [ { "name": k.get("name"), "hash": k.get("key_hash"), "usage": k.get("usage", 0), "limit": k.get("limit"), "is_free_tier": k.get("is_free_tier", False...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category