Pricing
Compare models →| Item | Cost |
|---|---|
| Per image | $0.12 |
Simple flat-rate pricing regardless of image size or output format.
Input schema
| Parameter | Type | Description |
|---|---|---|
promptRequired | string | The positive prompt for the generation. |
size | string | The size of the generated media in pixels (width*height).Default: "1024*1024"Minimum: 256 · Maximum: 2048 |
seed | integer | The random seed to use for the generation. -1 means a random seed will be used. |
output_format | string | The format of the output image.jpegpngwebp"jpeg" |
README
Z.AI GLM-Image Text-to-Image
GLM-Image is Z.AI's powerful text-to-image generation model built on the GLM architecture. It transforms natural language prompts into high-quality images with strong prompt adherence, flexible sizing, and fast generation speed.
Why Choose This?
- Strong prompt understanding
Accurately interprets detailed prompts to generate images that match your description with high fidelity.
- Flexible sizing
Custom width and height controls allow you to create images for any use case — social media, print, web, or mobile.
- Prompt Enhancer
Built-in tool to automatically improve your prompts for better generation results.
- Multiple output formats
Export as JPEG for smaller file sizes or PNG for lossless quality.
- Fast generation
Optimized for quick turnaround, ideal for rapid ideation and creative iteration.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Text description of the image you want to generate |
| width | No | Output width in pixels (default: 1024) |
| height | No | Output height in pixels (default: 1024) |
| seed | No | Random seed for reproducibility (-1 for random) |
| output_format | No | Output format: jpeg (default) or png |
| enable_prompt_expansion | No | Enhance prompt using LLM for better results |
Output Format Options
- jpeg — Smaller file size, good for photos and web use (default)
- png — Lossless quality, supports transparency, best for graphics
Prompt Expansion
When enabled, the model uses an LLM to automatically expand and enhance your prompt for better generation results. This is useful when you have a short or simple prompt and want the model to add more detail.
How to Use
- Write your prompt — describe the image including subject, style, lighting, and mood.
- Set size — adjust width and height for your desired dimensions.
- Set seed — use -1 for random results, or specify a number for reproducibility.
- Choose output format — jpeg for smaller files, png for lossless quality.
- Enable prompt expansion (optional) — check this to let LLM enhance your prompt automatically.
- Run — click Run, preview the result, and iterate if needed.
Pricing
| Item | Cost |
|---|---|
| Per image | $0.12 |
Simple flat-rate pricing regardless of image size or output format.
Best Use Cases
- Social Media Content — Create engaging visuals for posts, stories, and ads.
- Marketing Materials — Generate promotional images and banner graphics.
- Concept Art — Quickly visualize ideas for creative projects.
- Product Visualization — Create mockups and product imagery.
- Presentations — Generate visuals to enhance slides and documents.
Pro Tips
- Be specific in your prompts — include subject, style, lighting, colors, and atmosphere.
- Use the same seed with the same prompt to reproduce identical outputs.
- Start with 1024x1024 for balanced quality, adjust dimensions for specific needs.
- Use JPEG for photos and web content, PNG for graphics with text or transparency needs.
- Enable prompt expansion for short prompts; disable it if you want precise control over the output.
Notes
- Please ensure your prompts comply with content guidelines.
- If an error occurs, review your prompt and try again.
Related Models
- Z.AI CogView-4 — Z.AI's high-quality text-to-image model with flexible quality modes.
- Qwen Image 2512 — model with exceptional text rendering capabilities.
- FLUX.2 Pro — Flagship-quality generation with cinematic detail.
Catalog rates and input examples are published for reference. Contact OpenSI about access and applicable pricing.
GLM Image Text to Image API example
The catalog lists POST https://api.opensi.com.ai/api/v3/z-ai/glm-image/text-to-image for the submission step. Confirm the endpoint and access with your supplier before sending a request.
HTTP request body
{
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"size": "1024*1024",
"seed": 0,
"output_format": "jpeg"
}GLM Image Text to Image API — Frequently asked questions
What is the Glm Image Text To Image API?
Glm Image Text To Image is a Z Ai model for image generation, exposed as a REST API on OpenSIAI. Z-AI GLM Image generates high-quality images from text prompts, with enhanced understanding of user descriptions, resulting in images that are more precise and personal. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing. You can call it programmatically or try it from the playground above.
How do I call the Glm Image Text To Image API?
POST your input parameters to the model's REST endpoint (shown in the API tab of this playground) with your OpenSIAI API key in the Authorization header. Submission returns a prediction ID. Poll the result endpoint starting around every 2 seconds, increase the interval for long-running tasks, and stop on any terminal status. The playground generates Python, JavaScript, and cURL examples for submitting requests and polling results. Full request/response shape is documented at /docs/docs-api/z-ai/glm-image/text-to-image.
How much does Glm Image Text To Image cost per run or per second?
Glm Image Text To Image starts at $0.12 per run or per second. That figure is the base price — the final charge scales with the parameters you set in the form (output size, length, count, references, or whatever knobs this model exposes), so a higher-quality or larger output costs more than a minimal one. The exact cost for your current input is shown live next to the Generate button before you submit, and the actual per-call charge is recorded on the prediction afterwards.
What inputs does Glm Image Text To Image accept?
Key inputs: prompt, size, seed, output_format. The full JSON schema (types, defaults, allowed values) is rendered above the Generate button and mirrored in the API reference at /docs/docs-api/z-ai/glm-image/text-to-image.
How long does Glm Image Text To Image take to generate?
Reported generation time on OpenSIAI is around 59 seconds per request. This is an estimate, not a latency guarantee; queue time and input settings can change the total wait. live status is visible in the prediction record.
Can I use Glm Image Text To Image outputs commercially?
Commercial usage rights depend on the model's license, set by its provider (Z Ai). Check the provider's applicable terms and OpenSIAI's Terms of Service before commercial use.
