xAI: Grok 4

由 X-ai 提供

Grok 4 is xAI's latest reasoning model with a 256k context window. It supports parallel tool calling, structured outputs, and both image and text inputs. Note that reasoning is not exposed, reasoning cannot be disabled, and the reasoning effort cannot be specified. Pricing increases once the total tokens in a given request is greater than 128k tokens. See more details on the [xAI docs](https://docs.x.ai/docs/models/grok-4-0709)

支持流式输出最大 256K tokens

模型特性

输入模态

  • image
  • text

模型参数

最大 Tokens:256K
默认温度:0.7
流式输出:支持

定价信息

积分定价

文本输入:100 积分
图片输入:90 积分
消息输出:750 积分

API 定价

输入价格:$3.000/1K tokens
输出价格:$15.000/1K tokens

使用示例

API 调用示例
curl -X POST "https://chat.chatsking.com/api/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "grok-4",
    "messages": [
      {
        "role": "user",
        "content": "Hello, how are you?"
      }
    ],
    "max_tokens": 1000,
    "temperature": 0.7
  }'