Black Friday: GLM 5.4 at 50% off, DeepSeek V4.1 Flash at 70% off, and 50% off your first month of Base or Plus.See pricing  ↗

model apis · chat / llm

GLM 5.4 API●

GLM 5.4 is a chat model from Z.ai. deeprelay serves it through an OpenAI-compatible API at https://api.deeprelay.ai/v1 under the model id deeprelay/glm-5.4, with a 1,048,576-token context window. It costs $0.70 per 1M input tokens and $2.20 per 1M output tokens, and it is included in the $0.99-a-month flat plan.

Available now

GLM 5.4 API pricing

Included in the $0.99/month flat plan. The plan carries 500 million input and 50 million output tokens a month across the included models, weighted by each model's usage factor. The rates below are what GLM 5.4 costs pay as you go, and what a request bills once a month's allowance is spent.

Live catalog rates, billed per use against your deeprelay balance, no minimums.

TierRate
ServerlessBlack Friday · 50% off Z.ai
Input tokens: was $1.40 / 1M $0.70 / 1MCached input tokens: was $0.26 / 1M $0.13 / 1MOutput tokens: was $4.40 / 1M $2.20 / 1M

rates are read every few minutes from the live model catalog and metered per request

Measured speed

Time to first token (p50)
24.2 s
Output speed (p50)
94 tokens/s

Last 7 days · as of UTC

Call GLM 5.4 in one request

Any OpenAI SDK works: set the base URL to https://api.deeprelay.ai/v1 and use your deeprelay API key.

curl
curl https://api.deeprelay.ai/v1/chat/completions \
  -H "Authorization: Bearer $DEEPRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deeprelay/glm-5.4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deeprelay.ai/v1",
    api_key="YOUR_DEEPRELAY_API_KEY",
)

response = client.chat.completions.create(
    model="deeprelay/glm-5.4",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
JavaScript (OpenAI SDK)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deeprelay.ai/v1",
  apiKey: process.env.DEEPRELAY_API_KEY,
});

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

GLM 5.4 on deeprelay

Model iddeeprelay/glm-5.4
ModalityChat / LLM
AuthorZ.ai
Context window1,048,576 tokens
StreamingSupported
Aliases–
Flat planIncluded ($0.99/month)

faq

GLM 5.4 API questions●

How much does the GLM 5.4 API cost?

GLM 5.4 is included in deeprelay's flat plan: $0.99 a month covers 500 million input and 50 million output tokens a month across the included models. Pay as you go, it costs $0.70 / 1M (input tokens), $0.13 / 1M (cached input tokens), $2.20 / 1M (output tokens), billed against your deeprelay balance, the same rates that apply once a month's allowance is spent. No minimums either way.

Is GLM 5.4 included in the deeprelay subscription?

Yes. GLM 5.4 is one of the models the flat plan covers: $0.99 a month carries 500 million input and 50 million output tokens a month, weighted by each model's published usage factor. Requests past the allowance (and any model outside the plan) bill pay as you go at the listed rates.

Is the GLM 5.4 API OpenAI-compatible?

Yes. Point any OpenAI SDK at https://api.deeprelay.ai/v1 with a deeprelay API key and request model "deeprelay/glm-5.4". No proprietary client needed.

What is the context window of GLM 5.4?

GLM 5.4 supports a 1,048,576-token context window on deeprelay.

How does billing work?

Chat models bill per input and output token at the listed per-million-token rates, metered per request against your deeprelay balance. Where a cached-input rate is listed, the part of a prompt the serving partner answers from its prompt cache (reported as prompt_tokens_details.cached_tokens) bills at that lower rate instead of the input rate. On the $0.99-a-month flat plan, requests to GLM 5.4 draw on the plan's monthly token allowance first and only bill your balance once it is spent.