import Image from '@theme/IdealImage'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # 🤗 UI - Self-Serve Allow users to creat their own keys on [Proxy UI](./ui.md). 1. Add user with permissions to a team on proxy Go to `Internal Users` -> `+New User` Create a new Internal User on LiteLLM and assign them the role `internal_user`. ```bash curl -X POST '/user/new' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -D '{ "user_email": "krrishdholakia@gmail.com", "user_role": "internal_user" # 👈 THIS ALLOWS USER TO CREATE/VIEW/DELETE THEIR OWN KEYS + SEE THEIR SPEND }' ``` Expected Response ```bash { "user_id": "e9d45c7c-b20b-4ff8-ae76-3f479a7b1d7d", 👈 USE IN STEP 2 "user_email": "", "user_role": "internal_user", ... } ``` Here's the available UI roles for a LiteLLM Internal User: Admin Roles: - `proxy_admin`: admin over the platform - `proxy_admin_viewer`: can login, view all keys, view all spend. **Cannot** create/delete keys, add new users. Internal User Roles: - `internal_user`: can login, view/create/delete their own keys, view their spend. **Cannot** add new users. - `internal_user_viewer`: can login, view their own keys, view their own spend. **Cannot** create/delete keys, add new users. 2. Share invitation link with user Copy the invitation link with the user ```bash curl -X POST '/invitation/new' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -D '{ "user_id": "e9d45c7c-b20b..." # 👈 USER ID FROM STEP 1 }' ``` Expected Response ```bash { "id": "a2f0918f-43b0-4770-a664-96ddd192966e", "user_id": "e9d45c7c-b20b..", "is_accepted": false, "accepted_at": null, "expires_at": "2024-06-13T00:02:16.454000Z", # 👈 VALID FOR 7d "created_at": "2024-06-06T00:02:16.454000Z", "created_by": "116544810872468347480", "updated_at": "2024-06-06T00:02:16.454000Z", "updated_by": "116544810872468347480" } ``` Invitation Link: ```bash http://0.0.0.0:4000/ui/onboarding?id=a2f0918f-43b0-4770-a664-96ddd192966e # /ui/onboarding?id= ``` :::info Use [Email Notifications](./email.md) to email users onboarding links ::: 3. User logs in via email + password auth :::info LiteLLM Enterprise: Enable [SSO login](./ui.md#setup-ssoauth-for-ui) ::: 4. User can now create their own keys ## Advanced ### Setting custom logout URLs Set `PROXY_LOGOUT_URL` in your .env if you want users to get redirected to a specific URL when they click logout ``` export PROXY_LOGOUT_URL="https://www.google.com" ```