{"record":{"id":"e716bdeb7e02e377","repo":"BerriAI/litellm","slug":"no-key-passed-in","errorCode":null,"errorMessage":"No key passed in.","messagePattern":"No key passed in\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":4929,"sourceCode":"        # value in that field.\n        regenerate_target_key: Final = data.key if data and data.key else key\n        is_master_key_regeneration: Final = (\n            data is not None\n            and data.new_master_key is not None\n            and _is_master_key(api_key=regenerate_target_key, _master_key=master_key)\n        )\n\n        if (\n            premium_user is not True and not is_master_key_regeneration\n        ):  # allow master key regeneration for non-premium users\n            raise ValueError(\n                f\"Regenerating Virtual Keys is an Enterprise feature, {CommonProxyErrors.not_premium_user.value}\"\n            )\n\n        # Check if key exists, raise exception if key is not in the DB\n        key = data.key if data and data.key else key\n        if not key:\n            raise HTTPException(status_code=400, detail={\"error\": \"No key passed in.\"})\n        ### 1. Create New copy that is duplicate of existing key\n        ######################################################################\n\n        # create duplicate of existing key\n        # set token = new token generated\n        # insert new token in DB\n\n        # create hash of token\n        if prisma_client is None:\n            raise HTTPException(\n                status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n                detail={\"error\": \"DB not connected. prisma_client is None\"},\n            )\n\n        _is_master_key_valid: Final = _is_master_key(api_key=key, _master_key=master_key)\n\n        if master_key is not None and data and _is_master_key_valid:\n            if data.new_master_key is None:","sourceCodeStart":4911,"sourceCodeEnd":4947,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L4911-L4947","documentation":"Error \"No key passed in.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:4929 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include the key (or key_alias) to regenerate in the request.","Verify the request body matches the endpoint's expected parameters."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}