add-key

Generate a new API key on a live LiteLLM proxy via POST /key/generate.

77|12|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/BerriAI/litellm-skills --skill add-key
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-key
Source: https://github.com/BerriAI/litellm-skills/tree/main/add-key
Command: npx skills add https://github.com/BerriAI/litellm-skills --skill add-key

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate a new API key for a live LiteLLM proxy to securely grant access to services or teams.

Core Features & Use Cases

  • Create API keys via POST /key/generate with a proxy admin.
  • Specify alias, scope (user or team), allowed models, max budget, and expiry.
  • Use Case: Provision keys for applications or teams that need controlled access to the proxy.

Quick Start

Generate a new API key for alias 'my-app-prod' with a scope assigned to a user or team and an optional expiry.

Frequently Asked Questions about add-key

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a new API key for a LiteLLM proxy?

To generate a LiteLLM API key, issue a POST request to the /key/generate endpoint with a JSON payload specifying key_alias, team_id or user_id, allowed models, max_budget, and duration using curl.

Can I set budget constraints and model limits when provisioning LiteLLM proxy keys?

Yes, when creating a LiteLLM proxy key you can define max_budget constraints and specify allowed models within the JSON payload to control access and spending for the provisioned key.

What do I need to create API keys on a live LiteLLM proxy?

You need curl installed and access to a live LiteLLM proxy to provision API keys. The process issues a POST request to the proxy's /key/generate endpoint with the required JSON configuration.

How does API key scoping work for teams and users in LiteLLM?

LiteLLM API key scoping assigns access to either a user or a team by including the user_id or team_id parameter in the /key/generate request, ensuring keys are provisioned with the correct access level.

Can I set an expiry duration when generating LiteLLM proxy keys?

Yes, you can set an expiry duration when generating a LiteLLM proxy key by including the duration parameter in the JSON payload sent to the /key/generate endpoint, ensuring keys expire automatically.