Authorization: Bearer ********************
{
"model": "glm4",
"messages": [
{
"role": "user",
"content": "你叫什么?"
}
],
"stream": false
}
curl --location --request POST 'https://api.ecovai.cn/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "glm4",
"messages": [
{
"role": "user",
"content": "你叫什么?"
}
],
"stream": false
}'
{
"id": "65f6c28546bae1f0fbb532de",
"model": "glm4",
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "我叫智谱清言,是基于智谱 AI 公司于 2023 年训练的 ChatGLM 开发的。我的任务是针对用户的问题和要求提供适当的答复和支持。"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 2
},
"created": 1710152062
}