---
title: "Generate Image (Async)"
method: POST
path: "/paas/v4/async/images/generations"
---

# Generate Image (Async)

`POST /paas/v4/async/images/generations`

Use the [GLM-Image](/guides/image/glm-image) series models to generate high-quality images from text prompts. Through quick and accurate understanding of user text descriptions, `AI` image expression becomes more precise and personalized. Only supports `GLM-Image` model.

## Request body

- AsyncCreateImageRequest
  - `model` 'glm-image', required — Model code
  - `prompt` string, required — The text description of the image to be generated.
  - `quality` 'hd' — The quality of the generated image. `hd`: Generates a more detailed and rich image with higher overall consistency, takes about `20` seconds.
  - `size` string — Image size, recommended enum values: `1280x1280` (default), `1568x1056`, `1056x1568`, `1472x1088`, `1088x1472`, `1728x960`, `960x1728`. Custom parameter: Both width and height must be between `1024px-2048px`, and must be divisible by `32`, and the maximum pixel count must not exceed `2^22px`.
  - `user_id` string — Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters.

## Response `200`

Processing successful

- AsyncResponse
  - `model` string — Model name used in this call.
  - `id` string — Task order number generated by the platform, use this order number when calling the async result interface.
  - `request_id` string — Task number submitted by the user during the client request or generated by the platform.
  - `task_status` string — Processing status, `PROCESSING (processing)`, `SUCCESS (success)`, `FAIL (failure)`. Results need to be obtained via query.

## Other responses

- `default` — The request has failed.

---

[API](https://skmtc.net/z/apis/z-ai-api.md) · [All operations](https://skmtc.net/z/apis/z-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/z/z-ai-api/revisions/242a797fa80b/schema)
