文本与 Chat
Live
在 ChatGPT 中打开
(opens in new tab)最后核对: 2026-08-11请求模型
发送有顺序的
messages 数组和已上线的文本模型 ID。支持 temperature 与 max_tokens;Grok 4.5 和 4.6 还支持 OpenAI-compatible 的 tools、tool_choice、parallel_tool_calls 与 response_format。Grok 4.5 的 reasoning_effort 可取 low、medium 或 high,Grok 4.6 还支持 xhigh。不传 stream 时返回 JSON Completion;传 stream: true 时返回 OpenAI-compatible Server-Sent Events,并接受 stream_options.include_usage。兼容客户端也可发送 store: false。bashcurl https://api.modelrush.ai/v1/chat/completions \-H "Authorization: Bearer $MODELRUSH_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "modelrush/grok-4.6","messages": [{"role": "user", "content": "Return exactly: ModelRush connected"}]}'
bashcurl https://api.modelrush.ai/v1/chat/completions \-H "Authorization: Bearer $MODELRUSH_API_KEY" \-H "Content-Type: application/json" \-d '{"model":"modelrush/grok-4.6","messages":[{"role":"user","content":"流式返回一个简短答案"}],"stream":true}'
响应契约
响应遵循 Chat Completions 结构,包含
id、model、choices 与 usage。请保存响应 ID,用于支持与对账。限制
ModelRush 不设置全局消息条数上限,也绝不会静默截断、合并、删除或重排对话历史。实际容量由所选模型的上下文窗口、公开的请求体大小限制,以及为该模型 Operation 明确声明的 Provider 特定限制决定。请从
GET /models 读取版本化限制,不要把某个模型的上下文窗口或输出上限复制给其他集成。请求体过大返回 request_too_large;超过上下文窗口返回 context_length_exceeded。