Add Text to Image API - caption, label or badge photos with outline & box
add_text_to_imageRender multi-line text onto any PNG, JPG or WebP image with configurable anchor position or exact (x%, y%), font style, size, colour, stroke outline, optional rounded background box and opacity. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.002/call via x402 at https://radarbg.com/x402/add-text-to-image.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"size": 12,
"text": "SAMPLE",
"color": "white",
"outline": "thin",
"fileName": "sample.png",
"position": "bc",
"fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC"
},
"name": "add_text_to_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left edge % of width (when position=xy) | |
| y | No | Top edge % of height (when position=xy) | |
| font | No | Font family: bold, regular, impact, serif or mono | bold |
| size | No | Font size as % of image width (1-40) | |
| text | Yes | Text to draw on the image (newlines supported, max 600 chars) | |
| align | No | Multi-line alignment: left, center or right | center |
| color | No | Text colour name or HEX | white |
| files | No | Or several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total) | |
| format | No | Output format: same, jpg, png or webp | same |
| opacity | No | Text opacity % (5-100) | |
| outline | No | Outline thickness: none, thin or thick | thin |
| boxColor | No | Background box colour name or HEX | black |
| fileName | No | File name with extension, e.g. report.pdf | |
| position | No | Anchor: tl, tc, tr, ml, c, mr, bl, bc, br or xy | bc |
| boxOpacity | No | Background box opacity % (0-100) | |
| fileContent | No | The file as base64 (a data: URI is fine; 20 MB total decoded limit per call) | |
| outlineColor | No | Outline colour name or HEX | black |
| backgroundBox | No | Draw rounded background box behind text |