add-team

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Add Team

创建团队

Create a new team on a live LiteLLM proxy.
在运行中的LiteLLM代理上创建新团队。

Setup

准备工作

Ask for these if not already known:
LITELLM_BASE_URL  — e.g. https://my-proxy.example.com
LITELLM_API_KEY   — proxy admin key
如果尚未知晓以下信息,请向用户询问:
LITELLM_BASE_URL  — 示例:https://my-proxy.example.com
LITELLM_API_KEY   — 代理管理员密钥

Ask the user

向用户询问的信息

  1. Team name (required, becomes
    team_alias
    )
  2. Max budget (optional, e.g.
    100.00
    )
  3. Allowed models (optional, e.g.
    gpt-4o, gpt-4o-mini
    ) — leave empty to allow all
  4. TPM / RPM limits (optional)
  1. 团队名称(必填,将作为
    team_alias
  2. 最高预算(可选,例如
    100.00
  3. 允许使用的模型(可选,例如
    gpt-4o, gpt-4o-mini
    )——留空则允许所有模型
  4. TPM / RPM限制(可选)

Run

执行步骤

bash
BASE="$LITELLM_BASE_URL"
KEY="$LITELLM_API_KEY"

curl -s -X POST "$BASE/team/new" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "team_alias": "<name>",
    "max_budget": <budget_or_null>,
    "models": [<models_or_empty>],
    "tpm_limit": <tpm_or_null>,
    "rpm_limit": <rpm_or_null>
  }'
bash
BASE="$LITELLM_BASE_URL"
KEY="$LITELLM_API_KEY"

curl -s -X POST "$BASE/team/new" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "team_alias": "<name>",
    "max_budget": <budget_or_null>,
    "models": [<models_or_empty>],
    "tpm_limit": <tpm_or_null>,
    "rpm_limit": <rpm_or_null>
  }'

Verify

验证

Confirm the team was created:
bash
curl -s "$BASE/team/info?team_id=<team_id>" \
  -H "Authorization: Bearer $KEY"
确认团队已创建:
bash
curl -s "$BASE/team/info?team_id=<team_id>" \
  -H "Authorization: Bearer $KEY"

Output

输出内容

Show the user:
  • team_id
    — they'll need this to generate keys for the team
  • team_alias
    ,
    max_budget
    ,
    models
On error:
  • 401 — check that
    LITELLM_API_KEY
    is a valid admin key
  • 400 — check required fields (team_alias is required)
  • Other errors — show
    detail
    and the likely fix
向用户展示:
  • team_id
    — 用户需要此ID来为团队生成密钥
  • team_alias
    ,
    max_budget
    ,
    models
出现错误时:
  • 401 — 检查
    LITELLM_API_KEY
    是否为有效的管理员密钥
  • 400 — 检查必填字段(team_alias为必填项)
  • 其他错误 — 展示
    detail
    字段内容及可能的修复方案