xtract.bot

Chroma key (green-screen)

Try it interactively →
POST /api/image-chroma-key

Chroma-key an image: knock out a colour (green-screen, blue-screen, or any colour you specify) and return PNG with transparency in its place.

Replaces a colour key with transparency — the standard green-screen / blue-screen technique. Useful for product photography, where you photograph against a uniform background and then knock it out for compositing. Inputs: - `keyColor`: hex colour of the background to remove. - `tolerance`: how loose the colour match is (default 0.1, range 0–1). Larger values let you match a less-uniform background at the risk of eating into your subject. Output is PNG with the key colour replaced by transparency.

Inputs

NameTypeDefaultDescription
image*fileInput image bytes.
keyColorstring"green"`green`, `blue`, or a custom hex like `#00b140`.
tolerancenumber (1…90)25Hue tolerance in degrees.
softnessnumber (0…30)10Soft-edge band width in degrees.

Response

Modes: binary, json. Cache: yes (24h TTL).