Skip to main content
POST
/
v3
/
async
/
glm-image
GLM Image Generation
curl --request POST \
  --url https://api.myrouter.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 async API that only returns the task_id of the async task.
This is an async API that only returns the task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.

Request Headers

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

Request Body

size
string
default:"1280x1280"
Image dimensions. Recommended values: 1280x1280 (default), 1568x1056, 1056x1568, 1472x1088, 1088x1472, 1728x960, 960x1728. Custom dimensions: width and height should be in the range of 1024-2048px, maximum total pixels 4194304, and both width and height must be 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 finer, more detailed images with higher overall consistency.Possible values: hd
watermark_enabled
boolean
default:true
Controls whether a watermark is added to AI-generated images. true: enable watermark (default, compliant with policy requirements). false: disable watermark.

Response

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