SafeURL Docs
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_xxxxxxxxxxxxxxxxxxxx

API keys are created in the dashboard with one or more scopes:

ScopeGrants access to
SCAN_WRITECreate scans, submit batch
SCAN_READRead 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"
  }
}
HTTPCodeMeaning
400VALIDATION_ERRORInvalid request body or parameters
401UNAUTHORIZEDMissing or invalid credentials
403FORBIDDENAPI key lacks required scope
404NOT_FOUNDResource does not exist
422SSRF_BLOCKEDURL targets a private/internal address
422INSUFFICIENT_CREDITSNot enough credits
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORUnexpected server error

On this page