Skip to main content

Organizations, projects, and users

This section covers how to manage organizational structure and user accounts within OpenGateLLM.

Organization management

Organizations allow grouping users for organizational purposes.

Organization properties

  • name: Organization name (required)

Managing organizations

curl -X POST http://localhost:8000/v1/admin/organizations \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Organization"
}'

Project management

Coming Soon

Project management functionality is currently under development and will be available in a future release.

Projects will allow you to:

  • Group resources within an organization
  • Isolate access and permissions at the project level
  • Manage project-specific budgets and limits

User management

Users represent entities that can access the API. Each user must have an email, password, and assigned role.

User properties

  • email: User email address (required)
  • name: User display name (optional)
  • password: User password for authentication (required on creation)
  • role: Role ID that determines permissions and limits (required)
  • organization: Organization ID (optional)
  • budget: Budget limit for the user (optional, see Budget)
  • expires: Unix timestamp when the user account expires (optional)
info

Users also have sub and iss fields for OAuth2/ProConnect authentication. These are null when using email/password authentication.

Managing users

curl -X POST http://localhost:8000/v1/admin/users \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"email": "john.doe@example.com",
"name": "John Doe",
"password": "secure_password",
"role": 1,
"organization": 1,
"budget": 100.0,
"expires": 1735689600
}'