Good integrations treat paid requests as durable operations and keep enough context to retry safely.
Common statuses
Handle 401 for missing or invalid keys, 402 for insufficient cauris, 429 for capacity, and 5xx for provider or router errors.
401 unauthorized
402 insufficient_cauris
429 capacity or rate limit
5xx provider or router failure
Long media jobs
Video and heavy media work can take longer than text. Start the job, store the returned id, poll for status, and fetch content only after completion.
Client retries
Retry after transient failures, but avoid blind loops. For expensive media, make retries explicit or idempotent so the user does not accidentally create duplicates.