Video-generation APIs fail in patterns, and the HTTP status code is usually the least informative part of the failure. The same "error" can mean your prompt was malformed, your burst rate tripped a limiter, or someone else's ten-minute render is hogging the queue. Reading the codes correctly is the difference between a retry loop that heals and one that hammers.
429: the limiter is talking to you
Rate-limit responses are the most common non-200 you will see, and the most commonly mishandled. A 429 during a burst of submissions is the limiter working as intended — back off, jitter, retry. A 429 on a status poll is different: it means your polling interval is too aggressive for the endpoint, and the fix is the backoff schedule, not patience. Providers that document rate-limit headers make this easy; where headers are missing, halve your poll frequency until 429s disappear.
422: your prompt, not their problem
Validation errors (422, sometimes 400) mean the request body failed schema checks — a duration below the floor, an aspect ratio outside the menu, a prompt field that exceeds its character budget. These will never succeed on retry, so retrying them is pure waste. Log the provider's error detail verbatim; it usually names the offending field, and fixing it client-side beats debugging by trial prompts.
5xx: mostly their queue, occasionally your payload
Server errors during submission usually mean capacity trouble — the provider's scheduler is shedding load. These are retryable, but with a delay measured in tens of seconds, not milliseconds. A 5xx on a status poll is more interesting: it can mean the job record is temporarily unavailable, and treating it as a failed job (when the job may actually be running) is how pipelines lose finished renders. Keep polling through transient 5xx until a terminal state or your job timeout arrives.
The code that does not exist: queue timeouts
The most expensive failure mode has no HTTP code at all, because it happens after your submit succeeded: the job that never reaches a terminal state. Providers reap stuck jobs at different rates — some flip an "expired" status after ten or fifteen minutes, others leave the record pending indefinitely. Your client needs its own job clock regardless, because your user's patience expires long before any provider's timeout does.
A short taxonomy to ship with
Retry 429s and 5xx with backoff; never retry 422s; poll through transient poll-errors; keep your own job timeout; and log every provider error detail verbatim, because the message body is where the actual diagnosis lives. The endpoint reference at magi2ai.dev documents the specific codes and their semantics for the MAGI-2 line — reading your provider's error taxonomy before integration is an afternoon that saves a week of production archaeology.