All DeepXL API endpoints require authentication. You can authenticate using either an API key or a Bearer token (Clerk JWT).
API Key Authentication
Pass your API key in the x-api-key header:
curl https://api.deepxl.ai/v1/detection \
-H "x-api-key: YOUR_API_KEY"
Managing API Keys
Use the API Keys endpoints to manage your keys programmatically:
| Action | Method | Endpoint |
|---|
| List keys | GET | /v1/api-keys |
| Create key | POST | /v1/api-keys |
| Update key | PUT | /v1/api-keys/{id} |
| Delete key | DELETE | /v1/api-keys/{id} |
API key management endpoints require Bearer token authentication (Clerk JWT). You cannot manage API keys using another API key.
Bearer Token Authentication
Pass a Clerk JWT in the Authorization header:
curl https://api.deepxl.ai/v1/detection \
-H "Authorization: Bearer YOUR_CLERK_JWT"
Bearer tokens are issued by Clerk and contain your organization context. They are typically used by the DeepXL Dashboard and frontend integrations.
Dual Authentication
All analysis endpoints (/v1/detection, /v1/parse, /v1/verification, /v1/files) accept either an API key or a Bearer token. If both are provided, the Bearer token takes priority.
Error Responses
| Status | Description |
|---|
401 Unauthorized | Missing or invalid API key / Bearer token |
403 Forbidden | Valid credentials but insufficient permissions |
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Unauthorized"
}