Skip to main content

Error Response Format

All API errors return JSON with a consistent structure:
{
  "error": "Description of what went wrong",
  "code": "ERROR_CODE",
  "status": 400
}

Error Codes

CodeHTTP StatusDescription
INVALID_REQUEST400Request validation failed — missing or invalid fields
INVALID_PATH400File path validation failed (contains .., starts with /, etc.)
INVALID_HASH400Hash is not a valid 64-character lowercase hex string
UNAUTHORIZED401Missing, invalid, or expired API key
NOT_FOUND404Resource not found or not owned by the authenticated user
RATE_LIMITED429Rate limit exceeded — check X-RateLimit-Reset header
FILE_TOO_LARGE413Individual file exceeds plan limit (250 MB free, 5 GB hobby)
STORAGE_EXCEEDED413Total storage quota exceeded (10 GB free, 100 GB hobby)
SITE_LIMIT_EXCEEDED403Maximum site count reached (500 for free plan)
PLAN_LIMIT403Feature not available on current plan
INTERNAL_ERROR500Unexpected server error

Common Scenarios

Invalid API Key

{
  "error": "Invalid API key",
  "code": "UNAUTHORIZED",
  "status": 401
}
Fix: Check that your API key starts with sl_live_ and is complete (no truncation).

Rate Limited

{
  "error": "Rate limit exceeded. Try again later.",
  "code": "RATE_LIMITED",
  "status": 429
}
Fix: Wait until the time indicated by the X-RateLimit-Reset header. See Rate Limits.

Storage Exceeded

{
  "error": "Storage quota exceeded. Current usage: 9.8 GB of 10 GB.",
  "code": "STORAGE_EXCEEDED",
  "status": 413
}
Fix: Delete unused sites to free storage, or upgrade to the Hobby plan for 100 GB.

File Path Invalid

{
  "error": "Invalid file path: ../etc/passwd",
  "code": "INVALID_PATH",
  "status": 400
}
Fix: File paths must be relative (no leading /), cannot contain .., and must be under 500 characters.