Skip to main content
POST
/
deployments
/
{deploymentId}
/
images
/
generations
Generates a batch of images from a text caption on a given DALLE model deployment
curl --request POST \
  --url https://api.hicap.ai/v1/deployments/{deploymentId}/images/generations \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "prompt": "a corgi in a field",
  "n": 1,
  "size": "1024x1024",
  "response_format": "url",
  "user": "user123456",
  "quality": "standard",
  "style": "vivid"
}
'
{
  "created": "1676540381",
  "data": [
    {
      "url": "https://www.contoso.com",
      "b64_json": "<string>",
      "content_filter_results": {
        "sexual": {
          "filtered": true,
          "severity": "safe"
        },
        "violence": {
          "filtered": true,
          "severity": "safe"
        },
        "hate": {
          "filtered": true,
          "severity": "safe"
        },
        "self_harm": {
          "filtered": true,
          "severity": "safe"
        }
      },
      "revised_prompt": "<string>",
      "prompt_filter_results": {
        "sexual": {
          "filtered": true,
          "severity": "safe"
        },
        "violence": {
          "filtered": true,
          "severity": "safe"
        },
        "hate": {
          "filtered": true,
          "severity": "safe"
        },
        "self_harm": {
          "filtered": true,
          "severity": "safe"
        },
        "profanity": {
          "filtered": true,
          "detected": true
        },
        "jailbreak": {
          "filtered": true,
          "detected": true
        },
        "custom_blocklists": {
          "filtered": true,
          "details": [
            {
              "filtered": true,
              "id": "<string>"
            }
          ]
        }
      }
    }
  ]
}

Authorizations

api-key
string
header
required

Your Hicap API key.

Path Parameters

deploymentId
string
required

Deployment id of the dalle model which was deployed.

Example:

"dalle-deployment"

Query Parameters

api-version
string
required

api version

Example:

"2025-01-01-preview"

Body

application/json
prompt
string<string>
required

A text description of the desired image(s). The maximum length is 4000 characters.

Minimum string length: 1
Example:

"a corgi in a field"

n
integer
default:1

The number of images to generate.

Required range: 1 <= x <= 1
size
enum<string>
default:1024x1024

The size of the generated images.

Available options:
256x256,
512x512,
1792x1024,
1024x1792,
1024x1024
response_format
enum<string>
default:url

The format in which the generated images are returned.

Available options:
url,
b64_json
user
string<string>

A unique identifier representing your end-user, which can help to monitor and detect abuse.

Example:

"user123456"

quality
enum<string>
default:standard

The quality of the image that will be generated.

Available options:
standard,
hd
style
enum<string>
default:vivid

The style of the generated images.

Available options:
vivid,
natural

Response

Ok

created
integer<unixtime>
required

The unix timestamp when the operation was created.

Example:

"1676540381"

data
object[]
required

The result data of the operation, if successful