Getting started
Authentication & API keys
Create, scope, rotate and protect the API keys that authenticate your requests.
Every request to http://localhost:4000 must include an API key in the x-api-key header:
curl "http://localhost:4000/v1/usage" -H "x-api-key: YOUR_API_KEY"The
x_api_keyquery parameter is still accepted for backwards compatibility but is deprecated: query strings end up in logs and browser history. Always use the header.
Creating keys
Open API Keys in the dashboard and click Create key. Each key has:
| Setting | Description |
|---|---|
| Alias | A unique, human-readable name within your workspace, e.g. "Production backend". Shown in logs and in /v1/usage. |
| Category | production, development, staging or custom. Used to filter logs and analytics. |
| Active | Inactive keys are rejected with 401 Inactive API Key. Toggle it without deleting the key. |
| Expiry | Optional expiry date. After it, requests fail with 401 Expired API Key. |
| Quotas | Optional per-key limits (see below). |
The full key is displayed only once at creation. We store a hash, so we can't show it again — create a new key if you lose it.
Per-key quotas
Quotas cap how many requests a single key can make, independently of your plan. They're ideal for giving a key to a contractor, a staging environment or a customer-facing integration.
| Quota | Window |
|---|---|
| Total | Lifetime of the key |
| Daily | Rolling 24 hours |
| Weekly | Rolling 7 days |
| Monthly | Rolling 30 days |
When a quota is reached, requests return 401 with a message naming the window:
{ "error": "Rate limit exceeded for the API key: quota daily" }Quotas are rolling windows, so capacity frees up gradually as older requests age out. Quota errors are not retried by the official SDKs.
Lifecycle: deactivate, archive, restore, delete
- Deactivate — temporarily reject requests; reactivate any time.
- Archive — hide a retired key from the default list and reject its requests. Its logs and analytics remain.
- Restore — bring an archived key back.
- Delete — permanently remove a key. Only possible for keys that have never been used; keys with history must be archived so logs and billing stay consistent.
Rotating keys
Rotate keys regularly and immediately if one may have leaked:
- Create a new key with the same category and quotas.
- Deploy the new key to your environment (secret manager, environment variable).
- Watch API Logs until the old key receives no more traffic.
- Deactivate the old key, then archive it.
Because each key has its own alias, logs show exactly which services still use the old one.
Keeping keys safe
- Never embed keys in client-side code, mobile apps or public repositories. Call ScreenshotDude from your backend.
- Use one key per environment and per service.
- Use quotas and expiry dates for keys you share.
- If a key leaks, deactivate it first, then rotate.
IP blocking
After repeated failed authentication attempts from the same IP address, that IP is temporarily blocked and receives:
{ "error": "IP temporarily blocked" }with status 403. The block lifts automatically after a cool-down. Check that you are sending the correct key before retrying.
Error reference
| Status | Message | Cause |
|---|---|---|
| 401 | Invalid API Key |
Missing or unknown key |
| 401 | Inactive API Key |
The key is deactivated or archived |
| 401 | Expired API Key |
The key passed its expiry date |
| 401 | Rate limit exceeded for the API key: quota total |
Lifetime quota reached |
| 401 | Rate limit exceeded for the API key: quota daily |
24-hour rolling quota reached |
| 401 | Rate limit exceeded for the API key: quota weekly |
7-day rolling quota reached |
| 401 | Rate limit exceeded for the API key: quota monthly |
30-day rolling quota reached |
| 401 | Rate limit exceeded: You've exceeded the per-second rate limit on your subscription |
Plan rate limit (see below) |
| 403 | IP temporarily blocked |
Too many failed authentication attempts |
Note that rate limits return 401, not 429. See Status codes.
Plan rate limits
| Plan | Credits / period | Extra requests | Rate limit |
|---|---|---|---|
| Free | 100 | Not available (402) | 2/s · 30/min |
| Starter | 1,000 | $9.00 per 1,000 | 5/s · 120/min |
| Pro | 10,000 | $8.00 per 1,000 | 10/s · 500/min |
| Ultimate | 50,000 | $7.50 per 1,000 | 25/s · 1500/min |