Split an image into layers
extract_layersSplit an image into its separate pieces, as transparent layers: each layer is a new PNG asset that holds some of the picture's objects, cut out with their own edges, and transparent everywhere else. Stacked bottom to top they make the picture again. Use it to take a generated collage, poster or scene apart, so each piece can be placed, moved and animated on its own: a paper cut-out that drops in, a headline strip that slides, a background that stays still. The answer lists the layers bottom layer first. Look at each with read_asset before you place it: the model decides what goes in which layer. To cut one object or a logo out of its background, remove_background is enough. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. Uses about 24 credits a layer: 4 layers use 97 credits.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"assetId": "<assetId>",
"layers": "<layers>",
"caption": "<caption>",
"projectId": "<projectId>"
},
"name": "extract_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layers | Yes | How many layers to split it into, 2 to 8. null for 4. More layers separate smaller pieces. | |
| assetId | Yes | The ready image asset to split into layers. Use the IDs search_assets gives. | |
| caption | Yes | A short description of the whole picture, or null to let the model describe it. It does not choose what goes in each layer. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. |