POST
/
paas
/
v4
/
tokenizer
文本分词器
curl --request POST \
  --url https://open.bigmodel.cn/api/paas/v4/tokenizer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "glm-4-plus",
  "messages": [
    {
      "role": "user",
      "content": "What opportunities and challenges will the Chinese large model industry face in 2025?"
    }
  ]
}'
{
  "created": 1727156815,
  "id": "20241120141244890ab4ee4af84acf",
  "request_id": "1",
  "usage": {
    "prompt_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

使用以下格式进行身份验证:Bearer <your api key>

Body

application/json

Response

200
application/json

业务处理成功

The response is of type object.