Authorization: Bearer ********************{
"model": "grok-code-fast-1",
"messages": [
{
"role": "user",
"content": "你是谁"
}
],
"temperature": 0.7,
"max_tokens": 1000
}curl --location 'https://wan.vnet.com/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-code-fast-1",
"messages": [
{
"role": "user",
"content": "你是谁"
}
],
"temperature": 0.7,
"max_tokens": 1000
}'{
"id": "e47312c1-17ef-96a6-b91c-09087899ee8e",
"object": "chat.completion",
"created": 1779699158,
"model": "grok-build-0.1",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!我是 **Grok**,由 **xAI** 公司开发的 AI 助手。\n\n我可以回答问题、帮你分析思考、聊天闲聊、写代码、翻译等等。简单来说,就是一个**尽量诚实、有点幽默、不太想装**的 AI。\n\n有什么想聊的或者需要帮忙的吗?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 126,
"completion_tokens": 234,
"total_tokens": 360,
"prompt_tokens_details": {
"cached_tokens": 64,
"cached_creation_tokens": 0,
"text_tokens": 126,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 163,
"image_tokens": 0
},
"input_tokens": 126,
"output_tokens": 234,
"input_tokens_details": null
}
}