Text to Image SDXL API

Stable Diffusion XL powered scalable API

Access scalable, affordable and highly available REST API for on-demand text to image generation using Stable Diffusion XL AI Model.

Using this API you can generate high fidelity, photo-realistic images using simple text prompts as inputs.

Text to Image Generation SDXL Monster API can be accessed via this workflow:

  1. Send request API: Use this API to send a request for image generation

  2. Fetch status API: Use this API to fetch status of your image generation request

# Example CURL Request for sending an image generation request

    curl 
    -H 'x-api-key: YOUR KEY'
    -H 'Content-Type: application/json'
    -X POST 'https://api.monsterapi.ai/prod/apis/add-task'
    --data-raw {
    "model": "sdxl-base",
    "data": {
              "prompt": "@sample prompt",
              "negprompt": "@sample negprompt"
      }
# Example CURL Request for getting status of your request

curl --location 'https://api.monsterapi.ai/apis/task-status' \
--header 'x-api-key: 123' \
--header 'Authorization: Bearer 456' \
--data '{
    "process_id" :  "093212f3-3209-11ee-9434-af0e00a0e85c"
}'

These 2 API calls are enough to generate an image and to get its image URL.

Monster API offers a lot of parameters to customise your requests according to your use-case for example:

🔥 Generate upto 4 images in a single request.

🔥 Square, landscape and portrait aspect ratios supported.

🔥 Specify a seed to control the generation.

For an overview, visit our Text to Image Generation API documentation.

Last updated