POST
/
api
/
ai
/
images
/
generate
/
v3
curl --request POST \
  --url https://api.worqhat.com/api/ai/images/generate/v3 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": [
    "A cat floating on the clouds"
  ],
  "image_style": "Anime",
  "orientation": "square",
  "output_type": "url"
}'
{
  "image": "https://storage.googleapis.com/example-image-url",
  "processing_time": 15938,
  "processing_id": "1e01b632-2d8f-4f71-8a27-36e219d67be5"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prompt
string[]
required

Prompt is used for generating images.

image_style
string
required

The style of the image to be generated.

Example:

"Anime"

orientation
enum<string>

The orientation of the image.

Available options:
square,
portrait,
landscape
output_type
enum<string>

The format of the generated image. 'url' returns a direct image link, and 'Base64' returns an encoded string.

Available options:
url,
Base64

Response

200
application/json
Image generated successfully
image
string
required

The generated image URL.

processing_time
integer
required

The time taken to process the request (in milliseconds).

processing_id
string
required

Unique request identifier for tracking.