---
title: "New End User"
method: POST
path: "/customer/new"
tags: ["Customer Management"]
---

# New End User

`POST /customer/new`

Allow creating a new Customer 


Parameters:
- user_id: str - The unique identifier for the user.
- alias: Optional[str] - A human-friendly alias for the user.
- blocked: bool - Flag to allow or disallow requests for this end-user. Default is False.
- max_budget: Optional[float] - The maximum budget allocated to the user. Either 'max_budget' or 'budget_id' should be provided, not both.
- budget_id: Optional[str] - The identifier for an existing budget allocated to the user. Either 'max_budget' or 'budget_id' should be provided, not both.
- allowed_model_region: Optional[Union[Literal["eu"], Literal["us"]]] - Require all user requests to use models in this specific region.
- default_model: Optional[str] - If no equivalent model in the allowed region, default all requests to this model.
- metadata: Optional[dict] = Metadata for customer, store information for customer. Example metadata = {"data_training_opt_out": True}
- budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d").
- tpm_limit: Optional[int] - [Not Implemented Yet] Specify tpm limit for a given customer (Tokens per minute)
- rpm_limit: Optional[int] - [Not Implemented Yet] Specify rpm limit for a given customer (Requests per minute)
- model_max_budget: Optional[dict] - [Not Implemented Yet] Specify max budget for a given model. Example: {"openai/gpt-4o-mini": {"max_budget": 100.0, "budget_duration": "1d"}}
- max_parallel_requests: Optional[int] - [Not Implemented Yet] Specify max parallel requests for a given customer.
- soft_budget: Optional[float] - [Not Implemented Yet] Get alerts when customer crosses given budget, doesn't block requests.
- spend: Optional[float] - Specify initial spend for a given customer.
- budget_reset_at: Optional[str] - Specify the date and time when the budget should be reset.
- object_permission: Optional[LiteLLM_ObjectPermissionBase] - Customer-specific object permissions to control access to resources.
    Supported fields:
    * mcp_servers: List[str] - List of allowed MCP server IDs
    * mcp_access_groups: List[str] - List of MCP access group names
    * mcp_tool_permissions: Dict[str, List[str]] - Map of server ID to allowed tool names (e.g., {"server_1": ["tool_a", "tool_b"]})
    * vector_stores: List[str] - List of allowed vector store IDs
    * agents: List[str] - List of allowed agent IDs
    * agent_access_groups: List[str] - List of agent access group names
    Example: {"mcp_servers": ["server_1", "server_2"], "vector_stores": ["vector_store_1"], "agents": ["agent_1"]}
    IF null or {} then no object-level restrictions apply.


- Allow specifying allowed regions 
- Allow specifying default model

Example curl:
```
curl --location 'http://0.0.0.0:4000/customer/new'         --header 'Authorization: Bearer sk-1234'         --header 'Content-Type: application/json'         --data '{
        "user_id" : "ishaan-jaff-3",
        "allowed_region": "eu",
        "budget_id": "free_tier",
        "default_model": "azure/gpt-3.5-turbo-eu"
    }'

# With object permissions
curl -L -X POST 'http://localhost:4000/customer/new'         -H 'Authorization: Bearer sk-1234'         -H 'Content-Type: application/json'         -d '{
        "user_id": "user_1",
        "object_permission": {
          "mcp_servers": ["server_1"],
          "mcp_access_groups": ["public_group"],
          "vector_stores": ["vector_store_1"]
        }
      }'

    # return end-user object
```

NOTE: This used to be called `/end_user/new`, we will still be maintaining compatibility for /end_user/XXX for these endpoints

## Request body

- NewCustomerRequest — Create a new customer, allocate a budget to them
  - `budget_id` string, nullable
  - `max_budget` number, nullable — Requests will fail if this budget (in USD) is exceeded.
  - `soft_budget` number, nullable — Requests will NOT fail if this is exceeded. Will fire alerting though.
  - `max_parallel_requests` integer, nullable — Max concurrent requests allowed for this budget id.
  - `tpm_limit` integer, nullable — Max tokens per minute, allowed for this budget id.
  - `rpm_limit` integer, nullable — Max requests per minute, allowed for this budget id.
  - `budget_duration` string, nullable — Max duration budget should be set for (e.g. '1hr', '1d', '28d')
  - `model_max_budget` object, nullable — Max budget for each model (e.g. {'gpt-4o': {'max_budget': '0.0000001', 'budget_duration': '1d', 'tpm_limit': 1000, 'rpm_limit': 1000}})
  - `budget_reset_at` string, date-time, nullable — Datetime when the budget is reset
  - `user_id` string, required
  - `alias` string, nullable
  - `blocked` boolean
  - `spend` number, nullable
  - `allowed_model_region` 'eu' | 'us', nullable
  - `default_model` string, nullable
  - `object_permission` LiteLLMObjectPermissionBase
    - `mcp_servers` string[], nullable
    - `mcp_access_groups` string[], nullable
    - `mcp_tool_permissions` object, nullable
    - `mcp_toolsets` string[], nullable
    - `blocked_tools` string[], nullable
    - `vector_stores` string[], nullable
    - `agents` string[], nullable
    - `agent_access_groups` string[], nullable
    - `models` string[], nullable
    - `search_tools` string[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/flock/apis/litellm-api.md) · [All operations](https://skmtc.net/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/8fbaab4fc7c5/schema)
