thezakuloGet the newsletter
← All setup guides

Setup guide · 5 steps · about 10 minutes

How to start using Z.ai: GLM 5.3 Flash

Z.ai GLM 5.3 Flash (z-ai/glm-5.3-flash) is a native multimodal model from Z.ai for efficient coding and long-horizon agent tasks that accepts text, images, and video and returns text, with a ~1M-token context window, tool calling, and structured outputs.

Built from the official docs: openrouter.ai · GLM 5.3 Flash - API Pricing & Benchmarks · checked 27 November 2026

Through OpenRouter

  1. Get an OpenRouter API key

    Sign up on OpenRouter and create an API key; you will pass it as a Bearer token on every request.

  2. Export your key

    Store the key in an environment variable so the examples can read it.

    export OPENROUTER_API_KEY=<your-openrouter-api-key>
  3. Call it with curl

    Send a POST request to the OpenRouter responses endpoint using the model slug z-ai/glm-5.3-flash.

    curl https://openrouter.ai/api/v1/responses \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $OPENROUTER_API_KEY" \
      -d '{
      "model": "z-ai/glm-5.3-flash",
      "input": "What is the meaning of life?"
    }'
  4. Or call it with the OpenAI SDK

    Point the OpenAI SDK at the OpenRouter base URL as a drop-in replacement and set the model to z-ai/glm-5.3-flash.

    from openai import OpenAI
    
    client = OpenAI(
      base_url="https://openrouter.ai/api/v1",
      api_key="<your-openrouter-api-key>",
    )
    
    response = client.responses.create(
      model="z-ai/glm-5.3-flash",
      input="What is the meaning of life?"
    )
    
    print(response.output_text)
  5. Or install and use the OpenRouter Python SDK

    Install the openrouter package, then send a request with the responses method.

    pip install openrouter

Check it worked

You get back a JSON response whose output contains a message with output_text, or the SDK prints the model's text with no error.

Try these first

Get every issue by email

One email a week with the written issue. Free, one-click unsubscribe

Subscribe