xAI
Grok Chat Fast
Language model128K contextTool calling
Input$0.20per 1M tokens
Output$0.80per 1M tokens
Official price待确认 / 待确认input / output · OpenRouter 公开目录价
1 route
About this model
Grok 网页版快速对话,支持函数工具调用
Request parameters
Chat · POST /v1/chat/completions
| Parameter | Accepted values | Default | Description |
|---|---|---|---|
modelRequired | Model ID | — | This page’s model ID |
messages | Message array | — | Messages with system, user, assistant, or tool roles |
n | Integer,fixed at 1 | — | Must be 1 |
stream | true / false | — | Return as an SSE stream |
stream_options | Object | — | Only include_usage is supported |
tools | Function tool array | — | Function tools with type=function |
tool_choice | Object | — | auto, none, required, or a named function |
parallel_tool_calls | true / false | — | Whether parallel tool calls are allowed |
response_format | Object | — | Only {"type":"text"} is supported |
frequency_penaltyIgnored | Number,-2 to 2 | — | Accepted; Web models do not use this value |
max_completion_tokensIgnored | Integer,1 to 32768 | — | Accepted; the Web model controls output length upstream |
max_tokensIgnored | Integer,1 to 32768 | — | Accepted; the Web model controls output length upstream |
metadataIgnored | Object | — | Accepted; does not affect the result |
presence_penaltyIgnored | Number,-2 to 2 | — | Accepted; Web models do not use this value |
seedIgnored | Integer,-9007199254740991 to 9007199254740991 | — | Accepted; Web models do not use this value |
storeIgnored | true / false | — | Accepted; does not affect the result |
temperatureIgnored | Number,0 to 2 | — | Accepted; Web models do not use this value |
top_pIgnored | Number,0 to 1 | — | Accepted; Web models do not use this value |
userIgnored | String,1–256 characters | — | Accepted; does not affect the result |
Message content supports: text。
Parameters outside this list return HTTP 400 with the field name and supported parameters. Parameters marked “Ignored” are accepted but unused by Web models.
Quick call
from openai import OpenAI
client = OpenAI(api_key="$TPOOL_API_KEY", base_url="https://tpool.dev/v1")
reply = client.chat.completions.create(
model="x-ai/grok-chat-fast",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)