Skip to main content
Errors can occur before a request is accepted or later during generation.

Synchronous errors

Most HTTP errors use the FastAPI error envelope:
Validation errors may return a list in detail. Do not parse human-readable messages to make permanent business decisions.

Terminal failures

An accepted request can later finish with failed or nsfw:
Failed and NSFW requests are not charged; any reserved credits are refunded.

Safe retry policy

  • Retry GET status requests after network failures and 5xx responses.
  • Do not retry authentication or validation failures without changing the request.
  • Use exponential backoff with jitter.
  • Set maximum attempts and a total retry deadline.
  • Do not automatically repeat a generation POST after an ambiguous timeout because submissions do not currently accept an idempotency key.
Every API response includes an X-Correlation-ID header. Record it with the request_id and include both when contacting support.