Omni Flash API errors: which to retry and which to fix

A retry policy for Gemini Omni Flash 1.1 calls on Sume: 400, 401, 402, 409, 429 rate_limited, 429 queue_full and 503 each mapped to retry, wait or fix.

3 min readSume
All posts

Retry 429 and 503, never 400, 401 or 402. For 409, read the code first. That is the policy; the table below ties each Sume error to the action and to what an Omni job holds at the moment it happens.

Policy

From Errors and rate limits
Status and codeMeaningAction
400 invalid_requestBody, query or headers not validFix the request; do not retry
401 unauthorizedKey missing or invalidFix the key
402 insufficient_creditsBalance cannot cover the reservationWait for included Gen$ or upgrade the plan, or submit a cheaper request, then resubmit
409 job_not_completed / job_not_cancelable / job_generation_already_startedOperation invalid for the job statePoll status; do not repeat the action
429 rate_limitedToo many requests in the windowBack off, honor retry-after
429 queue_fullWorkspace concurrency and queue both fullWait for a job to finish, then retry
503 provider_capacity_exceededSume's provider dispatch queue is fullRetry later with the same Idempotency-Key

What the 402 means in dollars

Omni reserves at submit, so the 402 threshold is the clip price: $0.1125 for 3 seconds at 360p up to $3.75 for 10 seconds at 4K. A balance of $3.00 refuses a 10 second 4K job and still accepts a 10 second 1080p one at $1.875.

Retry rules

  • Send an Idempotency-Key on every submit so a retried POST returns the original job.
  • A failed job (not a failed request) shows a public error category such as validation (correct the input), quota (add funds or decrease the request cost) or queue (retry later with the same key); read its next action.
  • Include the request_id from the error body if you contact support, never the API key or signed URLs.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume