Skip to main content
POST
/
v3
/
async
/
glm-image
GLM Image Generation
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/glm-image \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "size": "<string>",
  "prompt": "<string>",
  "quality": "<string>",
  "watermark_enabled": true
}
'
{
  "task_id": "<string>"
}
This is an asynchronous API and only returns the task_id of the asynchronous task.
This is an asynchronous API and will only return the task_id of the asynchronous task. You should use this task_id to call the Get Task Result API to retrieve the generated result.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

size
string
default:"1280x1280"
Image size. Recommended values: 1280x1280 (default), 1568x1056, 1056x1568, 1472x1088, 1088x1472, 1728x960, 960x1728. Custom sizes: width and height should be within the 1024–2048px range, the maximum total pixel count is 4194304, and both width and height must be integer multiples of 32.
prompt
string
required
Text description of the desired image. Describe the scene, subject, style, and details you want in the generated image.
quality
string
default:"hd"
Image quality. HD mode generates more refined and detail-rich images with higher overall consistency.Optional value: hd
watermark_enabled
boolean
Controls whether a watermark is added to AI-generated images. true: enable watermark (default, complies with policy requirements). false: disable watermark.

Response Information

task_id
string
required
Use the task_id to call the Get Task Result API to retrieve the generated output.