GitHub Models offers DeepSeek R1 on its free, rate-limited inference tier — authenticate with a GitHub personal access token (no credit card). Free limits vary by your GitHub plan.
cURL:
```bash
curl https://models.github.ai/inference/chat/completions \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek/DeepSeek-R1","messages":[{"role":"user","content":"Explain the Monty Hall problem."}]}'
```
Python (OpenAI SDK):
```python
from openai import OpenAI
client = OpenAI(base_url="https://models.github.ai/inference", api_key="GITHUB_TOKEN")
resp = client.chat.completions.create(
model="deepseek/DeepSeek-R1",
messages=[{"role": "user", "content": "Explain the Monty Hall problem."}],
)
print(resp.choices[0].message.content)
```