Note: The information on this page applies to customers on our deprecated v2 APIs for image generation. Customers on our v3 APIs should refer to the updated v3 docs for image generation.

Our image generation models create images based on text prompts. A maximum of six images can be generated per prompt. When a user makes an API request with this model, the response consists of links to each generated image and information about its dimensions.

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
               }
            ]
         }