Guides

Retry Strategy

Build fault-tolerant job orchestration.

When to Retry

Error TypeRetry?Notes
429 rate_limitedYesBackoff with jitter
5xx server errorYesRetry 3-5 times
4xx invalid_requestNoFix payload first
insufficient_creditsNoTop up credits

Idempotency and Deduplication

  • Assign your own external_job_id for each source asset.
  • Before create-job retry, query internal DB to avoid duplicates.
  • Store all attempts and final status for observability.

Quality Guardrails

  • Prefer representative source clips when tuning model defaults.
  • Keep input compression moderate to preserve edge details.
  • Use explicit output format policy for transparent vs non-transparent workflows.
  • Run A/B validation with the same clip set before changing defaults.

Implementation Checklist

  1. Define payload schema validation in backend before forwarding requests.
  2. Store model/output_format/background settings with each job record.
  3. Add internal quality review for difficult scenes (hair, glass, motion blur).
  4. Create runbook entries for model-specific failure cases.

Retry Budget Policy

Request TypeMax RetriesBackoff
Create/Start job3Exponential + jitter
Status pollingUnlimited until timeout windowAdaptive interval
Download/output fetch2-3Short linear or exponential

When to Use Retry Strategy

Retry Strategy belongs to the Guides section and covers build fault-tolerant job orchestration.

The page is written for developers and operators who need predictable video background removal behavior in production, not just a one-off demo request.

  • Use this guide when retry strategy decisions affect output quality, processing cost, or user-facing workflow design.
  • Test guidance on representative videos rather than only short demo clips.
  • Record the chosen model, background, output format, and quality notes with each processed job for later debugging.

Implementation Notes

Before you promote this workflow, test it with at least one short clip, one longer clip, and one visually difficult clip from your actual product or customer segment.

For support and debugging, persist the original input reference, selected model, output format, credit usage, and final job status alongside your internal user or project id.

  • Do not judge quality from a single frame; inspect motion, hair, hands, transparent edges, and fast turns.
  • Do not compare model outputs using different source compression levels.
  • Do not change production defaults without a rollback path and a known sample set.

FAQ

QuestionAnswer
Is Retry Strategy required for every integration?Use it when the topic affects your setup, quality target, or operational workflow.
What should I test before going live?Verify success, failure, timeout, retry, and insufficient-credit paths with realistic video files and the same output format you plan to ship.
How does this connect to the rest of the API?Most workflows connect upload or source URL handling, job creation, status polling, output retrieval, usage tracking, and operational logging.