Important: Cloudflare hosts the distilled DeepSeek-R1-Distill-Qwen-32B, not the full 671B R1 — it keeps much of R1's reasoning style at a smaller size. The free tier gives 10,000 Neurons/day (resets 00:00 UTC), no credit card.
cURL:
```bash
curl https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b \
-H "Authorization: Bearer $CF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Explain the Monty Hall problem."}]}'
```
Python:
```python
import os, requests
acct = os.environ["CF_ACCOUNT_ID"]
url = f"https://api.cloudflare.com/client/v4/accounts/{acct}/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
r = requests.post(
url,
headers={"Authorization": f"Bearer {os.environ['CF_API_TOKEN']}"},
json={"messages": [{"role": "user", "content": "Explain the Monty Hall problem."}]},
)
print(r.json()["result"]["response"])
```