All Labs API endpoints require authentication using a Bearer token.

Getting an API Key

  1. Log in to the Labs Portal
  2. Navigate to API Keys in the sidebar
  3. Click Create New Key
  4. Give your key a descriptive name (e.g., “Production Training”, “Development”)
  5. Copy the key immediately—it won’t be shown again
Keep your API keys secure. Never commit them to version control or share them publicly.

Using Your API Key

Include the key in the Authorization header:

Environment Variables

Store your API key in environment variables:

Rate Limits

API keys have rate limits based on your subscription. Rate limit information is included in response headers:

Handling Rate Limits

Error Responses

Authentication errors return a 401 status:
Common causes:
  • Missing Authorization header
  • Incorrect key format (should be Bearer <key>)
  • Expired or revoked key
  • Key doesn’t have access to requested collection

Key Management

Multiple Keys

Create separate keys for different environments:
  • Production: High rate limits, monitored usage
  • Development: Lower limits, for testing
  • CI/CD: Dedicated key for automated testing

Revoking Keys

If a key is compromised:
  1. Go to API Keys in the Labs Portal
  2. Find the compromised key
  3. Click Revoke
  4. Create a new key and update your systems
Revocation is immediate. Any requests using the revoked key will fail.

Subscription Requirements

API keys can only access collections your organization is subscribed to. Attempting to access unsubscribed collections returns:
Contact us through the Labs Portal to request access to additional collections.