Our Image Generation API creates images based on text prompts. The number of images generated per prompt can be up to six and is specified as a parameter in the API call. The output of this API consists of links to each generated image, along with information about its height and width. Each image is 1024x1024.

Before returning any set of images, we first run those images through our visual moderation model in order to prevent violent, sexually explicit, or otherwise harmful results. Images will not be returned if they are flagged for any of the following moderation categories: NSFW, nudity, and blood. If any of the generated images for a given prompt are flagged during this moderation process, the API call will fail and an error message will be returned in place of a normal response.

An example JSON response is shown below.

"response":{
              "output":[
               {
                  "watermarked_images":[
                     
                  ],
                  "images":[
                     {
                        "index":0,
                        "width":1024,
                        "height":1024,
                        "path":"image_generation/123456789/image0_1024_1024.png",
                        "message":"200",
                        "url":"https://hive-data-prod-cdn.thehive.ai/image_generation1234"
                     },
                     {
                        "index":1,
                        "width":1024,
                        "height":1024,
                        "path":"image_generation/123456789/image1_1024_1024.png",
                        "message":"200",
                        "url":"https://hive-data-prod-cdn.thehive.ai/image_generation1234"                     
                     },
                     {
                        "index":2,
                        "width":1024,
                        "height":1024,
                        "path":"image_generation/123456789/image2_1024_1024.png",
                        "message":"200",
                        "url":"https://hive-data-prod-cdn.thehive.ai/image_generation1234"
                     }
                  ],
                  "s3_bucket":null,
                  "s3_domain":null
               }
            ]
         }