SandBase is live — $1 in free credits on signupStart free ›
Use in agentzhipu models

zhipu modelsimage generation api

zhipu/glm-image

Glm Image is zhipu's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.

Input
Text prompt for image generation.
The aspect ratio of the generated image. Allowed values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16.
110
Classifier-free guidance scale. Higher values make the model follow the prompt more closely. Range: 1 to 10.
10100
Number of diffusion denoising steps. More steps generally produce higher quality images. Range: 10 to 100.
Output image format. Allowed values: jpeg, png.
Random seed for reproducibility. The same seed with the same prompt will produce the same image.
Idle

Example output — click Run to generate your own

API README

GLM-Image Text-to-Image

GLM-Image is Zhipu AI's text-to-image model built as a hybrid of a 9B autoregressive model and a 7B diffusion decoder. The autoregressive stage interprets language and plans the visual content; the diffusion stage resolves that plan into a detailed image.

This architecture is especially useful for prompts that depend on accurate written text, structured knowledge, or relationships among several visual elements. The endpoint exposes practical controls for canvas ratio, guidance, inference steps, output format, and reproducible seeds.

Highlights

Hybrid 9B + 7B architecture. A 9B autoregressive component handles semantic planning before a 7B diffusion component renders the image, connecting language understanding with high-fidelity visual synthesis.

Accurate text in images. Designed to render legible written content more reliably, making it a strong fit for posters, diagrams, covers, signage, and layouts where words are part of the composition.

Knowledge-intensive visuals. Handles prompts that require recognizable concepts and organized information, helping with educational graphics, explanatory illustrations, and dense multi-element scenes.

Fine-grained detail fidelity. Maintains strong high-fidelity, fine-detail generation alongside its text and knowledge strengths, resolving textures and small visual elements in demanding compositions.

Pricing

Billing unitPrice
Per request$0.05

When to Use

✅ Good fit❌ Consider alternatives
The model's named workflow matches the source material and intended outputA different input modality or model route is required
A managed asynchronous result is suitable for the production pipelineA synchronous, interactive editor is essential
The documented controls cover the required duration, framing, or formatThe project needs controls outside this endpoint's schema
Creative iteration benefits from a repeatable request structureExact deterministic pixels, frames, geometry, or samples are mandatory
A finished downloadable media asset is the desired deliverableEditable source layers or a native project file are required

Prompt Guide

For generation, state the intended result first, then add the subject or source treatment, progression, style, and delivery constraints. Keep one creative variable per phrase, use the documented field names for controls, and change one setting at a time when comparing results.

{
  "aspect_ratio": "21:9",
  "output_format": "jpeg",
  "prompt": "An elegant close-up photograph of hands holding a beautifully illustrated watercolor menu card. The hands have natural sun-kissed skin with a delicate gold ring, gripping the menu gently and refined.\n\nThe menu is a work of art—hand-painted watercolor illustration on textured cream watercolor paper with soft deckled edges:\n\n- Top: \"AZURE\" painted in flowing navy blue watercolor calligraphy with organic brushstroke texture and slight color bleeding\n- Watercolor illustration border: delicate tropical elements painted in soft washes—translucent turquoise waves flowing along the edges, loose coral and pink hibiscus flowers in the corners, gentle green palm leaf strokes, and small golden paint splatters suggesting sunlight\n- Center menu items in elegant hand-lettered watercolor script with slight variations in ink density:\n\n  \"Tuna Tartare — 24\"\n  \"Sea Bass — 32\"\n  \"Mango Pavlova — 14\"\n\n- Bottom: \"Koh Samui\" in small watercolor lettering with a tiny painted wave\n\nThe watercolor has beautiful organic qualities—soft color gradients, natural paper texture visible through transparent washes, slight bleeding at edges of brushstrokes, layered translucent blues and greens creating depth. The paint has a luminous, fresh quality with white paper showing through in places.\n\nBackground: dreamy out-of-focus turquoise ocean with sparkling bokeh lights reflecting off water, creating soft circular light spots in aqua and gold tones. The blurred background complements the watercolor aesthetic perfectly.\n\nLighting: warm natural golden hour sunlight from upper left, illuminating the watercolor pigments and making them glow. The light catches the textured watercolor paper beautifully, showing subtle shadows in the paint layers and paper grain.\n\nPhotography style: shot on 85mm f/1.4, shallow depth of field with only the menu in sharp focus. High-end editorial aesthetic that celebrates the handmade, artistic quality of the watercolor. Color palette: cream paper, translucent turquoise and teal watercolors, soft coral pink, navy blue, gentle greens, golden accents, warm skin tones.\n\nThe overall mood is artistic, luxurious, handcrafted—like a boutique resort that values artistry and craftsmanship. The watercolor style feels fresh, organic, and elevated."
}

Technical Specs

SpecValue
Model IDzhipu/glm-image
Inputsaspect_ratio, guidance_scale, num_inference_steps, output_format, prompt, seed
Required inputsprompt
Output fieldscontent_type, url
ExecutionAsync (submit, then poll for result)
Aspect Ratio21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16
Output Formatjpeg / png

Related Models

Related Models