Tokenizer
Tokenizer is used to split text into tokens recognizable by the model and calculate the count. It receives user input text, processes it through the model for tokenization, and finally returns the corresponding token count. It is suitable for text length evaluation, model input estimation, dialogue context truncation, cost calculation, etc.
Documentation Index
Fetch the complete documentation index at: https://docs.z.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Body
The model code to be called.
glm-4.6, glm-4.6v, glm-4.5 "glm-4.6"
The current conversation message list as the model’s prompt input, provided in JSON array format, e.g.,{“role”: “user”, “content”: “Hello”}. Possible message types include system messages, user messages. Note: The input must not consist of system or assistant messages only.
1- User Message
- System Message
- Assistant Message
List of tools the model can call. Supports up to 128 functions.
Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.
6 - 64Unique ID for the end user, 6–128 characters. Avoid using sensitive information.
6 - 128Response
Business processing successful
The task sequence number generated by the Zhipu AI Open Platform. Please use this number when calling the request result interface.
"20241120141244890ab4ee4af84acf"
1727156815
The task number submitted by the client or generated by the platform when the request was initiated.
"1"