@cf/deepseek-ai/deepseek-r1-distill-qwen-32b — Free API

Created by DeepSeek ⭐ Score: 45
cloudflare-workers-ai/cf-deepseek-ai-deepseek-r1-distill-qwen-32b
JSON Mode chat reasoning

What is @cf/deepseek-ai/deepseek-r1-distill-qwen-32b?

DeepSeek R1 Distill Qwen 32B is a distilled version of DeepSeek's reasoning model, fine-tuned from Qwen 32B to replicate R1's chain-of-thought reasoning behavior at a smaller, more efficient scale. Running on Cloudflare's edge network, it offers reasoning-model capabilities — step-by-step deliberation for math, logic, and coding problems — with the lower latency and cost profile of a 32B model. The 32K context window is adequate for focused reasoning tasks but limits its use for long-document analysis. Shares Cloudflare's 10,000 Neurons/day free pool and uses Cloudflare's native API format.

Model ID
cf-deepseek-ai-deepseek-r1-distill-qwen-32b
Base URL
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run

@cf/deepseek-ai/deepseek-r1-distill-qwen-32b API Code Example

Paste your API key and run. See the config generator for Claude Code, Cursor, and more tools.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="cf-deepseek-ai-deepseek-r1-distill-qwen-32b",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run",
  apiKey: "YOUR_API_KEY",
});

const completion = await openai.chat.completions.create({
  model: "cf-deepseek-ai-deepseek-r1-distill-qwen-32b",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0].message.content);
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "cf-deepseek-ai-deepseek-r1-distill-qwen-32b",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Other Free Models from Cloudflare Workers AI

More About Cloudflare Workers AI

How to get an API key, rate limits, platform limitations, and tool configuration — everything you need to set up Cloudflare Workers AI as a free LLM API backend.

View Cloudflare Workers AI full guide →