Home Blog

How to Use the GLM 5.3 Flash API

How to Use the GLM 5.3 Flash API

Aug 26, 2026

EmpirioLabs AI

GLM 5.3 Flash is the first natively multimodal model in Z.ai's GLM-5 family, released on August 26, 2026 under the MIT license after an earlier preview as Ox Alpha. It is a 320B-A18B mixture-of-experts trained on a multimodal corpus, and Z.ai reports it outperforming GLM 5.2 across coding and agentic benchmarks at a fraction of the price, with results approaching much larger frontier coding models.

GLM 5.3 Flash is live on EmpirioLabs today through an OpenAI-compatible API, with text, image, video, and file input, a 1M token context, up to 128K output tokens, function calling, JSON mode structured output, built-in web search, and streaming. Try it in the playground or call it from any OpenAI-compatible client. The full spec and current rates live on the GLM 5.3 Flash model page and the API docs.

Pricing

Billing is usage based: input and output tokens are metered per token, and each built-in web search adds a small per-call fee that applies only when a search actually runs. There is no separate cache tier. Current per-token rates always live on the model page and the pricing page, which stay in sync with what you are charged.

Quickstart

Point any OpenAI SDK at the EmpirioLabs base URL and pass glm-5-3-flash as the model:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.empiriolabs.ai/v1",
    api_key="YOUR_EMPIRIOLABS_API_KEY",
)

resp = client.chat.completions.create(
    model="glm-5-3-flash",
    messages=[
        {"role": "user", "content": [
            {"type": "text", "text": "What is failing in this build log screenshot?"},
            {"type": "image_url", "image_url": {"url": "https://example.com/build-log.png"}},
        ]},
    ],
    reasoning_effort="low",
)

print(resp.choices[0].message.content)

The same model id works on /v1/responses, the Anthropic-shaped /v1/messages, and the Google-compatible /v1beta/models/glm-5-3-flash:generateContent route. Alternate ids glm-5.3-flash, zai/glm-5.3-flash, and zhipu/glm-5.3-flash resolve to the same model.

Multimodal input

Images, videos, and files ride in the standard content-parts array: image_url for images, video_url for video, and file_url for documents. Pass a public https URL (recommended) or a base64 data URL. Z.ai positions the model for agentic vision work: it can read interfaces, rendered output, and interaction feedback, which closes the loop between code, browsers, and GUIs.

Reasoning effort

GLM 5.3 Flash exposes a native reasoning_effort control with three levels: low for lightweight reasoning, high for enhanced reasoning, and max for deep reasoning. The default is max, which is what Z.ai recommends for complex coding and long-horizon agent work. Drop to low for short, latency-sensitive turns.

Web search and tools

Set tool_web_search to true to let the model search the web before answering, and narrow the results with search_recency_filter, search_domain_filter, and count. Function calling uses the standard OpenAI tools array, and tool_stream streams tool-call arguments as they are produced.

Things worth knowing before your first call

  • Reasoning cannot be turned off, so it is always part of your output bill. reasoning_effort accepts only low, high, and max. A request that asks for a different level, or for thinking to be disabled, is served at the nearest supported level rather than failing, so code written for other GLM models keeps working. Reasoning tokens bill as output tokens, and at max even a one-word answer can spend most of its output budget thinking, so send low explicitly for trivial calls.
  • Structured output is JSON mode, not schema enforcement. Use response_format with {"type": "json_object"} and describe the fields you want in the prompt. Supplying a JSON Schema is accepted but not enforced, so validate the result on your side rather than assuming the shape.
  • Media parts should be URLs the service can fetch. The model fetches image_url, video_url, and file_url targets itself, so a URL behind a login or a private network will fail the request. When the media is not publicly reachable, inline it as a base64 data URL instead.

Where to go next

Open the playground to try GLM 5.3 Flash without writing code, read the API reference for the full parameter list, or browse the model catalog to compare it with the rest of the lineup.

Ready to use better endpoints?

Explore our models, or contact us about business inquiries, custom deployments, or anything else.