Files
litellm/docs/my-website/docs/proxy/user_onboarding.md
T
Mubashir OsmaniandGitHub fc1c39645a docs: Letta Guide (#14798)
* fix: flaky passthrough tests

* Revert "fix: flaky passthrough tests"

This reverts commit ffe692e017600a8853ab7c31f95485958ab74c5f.

* fix: serialize prisma objects

* docs: added letta

* arranged endpoints in alphabetical order

* added user_api_key fields to custom auth docs

* user onboarding

* cleaning up

This reverts commit 40e2aade73632cea371c6092d766ba193f9ac4a3.

* cleaning up
This reverts commit ffe692e017600a8853ab7c31f95485958ab74c5f.

* Revert "fix: serialize prisma objects"

This reverts commit 1e7bd13c26dcac8bff1f818c39b2b78f22f0ba28.
2025-09-23 16:18:57 -07:00

2.0 KiB

User Onboarding Guide

A step-by-step guide to help admins onboard users to your LiteLLM proxy instance and help users get started with their API key.


For Administrators

Step 1: Create a User Account

You can create a user account via the Admin UI or using the API.

Admin UI

  • Go to the (/ui endpoint)
  • Navigate to the Internal Users section
  • Click "Add User" and fill in the required details

API

curl -X POST http://localhost:4000/user/new \
  -H "Authorization: Bearer <admin-key>" \
  -H "Content-Type: application/json" \
  -d '{"user_email": "user@example.com"}'

Step 2: Grant Access & Permissions

  • Assign the user to a team (optional)
  • Set budgets, rate limits, and allowed models as needed
  • Generate an API key for the user (via UI or API)

Generate API Key (API Example)

curl -X POST http://localhost:4000/key/generate \
  -H "Authorization: Bearer <admin-key>" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "<user-id>", "max_budget": 100}'

For End Users

Step 3: Validate Your API Key

Before making LLM calls, validate your key works by calling the /v1/models endpoint:

curl -X GET http://localhost:4000/v1/models \
  -H "Authorization: Bearer <your-api-key>"
  • If your key is valid, you'll get a list of available models.
  • If invalid, you'll get a 401 error.

Step 4: Hello World - Make Your First LLM Call

curl -X POST http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Troubleshooting

  • If you get a 401 error, check with your admin that your key is active and you have access to the requested model.
  • Use the /v1/models endpoint to quickly check if your key is valid without consuming LLM tokens.

See Also