API Reference
API Reference
SafeURL.ai REST API — base URL, authentication, and errors
Base URL: https://api.safeurl.ai
Interactive docs (Scalar UI) are available at /openapi.
Authentication
All /v1 endpoints require an API key. Pass it in the Authorization header:
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxAPI keys are created in the dashboard with one or more scopes:
| Scope | Grants access to |
|---|---|
SCAN_WRITE | Create scans, submit batch |
SCAN_READ | Read scan results and history |
Rate limiting
100 requests per minute per IP address on all /v1 routes. Exceeding the limit returns 429 Too Many Requests.
Credits
Your credit balance and usage history are available in the dashboard. Each completed scan consumes one credit. The credits API is not exposed to API key holders.
Errors
All errors follow a consistent shape:
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Not enough credits to create scan"
}
}| HTTP | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request body or parameters |
| 401 | UNAUTHORIZED | Missing or invalid credentials |
| 403 | FORBIDDEN | API key lacks required scope |
| 404 | NOT_FOUND | Resource does not exist |
| 422 | SSRF_BLOCKED | URL targets a private/internal address |
| 422 | INSUFFICIENT_CREDITS | Not enough credits |
| 429 | RATE_LIMITED | Too many requests |
| 500 | INTERNAL_ERROR | Unexpected server error |