> For the complete documentation index, see [llms.txt](https://documentation.deep-image.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.deep-image.ai/image-processing/captions.md).

# Captions

With "caption" parameter any image can be added as a caption to result image.

```json
{
    "url": "https://deep-image.ai/api-example.png",
    "width": 600,
    "output_format": "jpg",
    "caption": {
        "url": "http://ain.teonite.net/neuroapi-store/2023-02-07/d9a91e2e-9843-4d85-ae1a-e7baefc87746.png",
        "position": "RB",
        "target_width_percentage": 25,
        "padding": 20,
        "opacity": 85
    }
}
```

Caption can has several options:

<table><thead><tr><th width="287">Parameter name</th><th>Description</th></tr></thead><tbody><tr><td>url</td><td>(<strong>required</strong>) - url to the caption image</td></tr><tr><td>position</td><td>(<strong>RB by default</strong>) - position of the caption expressed as two letters - LT, MT, RT, ML, MM, MR, BL, BM, BR (L - left, M - middle, R - right, B - bottom, T - top)</td></tr><tr><td>target_width_percentage</td><td>(<strong>25 by default</strong>) - size of the captioning expressed as percentage of width of destination image</td></tr><tr><td>padding</td><td>(<strong>5% of width by default</strong>) - space in pixels between image borders and the captioning</td></tr><tr><td>opacity</td><td>(<strong>100 by default</strong>) - opacity of the captioning from 0 to 100</td></tr></tbody></table>

The result of example image with added "Deep image" caption"

<figure><img src="/files/wUe8y5hSJ4eLCgTNASxh" alt=""><figcaption><p>Caption result</p></figcaption></figure>
