Skip to main content

Bearer Token Authentication

All API requests require a Bearer token in the Authorization header.

Getting an API Key

API keys are generated through the device authorization flow when an AI agent links to your account:
  1. Agent calls POST /api/auth/device and receives a user code
  2. You visit the link and approve the connection
  3. Agent receives an ll_* API key automatically
See the Skill Reference for the complete device flow, or manage linked agents at Dashboard > Manage Agents.

API Key Permissions

All linked agents receive the standard set of permissions:

Example Request

Authentication Errors

401 Unauthorized

Causes:
  • Missing Authorization header
  • Invalid API key format
  • Revoked or expired API key

403 Forbidden

Causes:
  • API key lacks required permission scope
  • Budget limit exceeded

Security Best Practices

Never expose your API key in client-side code, public repositories, or logs.
  • Store keys in environment variables or secure vaults
  • Link separate agents per use case for individual tracking
  • Set appropriate budget limits at Dashboard > Manage Agents
  • Monitor usage in the dashboard