Skip to main content
All LangDex API requests require authentication using a Bearer token.

Getting an API Key

  1. Sign up or log in at langdex.co/dashboard
  2. Navigate to Settings > API Keys
  3. Click Create API Key
  4. Copy your key (it won’t be shown again)
Keep your API key secret. Never expose it in client-side code or public repositories.

Using Your API Key

Include your API key in the Authorization header:
curl "https://api.langdex.co/v1/languages" \
  -H "Authorization: Bearer YOUR_API_KEY"

API Key Types

TypeUse CasePermissions
PublicClient-side appsRead-only, rate-limited
SecretServer-side appsFull access
TestDevelopmentSandbox data only

Authentication Errors

401 Unauthorized

Missing or invalid API key:
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key"
  }
}

403 Forbidden

Valid key but insufficient permissions:
{
  "error": {
    "code": "forbidden",
    "message": "This API key does not have access to this resource"
  }
}

Rate Limits by Key Type

Key TypeRate LimitMonthly Quota
Public10 req/s10,000
Secret50 req/s100,000
Enterprise200 req/sUnlimited

Rotating API Keys

To rotate your API key:
  1. Create a new API key
  2. Update your application to use the new key
  3. Delete the old key
API keys can be deleted immediately, but this will break any applications still using them.

Security Best Practices

Never hardcode API keys. Use environment variables:
export LANGDEX_API_KEY=your_key_here
Make API calls from your backend, not from client-side JavaScript.
Create keys with only the permissions needed for each use case.
Check your dashboard regularly for unexpected usage patterns.