Organizations & Teams

Multi-tenant workspaces for teams with shared billing, role-based access control, and centralized resource management.

Roles & Permissions

Every organization member has one of four roles:

RoleManage MembersManage SettingsCreate ResourcesView Resources
Owner
Admin
Member
Viewer

Organizations also support custom roles with 19 granular permissions for fine-grained access control.

Create Organization

POST/v1/organizationsAuth Required

Create a new organization. You automatically become the owner. A URL-friendly slug is generated from the name if not provided.

Bash
curl -X POST https://api.llmhub.one/v1/organizations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLMHUB_API_KEY" \
  -d '{
    "name": "Acme Engineering",
    "description": "Engineering team workspace"
  }'

Parameters

ParameterTypeDescription
nameRequiredstringOrganization display name (2–255 chars)
slugstringURL-friendly identifier. Auto-generated if omitted.
descriptionstringOrganization description (max 1000 chars)

Response

json
{
  "id": "org-uuid-here",
  "name": "Acme Engineering",
  "slug": "acme-engineering",
  "description": "Engineering team workspace",
  "credits": 0,
  "share_credits": false,
  "allow_member_invites": false,
  "max_members": 10,
  "created_at": "2026-03-15T10:30:00Z"
}

List Organizations

GET/v1/organizationsAuth Required

List all organizations where you are a member, along with your role and member count:

Bash
curl https://api.llmhub.one/v1/organizations \
  -H "Authorization: Bearer $LLMHUB_API_KEY"

Response

json
{
  "organizations": [
    {
      "id": "org-uuid-1",
      "name": "Acme Engineering",
      "slug": "acme-engineering",
      "description": "Engineering team workspace",
      "role": "owner",
      "member_id": "member-uuid",
      "member_count": 5
    },
    {
      "id": "org-uuid-2",
      "name": "Design Team",
      "slug": "design-team",
      "role": "member",
      "member_id": "member-uuid-2",
      "member_count": 3
    }
  ]
}

Invite Members

POST/v1/organizations/:id/invitesAdmin+

Send an invitation to join the organization. Invitations expire after 7 days. Available roles: admin, member, viewer.

Bash
curl -X POST https://api.llmhub.one/v1/organizations/{org_id}/invites \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLMHUB_API_KEY" \
  -d '{
    "email": "jane@acme.com",
    "role": "member"
  }'

Response

json
{
  "id": "invite-uuid",
  "organization_id": "org-uuid",
  "email": "jane@acme.com",
  "role": "member",
  "token": "invite-token-here",
  "expires_at": "2026-04-02T10:30:00Z",
  "created_at": "2026-03-26T10:30:00Z"
}

Accept Invitation

POST/v1/invitations/:token/acceptAuth Required

Accept an organization invitation. Your account email must match the invited email address.

Bash
curl -X POST https://api.llmhub.one/v1/invitations/{token}/accept \
  -H "Authorization: Bearer $LLMHUB_API_KEY"

Response

json
{
  "message": "Successfully joined organization",
  "organization": {
    "id": "org-uuid",
    "name": "Acme Engineering",
    "slug": "acme-engineering"
  }
}

Update Organization

PATCH/v1/organizations/:idAdmin+

Update organization settings including shared billing functionality:

Bash
curl -X PATCH https://api.llmhub.one/v1/organizations/{org_id} \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLMHUB_API_KEY" \
  -d '{
    "share_credits": true,
    "allow_member_invites": true,
    "max_members": 25
  }'

Shared Credits

When share_credits is enabled, all members use the organization's credit pool instead of their personal credits. Usage is tracked per member for billing transparency.

Member Management

PATCH/v1/organizations/:id/members/:memberId

Change a member's role

Bash
curl -X PATCH https://api.llmhub.one/v1/organizations/{org_id}/members/{member_id} \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLMHUB_API_KEY" \
  -d '{
    "role": "admin"
  }'

Transfer Ownership

POST/v1/organizations/:id/transfer-ownershipOwner Only

Transfer organization ownership to another member. You will be demoted to admin.

Bash
curl -X POST https://api.llmhub.one/v1/organizations/{org_id}/transfer-ownership \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLMHUB_API_KEY" \
  -d '{
    "new_owner_id": "member-uuid"
  }'

Other Endpoints

MethodEndpointDescription
GET/v1/organizations/:idGet organization details
DELETE/v1/organizations/:idDelete organization (owner only)
GET/v1/organizations/:id/membersList all members
DELETE/v1/organizations/:id/members/:memberIdRemove a member
GET/v1/organizations/:id/invitesList pending invitations
DELETE/v1/organizations/:id/invites/:inviteIdRevoke an invitation
POST/v1/organizations/:id/leaveLeave an organization
GET/v1/invitationsList your pending invitations