Skip to content

Error Codes

PromptJang uses standard HTTP status codes with JSON error bodies.

Error Response Format

json
{
  "error": "Human-readable error message"
}

HTTP Status Codes

CodeMeaning
400Bad Request — invalid input, missing required fields, endpoint disabled
401Unauthorized — missing or invalid API key / session token, invalid signature
402Payment Required — billing is pending or suspended
403Forbidden — self-service signup is disabled or the caller lacks access
404Not Found — resource does not exist or belongs to another org
409Conflict — limit reached or idempotency key reused with a different payload
413Payload Too Large — exceeds the fixed 256 KB limit
429Too Many Requests — rate limit exceeded
500Internal Server Error — unexpected failure (no details leaked)
503Service Unavailable — billing activation is disabled or unavailable

Common Error Scenarios

Invalid API Key

HTTP 401
{"error": "unauthorized"}

Invalid HMAC Signature

HTTP 401
{"error": "signature verification failed"}

Missing Signature Header

HTTP 401
{"error": "missing signature header"}

SSRF-Blocked URL

HTTP 400
{"error": "validation error: invalid webhook URL: private IP address"}

Payload Too Large

HTTP 413
{"error": "payload 524288 bytes exceeds limit of 262144 bytes"}

Endpoint Disabled

HTTP 400
{"error": "endpoint is disabled"}

Rate Limit Exceeded

HTTP 429
{"error": "rate limit exceeded for this endpoint"}

Auth Rate Limit Exceeded

HTTP 429
{"error": "too many login attempts, please try again later"}

Self-Deletion Prevention

HTTP 400
{"error": "cannot revoke the API key currently in use"}

Last Key Deletion Prevention

HTTP 400
{"error": "cannot revoke the last API key"}

Released under the MIT License.