SetuDocs

Errors

Setu uses conventional HTTP status codes and returns a JSON body with an error object describing what went wrong.

json
{
  "error": {
    "message": "Invalid API key.",
    "type": "auth_error",
    "code": "invalid_api_key"
  }
}

Status codes

CodeMeaning
400Bad request — malformed JSON or missing required fields.
401Unauthorized — missing, invalid, revoked or expired key.
403Forbidden — the key lacks permission for this model.
404Not found — the requested model does not exist.
429Too many requests — you exceeded your rate limit.
500Server error — something went wrong on our end.

Handling errors

Always check the status code and back off on 429 responses using exponential retry. Inspect the error.code field for programmatic handling.