Guides
Composition JSON
Reference schema for composition payload used by /v1/jobs/{job_id}/start.
Guides
Reference schema for composition payload used by /v1/jobs/{job_id}/start.
Composition controls foreground placement on the output canvas.
Use this payload when you want deterministic positioning and model-safe defaults for enterprise workflows.
{
"composition": {
"canvas": { "width": 1920, "height": 1080 },
"foreground": {
"anchor": "center",
"scale": 1,
"offset": { "x": 0, "y": 0 }
}
}
}| Field | Type | Description |
|---|---|---|
| canvas.width | number | Output width in pixels |
| canvas.height | number | Output height in pixels |
| foreground.anchor | string | Anchor point, e.g. center, top-left |
| foreground.scale | number | Foreground scaling ratio |
| foreground.offset.x/y | number | Pixel offset from anchor |
| type | Required Fields | Notes |
|---|---|---|
| transparent | none | Use WebM/MOV/GIF/WebP/PNG sequence for alpha |
| color | color (hex or RGB normalized) | Best for MP4 exports |
| image | image_url | Match aspect ratio to avoid stretching |
curl -X POST https://api.removebgvideo.com/v1/jobs/{JOB_ID}/start \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "pro",
"text_prompt": "person, clothing accessories, glowing ring",
"background": { "type": "transparent" },
"composition": {
"canvas": { "width": 1920, "height": 1080 },
"foreground": {
"anchor": "center",
"scale": 1,
"offset": { "x": 0, "y": 0 }
}
}
}'| Anchor | Typical Use | Risk |
|---|---|---|
| center | General subject centering | Can crop tall subjects if scale too high |
| top-left | UI-like fixed placement | Less natural for portrait content |
| bottom-center | Talking head over lower third | Can overlap caption area |
Composition JSON belongs to the Guides section and covers reference schema for composition payload used by /v1/jobs/{job_id}/start.
The page is written for developers and operators who need predictable video background removal behavior in production, not just a one-off demo request.
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.
| Question | Answer |
|---|---|
| Is Composition JSON 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. |