models

glm-image

Markdown · JSON

glm-image

GLM-Image turns a written visual brief into images. Use the exact glm-image selector for illustrations, scene concepts and product compositions, choosing from its documented square, landscape and portrait sizes. This profile accepts text and returns image results in a synchronous response.

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

GLM-Image is Zhipu’s text-to-image model exposed with the exact selector glm-image. Use POST /v1/images/generations with model and prompt. Describe the subject, its surroundings, the visual treatment and the composition you want to produce. The supported input for this profile is a written image description, so the prompt needs to communicate the important appearance and arrangement directly.

For a product composition, describe the object, camera viewpoint, background, lighting and placement of supporting elements. For an illustration, name the main action, colour palette and drawing treatment. A useful brief might request a ceramic cup on a pale tabletop, a side view, soft window light and a clear area above the subject for a separate headline. Describe the intended space and hierarchy rather than relying on a general instruction such as “make an advertisement”.

The default size is 1280x1280. The documented size values for this exact model are 1280x1280, 1568x1056, 1056x1568, 1472x1088, 1088x1472, 1728x960 and 960x1728. Choose a landscape or portrait size to match the destination before submitting the brief. Keep those exact strings in the size field; they specify pixels rather than a named display resolution.

GLM-Image supports quality=hd, which is its default quality setting. The watermark_enabled boolean defaults to true and controls the documented watermark setting. If you supply user_id, the documented length is 6–128 characters. These controls describe different parts of the request: size defines the frame, quality selects the supported rendering setting, and watermark_enabled selects the watermark behaviour.

Generation is synchronous: the completed response contains created and a data array with image URLs. Keep every returned data item and retrieve each image you intend to use. Review the actual composition, subject details and any rendered lettering against the brief, then retain the chosen image with its prompt and settings. A completed image response supplies the result directly; this profile does not introduce a separate generation job to poll.

Ailoot Ultra · Images POST /v1/images/generations glm-image

glm-image

ZHIPU /glm-image

Overview

GLM-Image turns a written visual brief into images. Use the exact glm-image selector for illustrations, scene concepts and product compositions, choosing from its documented square, landscape and portrait sizes. This profile accepts text and returns image results in a synchronous response.

Accepted inputs
Text
Results
Images

Available in Ailoot · inputs & methods

Ailoot Ultra · Images POST /v1/images/generations
Input types
text
Output types
image
Output format
Image file
FieldTypeRequirementValues & limitsDefault
FieldmodelTypestringRequirementRequiredValues & limits
glm-image
Default—
FieldpromptTypestringRequirementRequiredValues & limitsDefault—
FieldsizeTypestringRequirementOptionalValues & limits
1280x1280, 1568x1056, 1056x1568, 1472x1088, 1088x1472, 1728x960, 960x1728
Default1280x1280
Fielduser_idTypestringRequirementOptionalValues & limitsDefault—
FieldqualityTypestringRequirementOptionalValues & limits
hd, standard
Default—
Fieldwatermark_enabledTypebooleanRequirementOptionalValues & limitsDefaulttrue
FieldstreamTypebooleanRequirementOptionalValues & limits
false
Default—
Method parameters and lifecycle
ParameterContract
Parametercontent_typeContractapplication/json
ParameterrequiredContractmodel, prompt
ParameteroptionalContractsize, user_id, quality, watermark_enabled, stream
Parametermaterial_typesContracttext
ParameterconditionsContractUse stream:false or omit stream. The complete buffered JSON result contains all generated images.

Lifecycle: synchronous_result_then_owned_library

GET /v1/media/assets

GET /v1/media/assets/{asset_id}

Pricing

How the final charge is calculated

The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode
Not specified When fast mode is selected
Flex mode
Not specified When flex mode is selected
Maximum reasoning effort
Not specified When maximum reasoning effort uses the default adjustment

Estimated rates for comparison

Prices by configuration

Match each charge to the conditions shown. Use one rate for each set of alternative configurations.

ConfigurationRate scheduleForecast quantityCharge
ConfigurationBase token ratesRate scheduleBase rateForecast quantity—Charge
Input · Input tokens · Estimate for comparison only — / 1K tokens
Output · Output tokens · Estimate for comparison only — / 1K tokens
Input · Cache read · Estimate for comparison only — / 1K tokens
Input · Cache write · Estimate for comparison only — / 1K tokens
Input · Cache write, 1 hour · Estimate for comparison only — / 1K tokens
ConfigurationEstimated generation costRate schedule—Forecast quantityone generation estimateCharge
Input · Estimated generation cost · Estimate for comparison only $0.09 estimate before generation

This estimate is not an additional charge or a fixed rate for the completed generation.

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →

Example requests

Ailoot Ultra · Images

curl · create once and retain the complete result
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "glm-image", "prompt": "A calm studio product photograph with a plain background."}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
# Submit once. Retain the complete result, original identifiers and every response header.

Receive and save results

Ailoot Ultra · Images

Download each returned image or save its Base64 contents

  • GET /v1/media/assets
  • GET /v1/media/assets/{asset_id}
Keep all completed results

Save every completed image; retrieve each returned URL or decode its Base64 contents.

Retain every returned image and field. Use owned content_url values and actual asset_id records; refresh the same asset when a link expires.

If the original response needs checking

Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.

Aliases

Model aliases

Ailoot Ultra glm-image

Method path aliases

Use the method paths shown above.

Related caller IDs

glm-image

FAQ · glm-image
What inputs and results are available?

POST /v1/images/generations · glm-image: text → image

Which fields does the request use?

POST /v1/images/generations · glm-image: model, prompt, size, user_id, quality, watermark_enabled, stream

More details

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription
Choose a discounted plan for your regular requests.
Promo code: up to 50% off
Enter your code at checkout. The price updates to reflect the current promotion.
Spending in your history
The model, tokens and amount are recorded for each request.

Choose a subscription · View model prices

Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application
Add text, image, video and audio generation to paid features in your service.
Reseller licence
Send a description of your project and how you provide access. Request written terms for use and resale.
Documents on the website
The service offer, licence agreement and data processing policy are available before you connect.

Request a reseller licence · Service offer and licence agreement