Files
matrix-openclaw-bot/references/matrix-bot-chat-reference/sample/xAi的API交互方法.txt
2026-02-03 01:03:29 +08:00

15 lines
485 B
Plaintext

curl https://api.x.ai/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer xai-Irz5BaEdnraGMHeFmIuTWx85srNRX5rrmXiRofaroFHrXh4dWGynC0B6hhwhUeU70Is5rSow1lHiSSVu" -d '{
"messages": [
{
"role": "system",
"content": "You are a test assistant."
},
{
"role": "user",
"content": "Testing. Just say hi and hello world and nothing else."
}
],
"model": "grok-beta",
"stream": false,
"temperature": 0
}'