Skip to content

Authentication

All LMIF API requests require authentication using an API key.

LMIF uses bearer token authentication. Include your API key in the Authorization header:

Terminal window
Authorization: Bearer lmif_live_xxx
Key PrefixEnvironmentPurpose
lmif_test_SandboxDevelopment and testing
lmif_live_ProductionLive integrations
  1. Sign up at lookmaimfamous.com/developers
  2. Complete platform verification
  3. Receive your sandbox key immediately
  4. Apply for production access when ready

To receive production API keys, your platform must:

  • Demonstrate a working sandbox integration
  • Agree to the LMIF Platform Agreement
  • Implement required webhook handlers
  • Pass a basic compliance review

The TypeScript SDK handles authentication automatically:

import { LMIFClient } from '@lookmaimfamous/lmif';
const lmif = new LMIFClient({
apiKey: process.env.LMIF_API_KEY,
});
// All requests are automatically authenticated
const result = await lmif.identity.check({ name, imageUrl });

For direct HTTP requests, include the header:

Terminal window
curl -X POST https://api.lookmaimfamous.com/v1/lmif/identity/check \
-H "Authorization: Bearer lmif_live_xxx" \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "imageUrl": "https://example.com/image.jpg"}'
  1. Store keys securely - Use environment variables or a secrets manager
  2. Never commit keys - Add .env to your .gitignore
  3. Rotate regularly - Rotate keys every 90 days
  4. Use least privilege - Create separate keys for different environments
  5. Monitor usage - Check the dashboard for unusual activity

You can rotate API keys from your dashboard:

  1. Go to SettingsAPI Keys
  2. Click Rotate next to the key
  3. You’ll have 24 hours to update your integration
  4. The old key will be invalidated after 24 hours

If a key is compromised:

  1. Go to SettingsAPI Keys
  2. Click Revoke next to the key
  3. The key is immediately invalidated
  4. Generate a new key

API keys are subject to rate limits:

PlanRequests/minuteRequests/day
Sandbox601,000
Basic30050,000
Standard1,000500,000
EnterpriseCustomCustom

See Rate Limits for details.

Authentication errors return 401 Unauthorized:

{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key",
"details": "The provided API key is invalid or has been revoked"
}
}

Common authentication errors:

CodeDescription
UNAUTHORIZEDInvalid or missing API key
KEY_REVOKEDThe API key has been revoked
KEY_EXPIREDThe API key has expired (post-rotation)
WRONG_ENVIRONMENTUsing sandbox key in production or vice versa