Get your GLM API key

Get an AI/ML API key and call GLM 5.3 and other GLM models with the Universal AI SDK. Up to 30% off right now, no promo code. Pay as you go from one balance.

−20%
GLM 5.3
Input, per 1M tokens
$1.12$1.40
Output, per 1M tokens
$3.52$4.40
AI/ML API
Model: GLM 5.3GLM 5.3 FlashGLM 5.4GLM 5.2 Fast PreviewGLM 5.1
Choose a GLM model

Trusted by top teams

  • Adobe
  • Washington State University
  • NVIDIA
  • ByteDance
  • Alibaba
  • Poolside
  • MiniMax
  • Open Claude
  • RAGFlow
  • Zero
AI models
500+
AI providers
70+
Agentic tools
1000+
API uptime
99.99%

GLM API pricing

GLM models on AI/ML API with today's discounts, priced per 1M tokens. One key calls any row.

GLM models on AI/ML API with prices per 1M tokens and context window
Model Type Use it for Input Output Context
GLM 5.3−20%zhipu/glm-5.3 Text Flagship model for deep reasoning and long text $1.12 $1.40/ 1M tokens $3.52 $4.40/ 1M tokens 1M
GLM 5.3 Flash−20%z-ai/glm-5.3-flash Text Low-cost, high-throughput chat with image and video input $0.12 $0.15/ 1M tokens $0.40 $0.50/ 1M tokens 1M
GLM 5.4−15%zhipu/glm-5.4 Text Coding model with vision $1.19 $1.40/ 1M tokens $3.74 $4.40/ 1M tokens 1M
GLM 5.2 Fast Preview−30%zhipu/glm-5-2-fast-preview Text Low-latency chat, agents and coding $1.96 $2.80/ 1M tokens $6.16 $8.80/ 1M tokens 1M
GLM 5.1−30%alibaba/glm-5.1 Text Code already built on GLM 5.1 $0.98 $1.40/ 1M tokens $3.08 $4.40/ 1M tokens 200K

How to get your GLM API key

  1. Create your AI/ML API account

    Sign up with Google, GitHub or email. If you already have an account, log in.

    Screenshot of the AI/ML API sign-up page: Create your account, with Continue with Google, Continue with GitHub and an email field.
  2. Add credit

    Open Billing and add funds. You pay as you go and each request draws on this balance.

  3. Create your GLM API key

    Open API keys and choose Create API Key. Name it, set a spending limit and store it on your server.

  4. Send your first request

    Open the Playground, pick a GLM model and type a message. To call it from code, use your key with a supported SDK.

    AI/ML API
    Model: GLM 5.3GLM 5.3 FlashGLM 5.4GLM 5.2 Fast PreviewGLM 5.1
    Choose a GLM model

Works with your
existing AI stack

- OPENAI_API_KEY- ANTHROPIC_API_KEY- GEMINI_API_KEY+ AIML_API_KEY

Use GPT, Claude and other AI models with the SDK. Switch models without building a separate integration.

AI plans that grow with you

Start small and scale on the same API as your traffic grows

Pay as you go

From $20

Best for

  • Production projects
  • Fast iteration & scaling
  • Startups & indie devs

What's included

  • Access to all models
  • No usage limits
  • Access to Playground
  • Pay with crypto
  • Pay only for what you use
  • Priority human support

Enterprise

Custom

Best for

  • High-volume workloads
  • Custom infrastructure
  • Enterprise & regulated use

What's included

  • Dedicated servers
  • Custom / private models
  • Unlimited RPM & TPM
  • Extended data storage
  • Shared Slack channel
  • Team training & integration
  • Personal account manager
  • Any feature on request

GLM API FAQ

  1. Create an AI/ML API account, add credit, then open API keys and choose Create API Key. The same key calls every GLM model. Follow the setup guide.

  2. No. You get an AI/ML API key and call GLM models through api.aimlapi.com. A key from Zhipu AI's own platform works only with their API, and one can't replace the other.

  3. You pay per token from your AI/ML API balance. GLM 5.3 is 20% off: $1.12 for 1M input tokens instead of $1.40, and $3.52 for 1M output instead of $4.40. GLM 5.3 Flash is $0.12 and $0.40. See all GLM prices.

  4. Yes. Set base_url to https://api.aimlapi.com/v1 and pass your AI/ML API key; GLM model IDs start with zhipu/, z-ai/ or alibaba/. See supported SDKs.

  5. Add https://mcp.aimlapi.com/mcp as a remote MCP server and sign in through the browser. Your agent can then run AI/ML API models and check your balance. Read the MCP guide.

  6. GLM 5.3 for reasoning and long tasks, GLM 5.3 Flash for fast, low-cost chat with image and video input, GLM 5.4 for coding.

  7. Store the key in a server-side environment variable. Keep it out of browser code and public repositories, and set a spending limit in your account.

Start building with GLM