Free DeepSeek R1 API on Vercel AI Gateway

Access deepseek-r1 free through Vercel's $5 monthly credit.

Updated 7/2/2026Provider trust 98/1003 code examples

About the Model

DeepSeek R1 is a reasoning model built for math, code, and multi-step problem solving. It is slower than small chat models, but it is the better choice when the answer needs planning or careful verification.

Why choose it?

  • Reasoning-first output: useful for proofs, debugging, and structured problem solving.
  • Multiple free routes: available through GitHub Models and Vercel AI Gateway, with a smaller distilled version on Cloudflare Workers AI.
  • OpenAI-compatible options: easy to swap into existing chat completions clients.

Free access options

  • GitHub Models: free, rate-limited access to DeepSeek R1 with a GitHub token.
  • Vercel AI Gateway: monthly gateway credits for deepseek/deepseek-r1.
  • Cloudflare Workers AI: free daily Neurons for a distilled R1 model, not the full model.

Pick DeepSeek R1 for hard prompts where a small model gives shallow answers. Use GPT-4o mini when speed matters more.

How to Access for Free (via Vercel AI Gateway)

Vercel AI Gateway provides a monthly-credit path to DeepSeek R1 through a single OpenAI-compatible API. It is useful if you want one gateway key for DeepSeek, OpenAI, Anthropic, and Google model tests.

The free basis is Vercel's monthly gateway credit. Use it for reasoning-heavy prompts, then compare latency and quality against GPT-4o mini for simpler work.

Try it in your browser

Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.

Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.

Code Examples

curl
curl https://ai-gateway.vercel.sh/v1/chat/completions \
  -H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek/deepseek-r1","messages":[{"role":"user","content":"Solve this logic puzzle and explain each step."}]}'
python
from openai import OpenAI

client = OpenAI(base_url="https://ai-gateway.vercel.sh/v1", api_key="AI_GATEWAY_API_KEY")
response = client.chat.completions.create(
    model="deepseek/deepseek-r1",
    messages=[{"role": "user", "content": "Solve this logic puzzle and explain each step."}],
)
print(response.choices[0].message.content)
javascript
import { generateText } from "ai";

const { text } = await generateText({
  model: "deepseek/deepseek-r1",
  prompt: "Solve this logic puzzle and explain each step.",
});

console.log(text);
Free DeepSeek R1 API on Vercel AI Gateway - Free API, Quota & Code | Free AI API