Grok-4.2

xAI 最新的推理模型,拥有 256k 的上下文窗口。它支持并行工具调用、结构化输出以及图像和文本输入。

能力
"POST", "endpoint": "/v1/chat/completions", "protocol": "openai-chat", "parameters": {"optional": {"stream": {"type": "boolean", "default": false}, "max_tokens": {"type": "integer", "default": 1}, "temperature": {"max": 2, "min": 0, "type": "number", "default": 0.7}}, "required": ["model", "messages"]}, "validation": {"timeout_ms": 30000, "status_codes": [200], "response_path": "choices[0].message.content", "must_be_non_empty": true}, "test_request": {"model": "{{model}}", "messages": [{"role": "user", "content": "Hi"}], "max_tokens": 1, "temperature": 0.7}}
输入
text
输出
text
区域
global
验证时间
2026-08-15T04:50:43.134232410+00:00
价格
7.2 IFT / 1M tokens
文档
-

调用示例

curl https://api.inferlink.ai/v1/chat/completions \
  -H 'Authorization: Bearer $INFERLINK_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model":"xai/xai/grok-4.2","messages":[{"role":"user","content":"Hello"}]}'