xAI: Grok Code Fast 1API pricing
Grok Code Fast 1 is xAI's reasoning model for agentic coding, aimed at developers who work through loops of reasoning and tool calls. It is especially strong in TypeScript, Python, Java, Rust, C++ and Go, and uses common tools such as grep, terminal and file editing.
- 每100万枚代币的价格
- $1.00 / $2.00input / output
- 缓存的输入
- 0.20美元每100万枚代币
- 上下文
- 256K tokens10K max output
- 服务提供商
- 1
服务提供商
1 provider ·
256K context · 10K max output
支持的参数11
- 抽样
温度top_ptop_k种子logit_bias- 处罚
存在惩罚- 输出
停止response_format结构化输出- 工具
工具工具选择
价格走势
API
curl https://api.opencheap.si/v1/chat/completions \
-H "Authorization: Bearer $OPENCHEAP_API_KEY" -H "Content-Type: application/json" \
-d '{ "model": "opencheap/grok-code-fast-1", "messages": [{ "role": "user", "content": "Hi" }] }'import os
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheap.si/v1", api_key=os.environ["OPENCHEAP_API_KEY"])
r = client.chat.completions.create(model="opencheap/grok-code-fast-1",
messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.opencheap.si/v1", apiKey: process.env.OPENCHEAP_API_KEY });
const r = await client.chat.completions.create({ model: "opencheap/grok-code-fast-1",
messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);致电 Grok Code Fast 1 使用 OpenAI SDK:将其指向 https://api.opencheap.si/v1 并传递模型 ID opencheap/grok-code-fast-1;其余代码保持不变。
About Grok Code Fast 1
- 请求示例
- $0.01210,000 in + 1,000 out
- 端点
https://api.opencheap.si/v1- 模型 ID
每个请求都会发送给模型中成本最低且状态正常的提供者,而每个响应都会报告其成本为 使用成本. Every model on OpenCheap is called with one key at the same OpenAI-compatible endpoint, https://api.opencheap.si/v1.
用文字表述价格
Grok Code Fast 1 costs from $1.00 per 1M input tokens and $2.00 per 1M output tokens on OpenCheap, with cached input at $0.20 per 1M tokens. It has no public list price to compare with. At that price, a request with 10,000 input tokens and 1,000 output tokens costs about $0.012, and 1,000 such requests about $12.00.
One provider serves Grok Code Fast 1 on OpenCheap today. Its context window is 256K tokens (256,000), room for roughly 190,000 words of English in one request.
Grok Code Fast 1 is one of 40 xAI models on OpenCheap.
Prices as of 2026-12-04 11:48 UTC.
关于定价的问题
How much does the Grok Code Fast 1 API cost per 1M tokens?
Grok Code Fast 1 costs from $1.00 per 1M input tokens and $2.00 per 1M output tokens on OpenCheap, with cached input at $0.20 per 1M tokens. Prices as of 2026-12-04 11:48 UTC.
What does one Grok Code Fast 1 request cost?
A request with 10,000 input tokens and 1,000 output tokens costs about $0.012, and 1,000 such requests about $12.00. Every answer reports its own cost in usage.cost.
Which providers serve Grok Code Fast 1?
One provider serves Grok Code Fast 1 on OpenCheap today. Each request goes to the cheapest healthy provider of the model; the table on this page lists every provider with its price, speed and uptime.
What is the context window of Grok Code Fast 1?
Its context window is 256K tokens (256,000), room for roughly 190,000 words of English in one request.
How do I call the Grok Code Fast 1 API?
Point the OpenAI SDK at https://api.opencheap.si/v1 and pass the model id opencheap/grok-code-fast-1. One OpenCheap key works for every model; the rest of your code stays the same.
More from xAI
- Grok 4.7grok-4.7$1.26 / $5.03 per 1M · 500K context
- Grok 2 Vision 1212grok-2-vision-1212每1M 1.80美元 / 9.00美元
- grok-3grok-3$3.15 / $15.74 per 1M · 131K context
- grok-3-betagrok-3-beta$3.16 / $15.79 per 1M · 131K context
- grok-3-fast-betagrok-3-fast-beta$5.24 / $26.21 per 1M · 131K context
- grok-3-fast-latestgrok-3-fast-latest$5.24 / $26.21 per 1M · 131K context
- grok-3-latestgrok-3-latest$3.15 / $15.75 per 1M · 131K context
- grok-3-mini-fast-betagrok-3-mini-fast-beta$0.63 / $4.20 per 1M · 131K context
类似型号
- Kimi K2.7 代码Moonshot · 26.2万上下文$0.25 / $1.08 per 1M50 % cheaper
- ByteDance Seed 2.0 CodeByteDance · 262K context$0.42 / $2.52 per 1M
- Qwen 3 Coder 480B TurboQwen · 256K context$0.42 / $1.80 per 1M17 % cheaper
- Qwen3 Coder PlusQwen · 1M 语料库$0.55 / $2.19 per 1M
- 基米 K2.6Moonshot · 26.2万上下文$0.32 / $1.57 per 1M28 % cheaper
- Doubao Seed 2.0 Code PreviewByteDance · 256K context$0.48 / $2.41 per 1M