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 |