Unmerge

v1.0.3
app.unmerge/unmerge Checked 4 days ago Published 8 days ago

Split a flat image into up to 100 transparent PNG layers.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

split_into_layers Split an image into layers

Split a flat image (PNG, JPG or WebP, at least 512 × 512 px) into named transparent layers, with the hidden parts behind objects filled in. Costs 1 credit per layer returned (up to 17 by default, or up to 100 when prompt lists or asks for more parts); the account needs at least 5 credits to start. Pass the image as a public https URL or as base64. Waits up to 50 seconds; if it is still processing, call get_layers later.

ParameterTypeDescription
image_base64stringThe image as base64, with or without a data: prefix. Use when there is no URL.
image_urlstringPublic https URL of the image.
promptstringOptional: what to separate, in plain words, e.g. "the cat, the sofa and the background". Leave empty to let the model decide (up to 17 layers), or list/ask for more parts to allow up to 100 layers.
wait_secondsintegerHow long to wait for the result before returning, 0 to 50 seconds.

get_layers Get the layers of a split

Status of a split. When ready, returns every layer with its name, position and a PNG download URL valid for one hour. Free.

ParameterTypeDescription
project_id *stringThe id returned by split_into_layers.
wait_secondsintegerHow long to wait for the result before returning, 0 to 50 seconds.

unlock_layers Unlock layers

For a split with status needs_credits: pay the extra credits owed (shown as credits.owed) so the layer files become available. Charges once even if called again.

ParameterTypeDescription
project_id *stringThe id returned by split_into_layers.

get_credits Credits left

Credits available on this Unmerge account. One credit is one layer returned.