Authentication

The Levrage.AI API uses Bearer token authentication. All requests (except public discovery endpoints) require an API key.

Getting Your API Key

  1. Log in to the Levrage.AI Studio
  2. Go to Settings → Developers → API Keys
  3. Click Generate New Key
  4. Copy and store your key securely — it’s only shown once

Your API key grants full access to your account’s agents, calls, and campaigns. Keep it secret. Never expose it in frontend code or public repositories.

Using Your API Key

Include it in the Authorization header as a Bearer token:

$curl -H "Authorization: Bearer lev_YOUR_API_KEY" \
> https://api.levrage.ai/v1/agents

Code Examples

1import requests
2
3API_KEY = "lev_YOUR_API_KEY"
4BASE_URL = "https://api.levrage.ai/v1"
5
6headers = {
7 "Authorization": f"Bearer {API_KEY}",
8 "Content-Type": "application/json"
9}
10
11response = requests.get(f"{BASE_URL}/agents", headers=headers)
12print(response.json())

Public Endpoints

These endpoints do not require authentication:

EndpointDescription
GET /v1/healthService health check
GET /v1/industriesList supported industries
GET /v1/industries/{industry}/agent-typesAgent types for an industry
GET /v1/voicesAvailable TTS voices
GET /v1/voices/languagesSupported languages

Error Responses

HTTP StatusMeaning
401Missing or invalid API key
403API key doesn’t have permission for this resource
429Rate limit exceeded — slow down
1{
2 "detail": "Invalid or expired API key"
3}

Rate Limits

PlanRequests/Minute
Free60
Pro300
EnterpriseCustom

Rate limit headers are included in every response:

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 295
X-RateLimit-Reset: 1706140800

Best Practices

  1. Store keys in environment variables — Never hardcode in source files
  2. Use server-side only — Never call the API from browser/mobile frontend
  3. Rotate keys regularly — Generate new keys and revoke old ones
  4. Use one key per environment — Separate keys for dev, staging, production