SDK Reference

Encoders

Choose codec and container for your target platform.

Format Guide

FormatCodecAlphaTypical Use
MP4H.264NoUniversal playback
WebMVP9YesWeb transparency
MOVProResYesProfessional editing
PNG SequencePNGYesFrame-by-frame VFX

Tradeoffs

  • Higher quality increases file size and processing time.
  • WebM gives efficient alpha for browser delivery.
  • ProRes is heavy but best for editing headroom.

Recommended SDK Usage Pattern

  1. Initialize singleton client per service process.
  2. Wrap SDK calls with your own timeout/retry decorators.
  3. Map SDK/domain errors into internal error taxonomy.
  4. Capture job_id and business context in your tracing system.

SDK Hardening Checklist

  • Add per-call timeout defaults and circuit breaking.
  • Track SDK version in logs for post-incident debugging.
  • Test SDK upgrade in staging with archived production payloads.
  • Implement fallback strategy by model and output format.

Encoder Selection Guide

FormatBest ForTradeoff
webmTransparent web deliveryNot ideal for all legacy players
movProfessional editing workflowsLarger files
mp4Universal playbackNo alpha channel

When to Use Encoders

Encoders belongs to the SDK Reference section and covers choose codec and container for your target platform.

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 Encoders when wrapping the SDK in application services, queue workers, or automation scripts.
  • Keep SDK calls server-side so API keys are never exposed in browser code.
  • Add typed request validation around SDK inputs before passing user-provided files, URLs, or composition data.

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 instantiate SDK clients repeatedly inside tight loops when one process-level client is enough.
  • Do not expose SDK calls that include secret keys from client-side routes.
  • Do not upgrade SDK versions without replaying archived payload fixtures in staging.

FAQ

QuestionAnswer
Is Encoders 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.