Models / Z.ai

GLM-5.2

$0.5/Mtok in

Z.ai's open-weight frontier challenger — strong coding and reasoning with one of the best free tiers in class.

Playground

Try it in the browser

Playground$0.5 in / $1.8 out per 1M tokens

Facts

At a glance

Availability

Live

Pricing

$0.5 / M input · $1.8 / M output

Endpoint

Chat Completions

/v1/chat/completions

Context window

128k tokens

API

Call it from code

import OpenAI from "openai"

const client = new OpenAI({
  baseURL: "https://api.companyfabric.com/v1",
  apiKey: process.env.COMPANYFABRIC_API_KEY,
})

const res = await client.chat.completions.create({
  model: "z-ai/glm-5.2",
  max_tokens: 1024,
  temperature: 0.7,
  messages: [{ role: "user", content: "Say hello from the fabric." }],
})

console.log(res.choices[0].message.content)

FAQ

Frequently asked questions

How much does GLM-5.2 cost?

$0.5 / M input · $1.8 / M output. The exact cost of each call is shown before you run it and metered to your prepaid balance — no subscription required.

Why use GLM-5.2 on CompanyFabric instead of going direct?

One key and one balance across every model in the library, at pricing at parity with or below the direct API. Switching models is a one-line change.

Is GLM-5.2 available through the OpenAI SDK?

Yes — point any OpenAI SDK at api.companyfabric.com/v1 and set model to "z-ai/glm-5.2".

Explore

Related model APIs

One key. Every model. Exact prices.

Run GLM-5.2 with free starter credits. Free starter credits included — no subscription required.