z_ai_image_gen_mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZAI_API_KEY | Yes | Your Z.AI API key. Get it from https://z.ai/manage-apikey/apikey-list | |
| ZAI_MAX_RETRIES | No | Max retry attempts | 3 |
| ZAI_RETRY_DELAY | No | Initial retry delay in ms | 1000 |
| ZAI_API_BASE_URL | No | API base URL | https://api.z.ai/api |
| ZAI_DEFAULT_SIZE | No | Default image size | 1280x1280 |
| ZAI_DEFAULT_MODEL | No | Default model | glm-image |
| ZAI_REQUEST_TIMEOUT | No | Request timeout in ms | 60000 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_modelsA | List available Z.AI image generation models and their capabilities |
| generate_imageA | Generate an image synchronously from a text prompt. Returns the image URL directly. Use this for most image generation tasks. |
| generate_image_asyncA | Start an asynchronous image generation task. Returns a task ID to poll for results. Use this for long-running generations or when you need to process multiple images. |
| get_async_resultA | Retrieve the result of an asynchronous image generation task. Use the task ID from generate_image_async. |
| download_imageA | Download an image from a URL and return it as base64 or save to a file. Use this after generating an image to get the actual image data. Note: Z.AI image URLs expire after 30 days. |
| generate_and_download_imageA | Generate an image and automatically download it. This combines generate_image and download_image into a single operation. Returns the image as base64 or saves to a file. Best for when you want the image data immediately. |
| list_video_modelsA | List available Z.AI video generation models and their capabilities |
| generate_videoA | Generate a video asynchronously from text or images. Returns a task ID to poll for results. Supports multiple models: CogVideoX-3 (text/image/start-end frame), Vidu Q1 (1080P), Vidu 2 (720P, faster). |
| get_video_resultA | Retrieve the result of an asynchronous video generation task. Use the task ID from generate_video. |
| generate_and_download_videoA | Generate a video and automatically download it. Polls for completion and returns the video file. Best for when you want the video data immediately. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/GeorgH93/z_ai_image_gen_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server