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:
| Role | Manage Members | Manage Settings | Create Resources | View Resources |
|---|---|---|---|---|
| Owner | ✓ | ✓ | ✓ | ✓ |
| Admin | ✓ | ✓ | ✓ | ✓ |
| Member | — | — | ✓ | ✓ |
| Viewer | — | — | — | ✓ |
Organizations also support custom roles with 19 granular permissions for fine-grained access control.
Create Organization
/v1/organizationsAuth RequiredCreate a new organization. You automatically become the owner. A URL-friendly slug is generated from the name if not provided.
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
| Parameter | Type | Description |
|---|---|---|
nameRequired | string | Organization display name (2–255 chars) |
slug | string | URL-friendly identifier. Auto-generated if omitted. |
description | string | Organization description (max 1000 chars) |
Response
{
"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
/v1/organizationsAuth RequiredList all organizations where you are a member, along with your role and member count:
curl https://api.llmhub.one/v1/organizations \
-H "Authorization: Bearer $LLMHUB_API_KEY"Response
{
"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
/v1/organizations/:id/invitesAdmin+Send an invitation to join the organization. Invitations expire after 7 days. Available roles: admin, member, viewer.
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
{
"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
/v1/invitations/:token/acceptAuth RequiredAccept an organization invitation. Your account email must match the invited email address.
curl -X POST https://api.llmhub.one/v1/invitations/{token}/accept \
-H "Authorization: Bearer $LLMHUB_API_KEY"Response
{
"message": "Successfully joined organization",
"organization": {
"id": "org-uuid",
"name": "Acme Engineering",
"slug": "acme-engineering"
}
}Update Organization
/v1/organizations/:idAdmin+Update organization settings including shared billing functionality:
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
/v1/organizations/:id/members/:memberIdChange a member's role
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
/v1/organizations/:id/transfer-ownershipOwner OnlyTransfer organization ownership to another member. You will be demoted to admin.
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
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/organizations/:id | Get organization details |
| DELETE | /v1/organizations/:id | Delete organization (owner only) |
| GET | /v1/organizations/:id/members | List all members |
| DELETE | /v1/organizations/:id/members/:memberId | Remove a member |
| GET | /v1/organizations/:id/invites | List pending invitations |
| DELETE | /v1/organizations/:id/invites/:inviteId | Revoke an invitation |
| POST | /v1/organizations/:id/leave | Leave an organization |
| GET | /v1/invitations | List your pending invitations |

