Free Grok 4.20 on Vercel

Run Grok 4.20 free on Vercel — keyless, within the $5/month AI Gateway credit.

About the Model

Grok 4.20

Grok 4.20 提供多种运行档位,适配不同的延迟与质量需求:

  • reasoning:开启扩展推理,攻坚复杂任务(xai/grok-4.20-0309-reasoning)。
  • non-reasoning:跳过思考链,极速响应(xai/grok-4.20-0309-non-reasoning)。
  • multi-agent:多智能体协同(xai/grok-4.20-multi-agent-0309)。

Cloudflare(每日免费额度)与 Vercel($5/月)均可免费调用。

How to Access for Free (via Vercel AI Gateway)

免费依据:每月 $5 系统额度

Vercel 每月提供价值 $5 的系统层 AI 额度(含免费 Hobby 计划),当月未超即可 免 Key 调用。Vercel 上的 Grok 4.20 模型 id:xai/grok-4.20-reasoning

Code Examples

javascript
import { streamText } from 'ai';
const { textStream } = streamText({
  model: 'xai/grok-4.20-reasoning',
  prompt: 'Plan a 3-step refactor.',
});
for await (const chunk of textStream) process.stdout.write(chunk);
curl
curl https://ai-gateway.vercel.sh/v1/chat/completions \
  -H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"xai/grok-4.20-reasoning","messages":[{"role":"user","content":"Plan a 3-step refactor."}]}'
Vercel AI Gateway Free Grok 4.20 on Vercel - Free AI API | Free AI API