
场景示意图,并非该模型生成结果
模型:
价格: 1.2 credits per 1K input tokens · ≈ $0.0006 · 2.4 credits per 1K output tokens · ≈ $0.0012稳定性高,并在 APIAny 平台提供详细的使用记录。
提示词预设,尚无生成结果
Sampling temperature.
Maximum output tokens.
Optional reasoning effort. Leave unset to use the model default. Higher effort can use more tokens and time.
Web search
Search the web before answering when current information is needed.
美元估算 ≈ $0.005:$999 档换算:1 美元 = 2,000 积分。

历史记录
保存在此浏览器本地
0 个运行中 · 0 个已完成
输入
≈ $0.0006
输出
≈ $0.0012
缓存读取
≈ $0.0006
上下文
最大输出
鉴权
每个请求都需要在 Authorization 头中携带 Bearer 令牌。请在控制台创建 API Key。
Authorization: Bearer YOUR_API_KEYhttps://apiany.ai/v1/chat/completions请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | 字符串 | 必填 | 要调用的模型标识,使用该模型的 ID。 |
messages | 数组 | 必填 | OpenAI 对话格式的消息历史(role + content)。 |
stream | 布尔值 | 可选 | 为 true 时,响应将以 SSE 流式返回。 |
请求示例
curl "https://apiany.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.7",
"messages": [
{
"role": "user",
"content": "Write a short decision memo using these fictional constraints: a two-person studio needs shared file review in 10 days; first-year budget 600 USD. Option A costs 20 USD/month and is ready now but lacks custom branding. Option B takes 15 engineering days plus 100 USD/year hosting and supports branding. Branding is desirable, not required; neither option has verified backup recovery. Recommend an option, show budget arithmetic and state the verification still needed."
}
],
"temperature": 0.7,
"max_tokens": 4096,
"reasoning_effort": "high",
"web_search": false
}'响应示例
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "grok-4.7",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 18,
"total_tokens": 30
}
}