▫️Text over Image

This endpoint allows you to generate an image with customizable text and subtitle on a specified background. The generated image is then uploaded to Imgur, and the URL is returned.

/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.

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

Response

{
    "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.


Last updated