# GLM-5-Turbo API

> A fast GLM-5 variant optimised for agent environments, trading some depth for quicker responses in tool-heavy loops.

- Model ID: `glm-5-turbo`
- Family: GLM
- Developer: GLM
- Endpoints: `POST /v1/chat/completions`
- Web page: https://bigmodel.io/models/glm-5-turbo
- Updated: 2026-10-19T08:12:54.528Z

## Pricing (USD per 1M tokens)

| Input | Output | Cached input |
| --- | --- | --- |
| $0.1086 | $0.478 | $0.02607 |

Charged per token from your prepaid USD balance. Billing rules: https://bigmodel.io/pricing

## Base URL

- OpenAI-compatible: https://bigmodel.io/v1

## Examples

Set `BIGMODEL_API_KEY` to a key from the BigModel.io console.

### curl

```bash
curl https://bigmodel.io/v1/chat/completions \
  -H "Authorization: Bearer $BIGMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "glm-5-turbo",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ]
}'
```

### Python

```python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://bigmodel.io/v1",
    api_key=os.environ["BIGMODEL_API_KEY"],
)

completion = client.chat.completions.create(
    model="glm-5-turbo",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(completion.choices[0].message.content)
```

### JavaScript

```javascript
// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://bigmodel.io/v1",
  apiKey: process.env.BIGMODEL_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "glm-5-turbo",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(completion.choices[0].message.content);
```
