xtract.bot
POST /api/image-overlay

Overlay one image on top of another at a chosen position. Supports alpha transparency, configurable blend mode and opacity.

Composites a foreground image on top of a background image at the specified position. Inputs: - `background` / `foreground`: the two images. - `x` / `y` (default 0): pixel offset of the foreground's top-left. - `opacity` (default 1.0): foreground opacity multiplier. - `blend`: composition mode. `over` (default), `multiply`, `screen`, `overlay`, etc. Useful for adding logos, watermarks, or composing shots in design pipelines.

Inputs

NameTypeDefaultDescription
image*fileBackground image bytes.
foreground*fileForeground image bytes.
gravityenum (north | south | east | west | northeast | northwest | southeast | southwest | center)"center"Anchor for the foreground.
opacitynumber (0…100)100Foreground opacity (percent).
scalenumber (0…100)0Foreground scale relative to background's smaller side (0 = native).
offsetXnumber (-8192…8192)0Horizontal offset in pixels.
offsetYnumber (-8192…8192)0Vertical offset in pixels.
formatenum (png | jpeg | webp)Output format. Defaults to the background's format.

Response

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