Skip to main content
GENGEN errors use a stable JSON envelope:

Common status codes

Handling errors

  • Branch on error_code, not the message text.
  • Log the HTTP status, error_code, and request correlation data without logging API keys.
  • Retry transient 5xx and rate-limit responses with exponential backoff and jitter.
  • Fix 4xx request errors before retrying.
  • Treat task-not-found responses as non-disclosing. The retrieve endpoint does not reveal tasks that are inaccessible to the current API key.

Provider error codes

When a response includes a BytePlus ModelArk error code, search the provider error reference for its description. Continue to use the GENGEN error_code and HTTP status as the stable values in application logic.