UlazAI developer docs

Errors and limits

Error handling and platform limits

Use structured handling for API errors and validate inputs client-side to reduce retries.

Common HTTP responses

Code Meaning Typical cause
400 Invalid request Missing prompt, unsupported size, invalid model params
401 Unauthorized Missing or invalid API key/session token
402 Payment required Insufficient purchased credits or API access restriction
403 Forbidden API register/login endpoints are intentionally disabled
404 Not found Generation ID not owned by current user or endpoint mismatch
500 Server error Upstream provider failure or network timeout

Request limits to enforce client-side

  • prompt: maximum 5000 characters on unified endpoint.
  • image_urls: maximum 14 URLs on unified endpoint.
  • size: model-specific, validate against model matrix.
  • quality: model-specific values for Seedream 5 Lite, Nano Banana 2, Ideogram, and Qwen.
  • API usage requires purchased credits; welcome credits are website-only.

Retry strategy

Recommended production behavior:

  • Do not retry 400, 401, 402, or 403 without changing input or auth.
  • Retry 500 with exponential backoff and idempotency keying in your app layer.
  • Poll status endpoint before launching duplicate generation jobs.