BerriAI/litellm · error · HTTPException
No key passed in.
Error message
No key passed in.
What it means
Error "No key passed in." thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:4929
# value in that field.
regenerate_target_key: Final = data.key if data and data.key else key
is_master_key_regeneration: Final = (
data is not None
and data.new_master_key is not None
and _is_master_key(api_key=regenerate_target_key, _master_key=master_key)
)
if (
premium_user is not True and not is_master_key_regeneration
): # allow master key regeneration for non-premium users
raise ValueError(
f"Regenerating Virtual Keys is an Enterprise feature, {CommonProxyErrors.not_premium_user.value}"
)
# Check if key exists, raise exception if key is not in the DB
key = data.key if data and data.key else key
if not key:
raise HTTPException(status_code=400, detail={"error": "No key passed in."})
### 1. Create New copy that is duplicate of existing key
######################################################################
# create duplicate of existing key
# set token = new token generated
# insert new token in DB
# create hash of token
if prisma_client is None:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail={"error": "DB not connected. prisma_client is None"},
)
_is_master_key_valid: Final = _is_master_key(api_key=key, _master_key=master_key)
if master_key is not None and data and _is_master_key_valid:
if data.new_master_key is None:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Include the key (or key_alias) to regenerate in the request.
- Verify the request body matches the endpoint's expected parameters.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:4929 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/e716bdeb7e02e377.
Report an issue: GitHub.