# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.deep-image.ai/image-processing/captions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
