# LiteLLM

> Manage your LiteLLM Proxy: send prompts to its models, create, limit, block and replace keys, manage teams and users, and read what each request cost. Start a workflow when a key nears its budget or is about to expire, or a request fails.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/litellm

## Actions

### Add team member

Add someone to a team, by user or by email address. LiteLLM adds them as a user if the email is new.

**Inputs**

- Team (`litellm_team_id`, text, required): The team. Pick one, or give its ID from an earlier step.
- User (`litellm_user_id`, text): The user to add. Give this or an email address.
- Email (`email`, text): The email address of who to add, if they aren't a user yet.
- Role on the team (`role`, text): Team admins can manage the team. Defaults to Member. One of: `user` (Member), `admin` (Team admin). Default: `user`.
- Their budget (US dollars) (`max_budget_in_team`, number): The most they may spend through the team. At least 0.

**Outputs**

- `team` (object): The team, as it is now
- `user` (object): The member

**Example output**

```json
{
  "team": {
    "blocked": false,
    "budget_duration": "1mo",
    "budget_reset_at": "2026-12-01T00:00:00Z",
    "created_at": "2026-10-01T09:00:00Z",
    "max_budget": 200.0,
    "members_with_roles": [
      {
        "role": "admin",
        "user_email": "amelie@example.com",
        "user_id": "amelie@example.com"
      }
    ],
    "metadata": {},
    "models": [
      "gpt-4o-mini",
      "claude-sonnet"
    ],
    "rpm_limit": 120,
    "spend": 31.2,
    "team_alias": "Support",
    "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
    "tpm_limit": 200000
  },
  "user": {
    "budget_duration": "30d",
    "created_at": "2026-10-01T09:00:00Z",
    "max_budget": 20.0,
    "metadata": {},
    "models": [],
    "spend": 4.1,
    "teams": [
      "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab"
    ],
    "user_alias": "Amelie",
    "user_email": "amelie@example.com",
    "user_id": "amelie@example.com",
    "user_role": "internal_user"
  }
}
```

### Block or unblock key

Block a key so every request with it is refused, such as when it has leaked, or unblock it again.

**Inputs**

- Key (`key_id`, text, required): The key. Pick one, or give its ID (token) from an earlier step.
- Block or unblock (`decision`, text, required): Block stops the key working; unblock lets it work again. One of: `block` (Block (the key stops working)), `unblock` (Unblock (the key works again)).

**Outputs**

- `key` (object): The key, as it is now

**Example output**

```json
{
  "key": {
    "blocked": true,
    "budget_duration": "30d",
    "budget_reset_at": "2026-12-01T00:00:00Z",
    "created_at": "2026-11-06T12:00:00Z",
    "expires": "2027-11-06T12:00:00Z",
    "key_alias": "support-bot",
    "key_name": "sk-...Xy9Q",
    "max_budget": 50.0,
    "metadata": {
      "owner": "support"
    },
    "models": [
      "gpt-4o-mini"
    ],
    "rpm_limit": 60,
    "spend": 12.48,
    "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
    "token": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789",
    "tpm_limit": 100000,
    "user_id": "amelie@example.com"
  }
}
```

### Create key

Create a key for an app or person to call your proxy with, with an optional budget, limits, models and end date. The key is in the result once only, as 'api_key'.

**Inputs**

- Key name (`key_alias`, text): A name to know the key by, such as support-bot.
- Models (`models`, list): The models the key may call. Leave empty for every model.
- Budget (US dollars) (`max_budget`, number): The most the key may spend; requests are refused once it is used up. At least 0.
- Budget starts again (`budget_period`, text): How often the spend goes back to zero. Leave empty for never. One of: `1h` (Every hour), `1d` (Every day), `7d` (Every 7 days), `30d` (Every 30 days), `1mo` (Every calendar month).
- Works for (`lifetime`, text): How long the key works from now. Leave empty for no end date. One of: `1h` (1 hour), `1d` (1 day), `7d` (7 days), `30d` (30 days), `90d` (90 days), `365d` (1 year).
- Team (`litellm_team_id`, text): The team the key belongs to; the team's limits apply.
- User (`litellm_user_id`, text): The user the key belongs to.
- Tokens a minute (`tpm_limit`, number): The most tokens the key may use a minute. At least 0.
- Requests a minute (`rpm_limit`, number): The most requests the key may make a minute. At least 0.
- Metadata (`metadata`, object): Names and values to keep with the key, such as who it is for. Added to any it already has.

**Outputs**

- `api_key` (text): The key itself (sk-...), shown only this once
- `details` (object): Everything else LiteLLM returned
- `expires` (text): When it stops working (ISO 8601)
- `key_alias` (text): The key's name
- `key_id` (text): The key's ID, for the other key steps

**Example output**

```json
{
  "api_key": "sk-RV-l2BJEZ_LYNChSx2EueQ",
  "details": {
    "max_budget": 50.0,
    "models": [
      "gpt-4o-mini"
    ],
    "team_id": null
  },
  "expires": "2027-11-06T12:00:00Z",
  "key_alias": "support-bot",
  "key_id": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789"
}
```

### Create team

Create a team, with an optional budget, limits and models that every key of the team shares.

**Inputs**

- Team name (`team_alias`, text, required): The team's name, such as Support.
- Models (`models`, list): The models the team may call. Leave empty for every model.
- Budget (US dollars) (`max_budget`, number): The most the team may spend; requests are refused once it is used up. At least 0.
- Budget starts again (`budget_period`, text): How often the spend goes back to zero. Leave empty for never. One of: `1h` (Every hour), `1d` (Every day), `7d` (Every 7 days), `30d` (Every 30 days), `1mo` (Every calendar month).
- Tokens a minute (`tpm_limit`, number): The most tokens the team may use a minute. At least 0.
- Requests a minute (`rpm_limit`, number): The most requests the team may make a minute. At least 0.
- Metadata (`metadata`, object): Names and values to keep with the team, such as who it is for. Added to any it already has.

**Outputs**

- `team` (object): The new team

**Example output**

```json
{
  "team": {
    "blocked": false,
    "budget_duration": "1mo",
    "budget_reset_at": "2026-12-01T00:00:00Z",
    "created_at": "2026-10-01T09:00:00Z",
    "max_budget": 200.0,
    "members_with_roles": [
      {
        "role": "admin",
        "user_email": "amelie@example.com",
        "user_id": "amelie@example.com"
      }
    ],
    "metadata": {},
    "models": [
      "gpt-4o-mini",
      "claude-sonnet"
    ],
    "rpm_limit": 120,
    "spend": 31.2,
    "team_alias": "Support",
    "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
    "tpm_limit": 200000
  }
}
```

### Create user

Add a person to your proxy, with a role, an optional budget and team, and a key of their own if asked.

**Inputs**

- Email (`user_email`, text, required): Their email address.
- Name (`user_alias`, text): Their name, as the admin page shows it.
- Role (`user_role`, text): What they may do on the proxy. One of: `internal_user` (Internal user (can create and use their own keys)), `internal_user_viewer` (Internal user, view only), `proxy_admin` (Admin (can do everything)), `proxy_admin_viewer` (Admin, view only).
- Team (`litellm_team_id`, text): A team to put them on.
- Models (`models`, list): The models they may call. Leave empty for every model.
- Budget (US dollars) (`max_budget`, number): The most they may spend; requests are refused once it is used up. At least 0.
- Budget starts again (`budget_period`, text): How often the spend goes back to zero. Leave empty for never. One of: `1h` (Every hour), `1d` (Every day), `7d` (Every 7 days), `30d` (Every 30 days), `1mo` (Every calendar month).
- Create a key for them (`create_key`, true/false): Also make them a key, returned once as 'api_key'.
- Email them an invite (`send_invite_email`, true/false): Send them LiteLLM's invite email (needs email set up on the proxy).

**Outputs**

- `api_key` (text): Their key, if one was asked for, shown only once
- `user` (object): The new user
- `user_id` (text): The new user's ID

**Example output**

```json
{
  "api_key": "",
  "user": {
    "budget_duration": "30d",
    "created_at": "2026-10-01T09:00:00Z",
    "max_budget": 20.0,
    "metadata": {},
    "models": [],
    "spend": 4.1,
    "teams": [
      "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab"
    ],
    "user_alias": "Amelie",
    "user_email": "amelie@example.com",
    "user_id": "amelie@example.com",
    "user_role": "internal_user"
  },
  "user_id": "amelie@example.com"
}
```

### Delete key

Delete a key for good, so requests with it are refused.

**Inputs**

- Key (`key_id`, text, required): The key. Pick one, or give its ID (token) from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once done
- `key_id` (text): The key deleted

**Example output**

```json
{
  "deleted": true,
  "key_id": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789"
}
```

### Delete team

Delete a team and its keys, for good.

**Inputs**

- Team (`litellm_team_id`, text, required): The team. Pick one, or give its ID from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once done
- `team_id` (text): The team deleted

**Example output**

```json
{
  "deleted": true,
  "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab"
}
```

### Get key

Get one key's details: what it has spent, its budget, limits, models, expiry and whether it is blocked.

**Inputs**

- Key (`key_id`, text, required): The key. Pick one, or give its ID (token) from an earlier step.

**Outputs**

- `key` (object): The key, as it is now

**Example output**

```json
{
  "key": {
    "blocked": false,
    "budget_duration": "30d",
    "budget_reset_at": "2026-12-01T00:00:00Z",
    "created_at": "2026-11-06T12:00:00Z",
    "expires": "2027-11-06T12:00:00Z",
    "key_alias": "support-bot",
    "key_name": "sk-...Xy9Q",
    "max_budget": 50.0,
    "metadata": {
      "owner": "support"
    },
    "models": [
      "gpt-4o-mini"
    ],
    "rpm_limit": 60,
    "spend": 12.48,
    "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
    "token": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789",
    "tpm_limit": 100000,
    "user_id": "amelie@example.com"
  }
}
```

### Get team

Get one team's details: its members, budget, spend, models and keys.

**Inputs**

- Team (`litellm_team_id`, text, required): The team. Pick one, or give its ID from an earlier step.

**Outputs**

- `keys` (list): The team's keys
- `team` (object): The team

**Example output**

```json
{
  "keys": [
    {
      "blocked": false,
      "budget_duration": "30d",
      "budget_reset_at": "2026-12-01T00:00:00Z",
      "created_at": "2026-11-06T12:00:00Z",
      "expires": "2027-11-06T12:00:00Z",
      "key_alias": "support-bot",
      "key_name": "sk-...Xy9Q",
      "max_budget": 50.0,
      "metadata": {
        "owner": "support"
      },
      "models": [
        "gpt-4o-mini"
      ],
      "rpm_limit": 60,
      "spend": 12.48,
      "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
      "token": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789",
      "tpm_limit": 100000,
      "user_id": "amelie@example.com"
    }
  ],
  "team": {
    "blocked": false,
    "budget_duration": "1mo",
    "budget_reset_at": "2026-12-01T00:00:00Z",
    "created_at": "2026-10-01T09:00:00Z",
    "max_budget": 200.0,
    "members_with_roles": [
      {
        "role": "admin",
        "user_email": "amelie@example.com",
        "user_id": "amelie@example.com"
      }
    ],
    "metadata": {},
    "models": [
      "gpt-4o-mini",
      "claude-sonnet"
    ],
    "rpm_limit": 120,
    "spend": 31.2,
    "team_alias": "Support",
    "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
    "tpm_limit": 200000
  }
}
```

### List keys

List the proxy's keys with their spend, budget, models and expiry, optionally only one team's or user's.

**Inputs**

- Team (`litellm_team_id`, text): Only this team's keys.
- User (`litellm_user_id`, text): Only this user's keys.
- Key name (`key_alias`, text): Only keys with exactly this name.
- Most to return (`limit`, number): How many to return at most, newest first. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many
- `keys` (list): The keys

**Example output**

```json
{
  "count": 1,
  "keys": [
    {
      "blocked": false,
      "budget_duration": "30d",
      "budget_reset_at": "2026-12-01T00:00:00Z",
      "created_at": "2026-11-06T12:00:00Z",
      "expires": "2027-11-06T12:00:00Z",
      "key_alias": "support-bot",
      "key_name": "sk-...Xy9Q",
      "max_budget": 50.0,
      "metadata": {
        "owner": "support"
      },
      "models": [
        "gpt-4o-mini"
      ],
      "rpm_limit": 60,
      "spend": 12.48,
      "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
      "token": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789",
      "tpm_limit": 100000,
      "user_id": "amelie@example.com"
    }
  ]
}
```

### List models

List the models set up on your proxy, with who serves each, what it does, its token limits and prices.

**Inputs**

- Model (`model`, text): Only this model's deployments. Leave empty for every model.

**Outputs**

- `count` (number): How many
- `models` (list): The models

**Example output**

```json
{
  "count": 1,
  "models": [
    {
      "input_cost_per_token": 1.5e-07,
      "max_input_tokens": 128000,
      "max_output_tokens": 16384,
      "mode": "chat",
      "model_id": "112f74fab24a7a5245d2ced3536dd8f5",
      "model_info": {
        "id": "112f74fab24a7a5245d2ced3536dd8f5",
        "mode": "chat"
      },
      "model_name": "gpt-4o-mini",
      "output_cost_per_token": 6e-07,
      "provider": "openai",
      "provider_model": "openai/gpt-4o-mini"
    }
  ]
}
```

### List request logs

List the requests made through your proxy in a time range, newest first, with each one's model, cost, tokens, key, team and any error.

**Inputs**

- From (`start_time`, date and time): The earliest request to include. Defaults to 24 hours ago.
- To (`end_time`, date and time): The latest request to include. Defaults to now.
- Outcome (`status`, text): Only requests that succeeded, or only those that failed. One of: `success` (Succeeded), `failure` (Failed).
- Model (`model`, text): Only requests to this model.
- Key (`key_id`, text): Only requests made with this key.
- Team (`litellm_team_id`, text): Only requests made with this team's keys.
- User (`litellm_user_id`, text): Only this user's requests.
- Most to return (`limit`, number): How many to return at most, newest first. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many
- `end_time` (text): The end of the range
- `logs` (list): The requests
- `start_time` (text): The start of the range
- `total_spend` (number): What these requests cost together, in US dollars

**Example output**

```json
{
  "count": 1,
  "end_time": "2026-11-06T12:00:00+00:00",
  "logs": [
    {
      "cache_hit": false,
      "call_type": "acompletion",
      "completion_tokens": 0,
      "duration_ms": 812,
      "end_user": "customer-42",
      "ended_at": "2026-11-06T11:58:03Z",
      "error_class": "RateLimitError",
      "error_code": "429",
      "error_message": "Rate limit reached for gpt-4o-mini",
      "key_alias": "support-bot",
      "key_id": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789",
      "model": "gpt-4o-mini",
      "prompt_tokens": 0,
      "provider": "openai",
      "provider_model": "gpt-4o-mini",
      "request_id": "chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e",
      "request_tags": [],
      "spend": 0.0,
      "started_at": "2026-11-06T11:58:02Z",
      "status": "failure",
      "team_alias": "Support",
      "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
      "total_tokens": 0,
      "user_id": "amelie@example.com"
    }
  ],
  "start_time": "2026-11-05T12:00:00+00:00",
  "total_spend": 0.0
}
```

### List teams

List the proxy's teams with their members, budget, spend and models.

**Inputs**

- User (`litellm_user_id`, text): Only the teams this user is on.

**Outputs**

- `count` (number): How many
- `teams` (list): The teams

**Example output**

```json
{
  "count": 1,
  "teams": [
    {
      "blocked": false,
      "budget_duration": "1mo",
      "budget_reset_at": "2026-12-01T00:00:00Z",
      "created_at": "2026-10-01T09:00:00Z",
      "max_budget": 200.0,
      "members_with_roles": [
        {
          "role": "admin",
          "user_email": "amelie@example.com",
          "user_id": "amelie@example.com"
        }
      ],
      "metadata": {},
      "models": [
        "gpt-4o-mini",
        "claude-sonnet"
      ],
      "rpm_limit": 120,
      "spend": 31.2,
      "team_alias": "Support",
      "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
      "tpm_limit": 200000
    }
  ]
}
```

### List users

List the proxy's users with their role, budget and spend, optionally only one role or team.

**Inputs**

- Role (`role`, text): Only users with this role. One of: `internal_user` (Internal user (can create and use their own keys)), `internal_user_viewer` (Internal user, view only), `proxy_admin` (Admin (can do everything)), `proxy_admin_viewer` (Admin, view only).
- Team (`litellm_team_id`, text): Only this team's users.
- Most to return (`limit`, number): How many to return at most, newest first. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "users": [
    {
      "budget_duration": "30d",
      "created_at": "2026-10-01T09:00:00Z",
      "max_budget": 20.0,
      "metadata": {},
      "models": [],
      "spend": 4.1,
      "teams": [
        "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab"
      ],
      "user_alias": "Amelie",
      "user_email": "amelie@example.com",
      "user_id": "amelie@example.com",
      "user_role": "internal_user"
    }
  ]
}
```

### Remove team member

Take someone off a team, by user or by email address.

**Inputs**

- Team (`litellm_team_id`, text, required): The team. Pick one, or give its ID from an earlier step.
- User (`litellm_user_id`, text): The user to remove. Give this or an email address.
- Email (`email`, text): The email address of who to remove.

**Outputs**

- `removed` (true/false): Always true once done
- `team_id` (text): The team
- `user_email` (text): Who was removed, if named by email
- `user_id` (text): Who was removed, if named by user

**Example output**

```json
{
  "removed": true,
  "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
  "user_email": "",
  "user_id": "amelie@example.com"
}
```

### Replace key

Replace a key with a new one that keeps its settings and spend; the old key stops working. Needs LiteLLM Enterprise. The new key is in the result once only, as 'api_key'.

**Inputs**

- Key (`key_id`, text, required): The key. Pick one, or give its ID (token) from an earlier step.

**Outputs**

- `api_key` (text): The key itself (sk-...), shown only this once
- `details` (object): Everything else LiteLLM returned
- `expires` (text): When it stops working (ISO 8601)
- `key_alias` (text): The key's name
- `key_id` (text): The key's ID, for the other key steps

**Example output**

```json
{
  "api_key": "sk-RV-l2BJEZ_LYNChSx2EueQ",
  "details": {
    "max_budget": 50.0,
    "models": [
      "gpt-4o-mini"
    ],
    "team_id": null
  },
  "expires": "2027-11-06T12:00:00Z",
  "key_alias": "support-bot",
  "key_id": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789"
}
```

### Send a prompt

Send a prompt to one of your proxy's models and get its reply, with the tokens it used and what it cost. The proxy's budgets and limits apply as usual.

**Inputs**

- Model (`model`, text, required): The model to ask, as named on your proxy.
- Prompt (`prompt`, text, required): What to ask the model.
- Instructions (`system_prompt`, text): How the model should answer, such as 'Reply in one sentence'.
- Temperature (`temperature`, number): From 0 (the same answer each time) to 2 (more varied). Leave empty for the model's default. From 0 to 2.
- Longest reply (tokens) (`max_tokens`, number): The most tokens the reply may have. At least 1.

**Outputs**

- `completion_tokens` (number): Tokens in the reply
- `cost` (number): What it cost in US dollars, as the proxy worked it out
- `finish_reason` (text): Why it stopped, such as stop or length
- `model` (text): The model that replied
- `prompt_tokens` (number): Tokens sent
- `reply` (text): The model's reply
- `request_id` (text): The request's ID, as in the request logs
- `total_tokens` (number): Tokens in all

**Example output**

```json
{
  "completion_tokens": 8,
  "cost": 8.4e-06,
  "finish_reason": "stop",
  "model": "gpt-4o-mini",
  "prompt_tokens": 24,
  "reply": "Your order shipped this morning.",
  "request_id": "chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e",
  "total_tokens": 32
}
```

### Update key

Change a key's name, models, budget, limits or end date. Fields left empty keep their value.

**Inputs**

- Key (`key_id`, text, required): The key. Pick one, or give its ID (token) from an earlier step.
- Key name (`key_alias`, text): A new name for the key.
- Models (`models`, list): The models the key may call. Leave empty for every model.
- Budget (US dollars) (`max_budget`, number): The most the key may spend; requests are refused once it is used up. At least 0.
- Budget starts again (`budget_period`, text): How often the spend goes back to zero. Leave empty for never. One of: `1h` (Every hour), `1d` (Every day), `7d` (Every 7 days), `30d` (Every 30 days), `1mo` (Every calendar month).
- Works for (`lifetime`, text): A new end date, counted from now. One of: `1h` (1 hour), `1d` (1 day), `7d` (7 days), `30d` (30 days), `90d` (90 days), `365d` (1 year).
- Tokens a minute (`tpm_limit`, number): The most tokens the key may use a minute. At least 0.
- Requests a minute (`rpm_limit`, number): The most requests the key may make a minute. At least 0.
- Metadata (`metadata`, object): Names and values to keep with the key, such as who it is for. Added to any it already has.

**Outputs**

- `key` (object): The key, as it is now

**Example output**

```json
{
  "key": {
    "blocked": false,
    "budget_duration": "30d",
    "budget_reset_at": "2026-12-01T00:00:00Z",
    "created_at": "2026-11-06T12:00:00Z",
    "expires": "2027-11-06T12:00:00Z",
    "key_alias": "support-bot",
    "key_name": "sk-...Xy9Q",
    "max_budget": 50.0,
    "metadata": {
      "owner": "support"
    },
    "models": [
      "gpt-4o-mini"
    ],
    "rpm_limit": 60,
    "spend": 12.48,
    "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
    "token": "8a9b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f6789",
    "tpm_limit": 100000,
    "user_id": "amelie@example.com"
  }
}
```

### Update team

Change a team's name, models, budget or limits, or block it so none of its keys work. Fields left empty keep their value.

**Inputs**

- Team (`litellm_team_id`, text, required): The team. Pick one, or give its ID from an earlier step.
- Team name (`team_alias`, text): A new name for the team.
- Models (`models`, list): The models the team may call. Leave empty for every model.
- Budget (US dollars) (`max_budget`, number): The most the team may spend; requests are refused once it is used up. At least 0.
- Budget starts again (`budget_period`, text): How often the spend goes back to zero. Leave empty for never. One of: `1h` (Every hour), `1d` (Every day), `7d` (Every 7 days), `30d` (Every 30 days), `1mo` (Every calendar month).
- Tokens a minute (`tpm_limit`, number): The most tokens the team may use a minute. At least 0.
- Requests a minute (`rpm_limit`, number): The most requests the team may make a minute. At least 0.
- Blocked (`blocked`, true/false): On: every key of the team stops working. Off: they work again.
- Metadata (`metadata`, object): Names and values to keep with the team, such as who it is for. Added to any it already has.

**Outputs**

- `keys` (list): The team's keys
- `team` (object): The team

**Example output**

```json
{
  "keys": [],
  "team": {
    "blocked": false,
    "budget_duration": "1mo",
    "budget_reset_at": "2026-12-01T00:00:00Z",
    "created_at": "2026-10-01T09:00:00Z",
    "max_budget": 200.0,
    "members_with_roles": [
      {
        "role": "admin",
        "user_email": "amelie@example.com",
        "user_id": "amelie@example.com"
      }
    ],
    "metadata": {},
    "models": [
      "gpt-4o-mini",
      "claude-sonnet"
    ],
    "rpm_limit": 120,
    "spend": 31.2,
    "team_alias": "Support",
    "team_id": "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab",
    "tpm_limit": 200000
  }
}
```

### Update user

Change a user's email, name, role, models or budget. Fields left empty keep their value.

**Inputs**

- User (`litellm_user_id`, text, required): The user. Pick one, or give their ID from an earlier step.
- Email (`user_email`, text): A new email address.
- Name (`user_alias`, text): A new name.
- Role (`user_role`, text): What they may do on the proxy. One of: `internal_user` (Internal user (can create and use their own keys)), `internal_user_viewer` (Internal user, view only), `proxy_admin` (Admin (can do everything)), `proxy_admin_viewer` (Admin, view only).
- Models (`models`, list): The models they may call. Leave empty for every model.
- Budget (US dollars) (`max_budget`, number): The most they may spend; requests are refused once it is used up. At least 0.
- Budget starts again (`budget_period`, text): How often the spend goes back to zero. Leave empty for never. One of: `1h` (Every hour), `1d` (Every day), `7d` (Every 7 days), `30d` (Every 30 days), `1mo` (Every calendar month).
- Metadata (`metadata`, object): Names and values to keep with the user, such as who it is for. Added to any it already has.

**Outputs**

- `user` (object): The user, as they are now

**Example output**

```json
{
  "user": {
    "budget_duration": "30d",
    "created_at": "2026-10-01T09:00:00Z",
    "max_budget": 20.0,
    "metadata": {},
    "models": [],
    "spend": 4.1,
    "teams": [
      "4f1d2c3b-aaaa-bbbb-cccc-1234567890ab"
    ],
    "user_alias": "Amelie",
    "user_email": "amelie@example.com",
    "user_id": "amelie@example.com",
    "user_role": "internal_user"
  }
}
```
