# Text over Image

## /text-over-image

### Query Parameters

* `background`: (string) URL of the background image.
* `text`: (string) Text to overlay on the background image.
* `color`: (string) Color of the text in hexadecimal format (e.g., "#ffffff").
* `fontStyle`: (string, optional) Style of the main text font (e.g., "Arial", "Times New Roman").
* `fontSize`: (string, optional) Size of the main text font in pixels (e.g., "30px").
* `alignment`: (string) Alignment of the main text and subtitle. Possible values are:
  * "center"
  * "topleft"
  * "topcenter"
  * "topright"
  * "bottomleft"
  * "bottomcenter"
  * "bottomright"
* `subtitle`: (string, optional) Subtitle text to overlay on the background image.
* `subtitleColor`: (string, optional) Color of the subtitle text in hexadecimal format.
* `subtitleFontStyle`: (string, optional) Style of the subtitle font.
* `subtitleFontSize`: (string, optional) Size of the subtitle font in pixels.

```javascript
Arial
Helvetica
Georgia
Times New Roman
Verdana
Comic Sans MS
Tahoma
Palatino
Courier New
```

### Response

```json
{
    "imageUrl": "https://imgur.com/your_generated_image_url"
}
```

### Example

```
GET /generate-image?background=<background_url>&text=Hello&color=black&fontStyle=Arial&fontSize=40&alignment=center&subtitle=World&subtitleColor=red&subtitleFontStyle=Arial&subtitleFontSize=30
```

#### Notes

* If any error occurs during image generation or upload, a 500 error response will be returned with an error message.

***


---

# 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://docs.ziomark.xyz/get-endpoints/text-over-image.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.
