BlitzAPI uses API Keys to authenticate requests. You can view and manage your API keys in the BlitzAPI Dashboard.
Authentication to the API is handled via an HTTP header. Include your API key in every request using the x-api-key header.
Security Warning: Your API keys carry many privileges. Do not use your API keys in client-side code (browsers, mobile apps).Always route requests through your own backend server to keep your keys secret.
Example Request
Here is how to set the header in various environments:
curl "https://api.blitz-api.ai/api/blitz/key-info"\
-H "x-api-key: YOUR_API_KEY"
Verifying your Key
To check if your key is active and view your remaining credits, use the /api/blitz/key-info endpoint. This is a great way to “health check” your integration.
Response:
{
"id": "12345-abcde",
"credits_balance": 278,
"credits_reset_at": "25/11/2025, 00:00:00 AM",
"active_plans": [
{
"name": "PRO",
"status": "active"
}
]
}
Errors
If authentication fails, the API will return a 401 Unauthorized error.
| Code | Meaning | Solution |
|---|
401 | Unauthorized | Missing or invalid API key. Check that the x-api-key header is present and correct. |
402 | Payment Required | Your key is valid, but you have insufficient credits to perform the action. |
404 | Not Found | The API Key provided does not exist in our system. |