GLM Image Generation
Image
GLM Image Generation
POST
GLM Image Generation
This is an async API that only returns the
task_id of the async task.
Request Headers
string
required
Enum:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
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.
string
required
Text description of the desired image. Describe the scene, subject, style, and details you want in the generated image.
string
default:"hd"
Image quality. HD mode generates finer, more detailed images with higher overall consistency.Possible values:
hdboolean
default:true
Controls whether a watermark is added to AI-generated images. true: enable watermark (default, compliant with policy requirements). false: disable watermark.
Response
string
required
Use the task_id to call the Get Async Task Result API to retrieve the generated output.