REST API

Errors, rate limits, and retries

Handle failures predictably without duplicate credit use or accidental retry storms.

Verified against the implementation ·

Error envelope

{
  "error": {
    "type": "invalid_request_error",
    "code": "idempotency_key_required",
    "message": "Idempotency-Key is required for AI operations.",
    "param": "Idempotency-Key",
    "requestId": "req_..."
  }
}

Client and authorization errors use invalid_request_error. Unexpected server failures use api_error. Always log error.code and requestId; do not build logic from the human-readable message.

Common errors

HTTPCodeAction
400invalid_requestCorrect the field identified by param/details
400idempotency_key_requiredAdd a stable unique key for the logical AI operation
401authentication_requiredSend a Bearer token
401invalid_api_keyReplace an invalid, expired, or revoked REST key
401oauth_requiredUse OAuth instead of an API key for remote MCP
403insufficient_scopeAuthorize the required scope
403email_verification_requiredVerify the PrompTessor account email
403public_platform_requires_paid_planActivate a paid plan
409idempotency_conflictDo not reuse a key with a different request body
429rate_limit_exceededWait for RateLimit-Reset or Retry-After
429concurrency_limit_exceededWait for active AI work to complete
429usage_exhaustedWait for renewal or add add-on credits
429active_upload_limit_exceededDelete or consume an active upload
429upload_storage_limit_exceededRelease active upload storage or use a smaller file
409webhook_endpoint_limit_reachedDelete an unused webhook endpoint or change plan

Plan-based platform limits

Plan tierAI/minRead/minConcurrent AIAPI keysWebhooksActive uploads
Free000000
Pro3012033310 / 50 MB
Pro+6024065525 / 250 MB
Max12048012101050 / 1 GB

Pro Lifetime, Pro+ Lifetime, and Max Lifetime use their corresponding tier limits. The minute window is enforced for both the account and the individual credential; the higher observed count determines remaining capacity.

Safe retry strategy

  1. 1

    Generate one idempotency key

    Create it once per logical AI operation and persist it alongside your job.

  2. 2

    Retry transient failures

    Retry network errors, 429, and 5xx with exponential backoff and jitter. Honor Retry-After when present.

  3. 3

    Reuse the same key and body

    A completed response can be replayed for up to 24 hours and includes Idempotent-Replayed: true.

  4. 4

    Stop on validation and authorization errors

    Do not retry 400, 401, 403, or idempotency_conflict until the request or credentials change.