# Add text to an image

Write text on an image at a position you choose, with size, colour, an outline or a background box. Multi-line.

- Endpoint: `POST https://setget.net/v1/tools/image-text-overlay` with JSON `{"input": {...}}` (add `"wait": 30` to hold the reply until the job finishes)
- MCP: `run_tool` with `slug` = `image-text-overlay`
- Page: https://setget.net/tools/image-text-overlay

## Files in, files out

This is a file tool. Its file inputs take file references, not file contents and not web addresses.

- Get a reference by uploading: `curl -T FILE https://setget.net/drop/` prints a line `ref  <id>/f1`. Or `POST https://setget.net/v1/drops` with `{"files":[{"name","size"}]}`, PUT the bytes to the returned `upload.url` with the listed headers, and use the file's `ref`. Over MCP use the `drop` tool. A file under about 700 KB can also be sent in place as a `data:<type>;base64,<content>` URI.
- Uploads are at most 100 MB per file, are readable by anyone with the link, and expire (one hour by default). Programs are refused.
- The tool runs as a job. The reply is `{"tool", "ms", "result", "files", "job"}`: `result` is JSON, and every result file comes back in `files` as `{"name", "size", "content_type", "kind", "url", "ref"}`. Download it from `url`, or pass `ref` as the input of another file tool.
- A job still running when the wait ends answers 202 with `job`. Follow it with `GET https://setget.net/v1/jobs/<id>?wait=30`, or stream progress from `GET https://setget.net/v1/jobs/<id>/events` (over MCP: the `job` tool). A person can watch it at `job.url`.

## Inputs

- `image` (required, file, a file reference such as `DROP_ID/f1`, accepts image): The image to write on.
- `text` (required, string): The text to draw. Use line breaks (or \n) for several lines. Latin, Greek or Cyrillic letters, digits and punctuation.
- `x` (optional, integer, range 0..): Left edge of the text, in pixels from the left of the image. Leave empty to use position.
- `y` (optional, integer, range 0..): Top edge of the text, in pixels from the top of the image. Leave empty to use position.
- `position` (optional, string, one of `top-left`, `top`, `top-right`, `left`, `center`, `right`, `bottom-left`, `bottom`, `bottom-right`, default `"center"`): Where to put the text when x or y is not given.
- `size` (optional, integer, default `32`, range 6..1000): Height of the text in pixels.
- `color` (optional, string, default `"#ffffff"`): Colour of the text. Add two more hex digits for see-through text, such as #ffffff80. A hex colour such as #ff8800, or a name such as white or black.
- `outline` (optional, string): Colour of a thin outline around the letters, which keeps text readable on busy pictures. Leave empty for none.
- `box` (optional, string): Colour of a filled box behind the text, for example #00000080 for half-transparent black. Leave empty for none.

## Example 1: Centred text

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.jpg](https://setget.net/static/samples/sample.jpg).

```json
{"input":{"image":"DROP_ID/f1","text":"Hello world"},"wait":30}
```

## Example 2: Two outlined lines at the bottom

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.jpg](https://setget.net/static/samples/sample.jpg).

```json
{"input":{"image":"DROP_ID/f1","text":"Top line\nSecond line","position":"bottom","size":28,"outline":"#000000"},"wait":30}
```

## Example 3: On a dark box at a fixed spot

Upload first. Each placeholder below stands for the reference of one upload: `DROP_ID/f1` = [sample.png](https://setget.net/static/samples/sample.png).

```json
{"input":{"image":"DROP_ID/f1","text":"SALE","x":20,"y":20,"size":48,"color":"#ffffff","box":"#000000cc"},"wait":30}
```

**How do I keep text readable on any picture?** Add an outline in a contrasting colour (white text with a black outline works on almost anything), or put a half-transparent box behind it.

**Which characters can I use?** Latin letters including accents, Greek, Cyrillic, digits and punctuation. Chinese, Japanese, Korean, Arabic and emoji are not supported yet; the tool tells you which characters it cannot draw.

**Can I choose the font?** Not yet. One clean sans-serif font is built in.

**What if the text does not fit?** It is drawn at the size you asked for and cut off at the edge of the image. The result says when that happened, with the space the text needed.
