Member Management for Inference Providers

This guide covers managing members who consume your organization's inference services, from onboarding to offboarding.

Member Lifecycle

Request/Invite → Pending → Active → (Suspended) → Removed
Status Description Can Use Models
Pending Awaiting approval or acceptance No
Active Full access to organization Yes
Suspended Temporarily disabled No
Removed No longer a member No

Member Onboarding

Method 1: Direct Invitations

Best for known users or controlled onboarding:

Via Web Interface

  1. Go to Organization > Members
  2. Click Invite Member
  3. Enter email address
  4. Select role (Member, Admin, Owner)
  5. Optionally add a personal message
  6. Click Send Invitation

Via API

curl -X POST https://api.langmart.ai/api/organizations/<org_id>/members/invite \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "role": "member",
    "message": "Welcome to our AI services platform!"
  }'

Bulk Invitations

For large-scale onboarding:

curl -X POST https://api.langmart.ai/api/organizations/<org_id>/members/invite/bulk \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "invitations": [
      {"email": "[email protected]", "role": "member"},
      {"email": "[email protected]", "role": "member"},
      {"email": "[email protected]", "role": "admin"}
    ]
  }'

Method 2: Join Requests

Best for open enrollment or self-service:

Enable Join Requests

curl -X PUT https://api.langmart.ai/api/organizations/<org_id> \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "allow_join_requests": true,
    "auto_approve_requests": false
  }'

Review Join Requests

# List pending requests
curl -X GET https://api.langmart.ai/api/admin/organization/join-requests \
  -H "Authorization: Bearer <your-api-key>"

# Approve a request
curl -X POST https://api.langmart.ai/api/admin/organization/join-requests/<request_id>/approve \
  -H "Authorization: Bearer <your-api-key>"

# Reject a request
curl -X POST https://api.langmart.ai/api/admin/organization/join-requests/<request_id>/reject \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Not affiliated with organization"}'

Method 3: Auto-Approval

Best for trusted domains:

curl -X PUT https://api.langmart.ai/api/organizations/<org_id> \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "allow_join_requests": true,
    "auto_approve_requests": true,
    "auto_approve_domains": ["acme.com", "acme-research.edu"]
  }'

Member Roles

Standard Roles

Role Description Typical Use
Member Basic access to models End users, developers
Admin Manage members and view usage Team leads, managers
Owner Full control including billing Organization owners

Role Permissions Matrix

Permission Member Admin Owner
Use models Yes Yes Yes
View own usage Yes Yes Yes
View all usage No Yes Yes
Manage members No Yes Yes
Manage connections No Yes Yes
View billing No Read Full
Manage billing No No Yes
Delete organization No No Yes

Changing Member Roles

curl -X PUT https://api.langmart.ai/api/organizations/<org_id>/members/<user_id> \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "admin"
  }'

Member Configuration

Setting Individual Limits

Override default limits for specific members:

curl -X PUT https://api.langmart.ai/api/organizations/<org_id>/spending-limits \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "<member-user-id>",
    "monthly_limit": 200.00,
    "daily_limit": 25.00
  }'

Limit Recommendations

Member Type Monthly Daily Rationale
New Member $50 $5 Conservative start
Regular User $100 $15 Normal usage
Power User $500 $50 High-volume needs
Developer $200 $25 Testing/development
Bot/Automation Custom Custom Based on workload

Member Metadata

Tag members with custom metadata:

curl -X PUT https://api.langmart.ai/api/organizations/<org_id>/members/<user_id> \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "department": "Engineering",
      "team": "Backend",
      "cost_center": "ENG-001",
      "manager": "[email protected]"
    }
  }'

Monitoring Members

Usage Dashboard

View member usage in the web interface:

  1. Go to Organization > Usage
  2. Filter by member
  3. View requests, tokens, costs

Via API

# Get organization usage by member
curl -X GET "https://api.langmart.ai/api/organizations/<org_id>/usage?group_by=user" \
  -H "Authorization: Bearer <your-api-key>"

# Get specific member's usage
curl -X GET "https://api.langmart.ai/api/organizations/<org_id>/usage?user_id=<member-user-id>" \
  -H "Authorization: Bearer <your-api-key>"

Usage Report Response

{
  "success": true,
  "usage": {
    "period": {
      "start_date": "2024-01-01",
      "end_date": "2024-01-31"
    },
    "by_member": [
      {
        "user_id": "uuid-1",
        "email": "[email protected]",
        "requests": 1500,
        "input_tokens": 500000,
        "output_tokens": 150000,
        "cost_usd": 45.50,
        "top_models": ["openai/gpt-4o", "anthropic/claude-3.5-sonnet"]
      }
    ]
  }
}

Top Users Report

Identify highest-usage members:

curl -X GET "https://api.langmart.ai/api/organizations/<org_id>/usage?group_by=user&sort=cost&limit=10" \
  -H "Authorization: Bearer <your-api-key>"

Managing Problem Members

Approaching Limits

When a member is approaching their spending limit:

  1. 70% Warning: Optional notification
  2. 90% Alert: Strong recommendation to notify
  3. 100% Block: Requests are rejected

Suspending Members

Temporarily disable a member's access:

curl -X PUT https://api.langmart.ai/api/organizations/<org_id>/members/<user_id> \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "suspended",
    "suspension_reason": "Unusual usage patterns"
  }'

Unsuspending Members

curl -X PUT https://api.langmart.ai/api/organizations/<org_id>/members/<user_id> \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "active"
  }'

Member Offboarding

Removing Members

curl -X DELETE https://api.langmart.ai/api/organizations/<org_id>/members/<user_id> \
  -H "Authorization: Bearer <your-api-key>"

What Happens When Removed

Data Behavior
Usage history Retained for reporting
API keys Revoked immediately
Active sessions Terminated
Personal connections Remain with user

Bulk Removal

For offboarding multiple members:

curl -X DELETE https://api.langmart.ai/api/organizations/<org_id>/members/bulk \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": ["uuid-1", "uuid-2", "uuid-3"]
  }'

Member Communication

System Notifications

Members automatically receive notifications for:

Event Notification
Invitation sent Email with join link
Invitation accepted Welcome email
Limit approaching 80% warning email
Limit reached Block notification
Role changed Email notification
Suspended Suspension notice
Removed Removal notice

Custom Announcements

Send announcements to all members:

curl -X POST https://api.langmart.ai/api/organizations/<org_id>/announcements \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "New Model Available",
    "message": "We have added Claude 3.5 Sonnet to the platform...",
    "send_email": true
  }'

Reporting

Member List Export

curl -X GET "https://api.langmart.ai/api/organizations/<org_id>/export/members?format=csv" \
  -H "Authorization: Bearer <your-api-key>"

Usage Report Export

curl -X GET "https://api.langmart.ai/api/organizations/<org_id>/export/usage?format=csv&start_date=2024-01-01&end_date=2024-01-31&group_by=user" \
  -H "Authorization: Bearer <your-api-key>"

Cost Allocation Report

For chargeback to departments:

curl -X GET "https://api.langmart.ai/api/organizations/<org_id>/export/cost-allocation?format=csv&group_by=department" \
  -H "Authorization: Bearer <your-api-key>"

Best Practices

Onboarding

  1. Welcome Message: Include clear instructions
  2. Start Low: Begin with conservative limits
  3. Documentation: Point to internal usage guidelines
  4. Test Account: Provide sandbox for learning

Ongoing Management

  1. Regular Reviews: Monthly usage reviews
  2. Proactive Limits: Adjust before problems
  3. Clear Policies: Document acceptable use
  4. Quick Response: Address issues promptly

Offboarding

  1. Prompt Removal: Remove access immediately
  2. Transfer Ownership: Reassign shared resources
  3. Document: Keep records for compliance
  4. Audit: Review recent activity if needed

Troubleshooting

Member Can't Access Models

Issue Solution
Status is "pending" Complete approval process
Exceeded limit Increase limit or wait for reset
No org connections Add organization-scoped connections
Wrong API key Ensure using current API key

Invitations Not Received

Issue Solution
Spam filter Check spam/junk folder
Invalid email Verify email address
Mail server issue Resend invitation

Usage Not Showing

Issue Solution
Recent requests Allow 1-2 minutes for sync
Wrong date range Adjust filter dates
Using personal connection Check connection scope

Next Steps