Skip to main content
Product ID: switchx Billing: Beeble Cloud credits Use SwitchX to replace an environment, relight a subject, or restyle a shot while preserving the source performance. The alpha mask controls which regions are regenerated; a reference image guides the lighting and appearance. For reference-image preparation and visual examples, see the SwitchX product guide.

Before you start

  1. Create an API key for an organization with this product enabled.
  2. Prepare your media as Beeble URIs, authorized CDN URLs, public/presigned HTTPS URLs, or base64 data URIs.
  3. Select an available model below; complete any required consent in Beeble Cloud.

Models and inputs

Set BEEBLE_API_KEY and, for internal teams, BEEBLE_TEAM_ID.
Response (200): models contains each model’s id, name, input_schema, and any requires_consent value. Use the selected model’s input_schema for required inputs, types, defaults, and supported values. Request parameters and response schema Read the model schema for supported resolutions and frame limits. Use alpha_mode: "auto" to isolate the main subject, or "fill" to relight and restyle the whole frame. A reference image should show the subject and environment together so it communicates how the subject should be lit. For SwitchX 2.0 video, camera_tracking controls whether the generated environment follows the source camera motion.

Submit a job

Schemas: Request body · Response. The inputs object follows your selected model’s input_schema above. Save as request.json with your media URIs. The Beeble URIs below can be replaced with any supported single-file media input. Use a unique idempotency_key for each new job; keep it unchanged on retries.
Python requires requests; JavaScript examples run in Node.js.
Response (202, abbreviated):

Results and constraints

The server measures the source, so generation_type and frame_count can be omitted. A supplied media type must match the file. Use alpha for a finished custom matte, or alpha_keyframe with alpha_keyframe_index for the product API’s keyframe mode. Source and custom-alpha uploads must not exceed 5 GB. With alpha_mode: "fill", outputs.alpha is null. See Billing & credits for spending caps and refunds.

Finish a SwitchX 2.0 result

Use SwitchX 2.0 Finish to render a completed Standard image or video at a higher resolution. Finish uses the separate switchx_finish product and reuses the parent’s source, mask, and settings without another upload. Supported transitions are 720 → 1080, 720 → 2160, and 1080 → 2160, subject to the original source size. Pass the original product generation’s public dap_… ID as inputs.parent_job_id. Finish results and jobs from /v1/switchx/generations cannot be parents. The Finish guide covers eligibility, transition estimates, submission, and retrieving the new result.

Existing SwitchX generations

Existing integrations continue to use /v1/switchx/generations. Choose SwitchX API in the documentation selector for its quickstart and API Reference.

Completed response

Poll the job using the returned id until status is success. Stop on failed, cancelled, or credit_required. Example response (200, success; abbreviated): URLs are illustrative. Available outputs depend on the model and input media.
Download outputs.render. With alpha_mode: "fill", outputs.alpha is null.