xtract.bot
POST /api/image-add-text

Stamp text onto an image: configurable font, size, anchor position, and colour. Useful for captions, watermarks, and dynamic OG images.

Renders text onto an image and returns the result. Inputs: - `text`: the string to draw. - `position`: anchor (`top-left`, `top-right`, `center`, `bottom-left`, `bottom-right`) or pixel coordinates. - `fontSize`, `color`, `font` (a default sans-serif is bundled). - `padding` (px from the edge for anchor positions). For dynamic OG / share-card images, use `og-image-generate` instead — it gives you a fully composed template.

Inputs

NameTypeDefaultDescription
image*fileInput PNG.
texts*stringJSON array of text layers — each `{text, x, y, fontSize?, color?, anchor?, strokeColor?, strokeWidth?, rotate?, weight?}`. Up to 16 layers.

Response

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