# GLM 5.4

Use the GLM-5.4 API to review code, interpret visual references, and work through complex technical tasks with written explanations and proposed implementations. Provide your instructions, relevant code or documents, and images when you need visual analysis. Use it to turn a screenshot into interface code, investigate a defect across a long specification, or plan a game or 3D scene that your own tools can build. Set an output budget and check the proposed changes against your requirements. The detail page includes request examples, supported parameters, provider selection, and token-based usage pricing.

Documentation: https://openany.si/models/glm-5.4/routes/b75c75a0-7632-4aaf-8630-ac4ea11e5828/
Model ID: glm-5.4
Base URL: https://api.openany.si/v1
Authentication: Authorization: Bearer $OPENANY_API_KEY

Use OPENANY_API_KEY from the environment. API-key calls use your shared balance.
Review the selected provider contract and billing rules before a paid request.

Provider: neolink
Route ID: b75c75a0-7632-4aaf-8630-ac4ea11e5828
Availability: Live

## Billing
Published reference price: $1.330 / 1M tokens
Output: $4.180 / 1M tokens
Cache read: $0.260 / 1M tokens
Cache write: — / 1M tokens
Final charges depend on the selected route, request parameters and recorded usage. Price update time: not supplied.
```json
{
  "currency": "USD",
  "billingType": "usage_flat",
  "billingUnit": "token",
  "billingQuantity": 1,
  "pricingTiers": [
    {
      "tier": "Standard",
      "billing": "/ 1M tokens",
      "input": 1.33,
      "output": 4.18,
      "cacheRead": 0.26
    }
  ],
  "timePricingRules": []
}
```

## Request parameters
Endpoint: POST /v1/chat/completions
```json
{
  "type": "object",
  "required": [
    "model",
    "messages"
  ],
  "properties": {
    "model": {
      "type": "string",
      "default": "glm-5.4"
    },
    "tools": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "top_p": {
      "type": "number",
      "default": 0.95,
      "maximum": 1,
      "minimum": 0
    },
    "stream": {
      "type": "boolean",
      "default": false
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "properties": {
          "role": {
            "enum": [
              "system",
              "user",
              "assistant",
              "tool"
            ],
            "type": "string"
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          }
        },
        "additionalProperties": true
      },
      "minItems": 1
    },
    "thinking": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "enabled"
          ],
          "type": "string"
        },
        "clear_thinking": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    },
    "max_tokens": {
      "type": "integer",
      "default": 4096,
      "maximum": 128000,
      "minimum": 1
    },
    "temperature": {
      "type": "number",
      "default": 1,
      "maximum": 1,
      "minimum": 0
    },
    "tool_choice": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object"
        }
      ]
    },
    "response_format": {
      "type": "object"
    },
    "reasoning_effort": {
      "type": "string"
    }
  },
  "additionalProperties": true
}
```

## Request example
```bash
curl 'https://api.openany.si/v1/chat/completions' \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "max_tokens": 4096,
  "messages": [
    {
      "content": "Review this function for empty input and generator input. Explain the failure cases, suggest a corrected version, and list test cases.\n\ndef average(values):\n    return sum(values) / len(values)",
      "role": "user"
    }
  ],
  "model": "glm-5.4",
  "route": {
    "provider": "neolink"
  },
  "stream": false
}'
```

## Response example
Official schema example with placeholders, not a live response.
```json
{
  "id": "chatcmpl-EXAMPLE",
  "model": "glm-5.4",
  "usage": {
    "total_tokens": 0,
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "prompt_tokens_details": {
      "cached_tokens": 0
    }
  },
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "[Example placeholder: the generated code review and proposed correction appear here.]",
        "reasoning_content": "[Reasoning text, when returned by the selected route.]"
      },
      "finish_reason": "stop"
    }
  ],
  "created": 0
}
```

## Error handling
400: Check the model ID and request fields.
401 / 403: Verify credentials and access permissions.
429: Respect returned retry guidance.
5xx: Inspect usage before retrying a paid request.

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
