Skip to content

Organizations

An organization groups the users of a same entity (a company, an administration, a team). It is the unit OpenGateLLM uses to attribute models and to report usage: the models API exposes the organization of the user who registered a model router in the owned_by field.

Every user belongs to exactly one organization. Membership is mandatory: a user cannot exist without an organization, and an organization cannot be removed while it still has users.

OpenGateLLM always provides an organization named default, so an installation is usable before you create your own organizations:

  • Fresh installs — the bootstrap admin user is created in the default organization, which is created if it does not exist yet.
  • Existing installs — the database migration that makes membership mandatory creates the default organization if needed and moves every user that had no organization into it.

The default organization is a regular organization: you can rename it, and you can move its users to another one.

Any authenticated user can retrieve their organization with GET /v1/organizations/me. The response is the same shape as the admin get-one endpoint: id, name, number of users, and timestamps.

API Reference

Go to the Organizations page to create, rename and delete organizations. The Users page lets you assign an organization to a user and filter the user list by organization.

Deleting an organization that still has users returns a 409. Move its users to another organization first.

organization_id is required when you create a user (POST /v1/admin/users) and when you update one (PATCH /v1/admin/users/{user_id}). A missing or null organization_id is rejected with a 422.

See the POST and PATCH /v1/admin/users endpoints on the API reference for the full request body.

Users created on their first SSO login are assigned the organization returned by get_organization_id, which defaults to the auth_sso_default_organization_id setting of the configuration file. Point it at the default organization or at any other one you created.

Single Sign-On documentation