# Zhipu: glm-5

- Model ID: `glm-5`
- Provider: Zhipu
- Web version: https://www.moleapi.com/en/models/zhipu/glm-5
- Content status: catalog

## Model introduction

GLM model by 智谱 for general chat, writing, coding assistance, and tool-assisted workflows.

## Model capabilities

- OpenAI compatible
- Responses API
- Anthropic compatible
- Gemini compatible
- Prompt cache

### Verified specifications

- Catalog status: Currently available on MoleAPI
- Compatible protocols: openai, anthropic, openai-response, gemini
- Available billing groups: Standard, Discount, Relay

## Model pricing and access

Pricing is supplied dynamically by the MoleAPI console API.

### Standard (default, x1)

| Tier | Condition | Input | Output | Cache read |
| --- | --- | ---: | ---: | ---: |
| base | - | $0.58 | $2.61 | $0.145 |

### Discount (discount, x0.8)

| Tier | Condition | Input | Output | Cache read |
| --- | --- | ---: | ---: | ---: |
| base | - | $0.464 | $2.088 | $0.116 |

### Relay (relay, x0.3)

| Tier | Condition | Input | Output | Cache read |
| --- | --- | ---: | ---: | ---: |
| base | - | $0.174 | $0.783 | $0.0435 |

### Access protocols

| Protocol | Method | Endpoint |
| --- | --- | --- |
| openai | POST | /v1/chat/completions |
| anthropic | POST | /v1/messages |
| openai-response | POST | /v1/responses |
| gemini | POST | /v1beta/models/{model}:generateContent |

- Live pricing source: https://home.moleapi.com/api/pricing

## About glm-5

GLM model by 智谱 for general chat, writing, coding assistance, and tool-assisted workflows.

### Sources

- [MoleAPI console pricing catalog](https://home.moleapi.com/api/pricing) — MoleAPI

## Code examples

### cURL

```bash
curl https://api.moleapi.com/v1/responses \
  -H "Authorization: Bearer $MOLEAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5","input":"Explain this problem step by step."}'
```

### Python

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.moleapi.com/v1", api_key="YOUR_MOLEAPI_API_KEY")
response = client.responses.create(model="glm-5", input="Explain this problem step by step.")
print(response.output_text)
```

### TypeScript

```typescript
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.moleapi.com/v1", apiKey: process.env.MOLEAPI_API_KEY });
const response = await client.responses.create({ model: "glm-5", input: "Explain this problem step by step." });
console.log(response.output_text);
```

## More related models

- [glm-5.2](https://www.moleapi.com/en/models/zhipu/glm-5.2) — Zhipu
- [glm-5.1](https://www.moleapi.com/en/models/zhipu/glm-5.1) — Zhipu
- [glm-5-turbo](https://www.moleapi.com/en/models/zhipu/glm-5-turbo) — Zhipu

## Frequently asked questions

### How is glm-5 priced?

Prices are read from the MoleAPI console API and update with model prices, context tiers, and account groups.

### How can I access glm-5?

The catalog currently lists openai, anthropic, openai-response, gemini.

### How do I switch an existing project to glm-5?

Keep the MoleAPI API address and key, replace the model parameter, and check protocol-specific parameters.

### Where do the glm-5 details come from?

Only confirmed availability, pricing, and protocol details from the MoleAPI catalog are included.
