# 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="https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FL3rodSZHQVuUmhKVxTKu%2Fimage.png?alt=media&#x26;token=f32fa7b3-acbd-4e2d-8e90-2420b589b9a8" alt=""><figcaption><p>Caption result</p></figcaption></figure>
