GLM-4 Long

GLM-4 variant with extended 1M token context window for processing very long documents.

Input price
$0.1606
Output price
$0.1606
Context
1M
Max output
16K
Modalities
InputTextOutputText
—
—
Released
2025-02-17
Knowledge cutoff
—
Try in ChatCompare

Providers

Providers that serve this model. With Auto, each request goes to the best available provider. Prices in USD per 1M tokens; stats cover the last 30 days.

Pricing

All prices for this model, by service tier.

Input
$0.1606
per 1M tokens
Output
$0.1606
per 1M tokens
Cache read
$0.0803
per 1M tokens

Make a request

Set your provider preferences, then copy the request. It reads your API key from OHMYGPT_API_KEY.

Later turns reuse the provider’s prompt cache, which can lower cost and latency.

curl https://api.ohmygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $OHMYGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zhipu/glm-4-long",
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      }
    ]
  }'

Similar models

Other models with the same output types at a similar price.

GLM-4 LongThis model
—
Input
$0.1606
Output
$0.1606
—
Input
$0.1606–$0.165
Output
$0.6424–$0.66
—
Input
$0.1606
Output
$0.3212
—
Input
$0.1606
Output
$0.4818
—
Input
$0.165
Output
$0.66