generate_image
Generate an image from a text prompt and get the image URL directly.
Instructions
Generate an image synchronously from a text prompt. Returns the image URL directly. Use this for most image generation tasks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Image size (e.g., "1280x1280", "1568x1056") | 1280x1280 |
| model | No | Model to use for generation | glm-image |
| prompt | Yes | Text description of the image to generate | |
| quality | No | Quality level: "hd" (more detailed, ~20s) or "standard" (faster, ~5-10s) | |
| user_id | No | Unique end user ID for abuse prevention (6-128 characters) |