Python

How to Use DeepSeek AI Models: API, OpenRouter, and Structured JSON Output

DeepSeek's API is OpenAI-compatible, which makes it easy to plug their models into almost any tool. In this guide, I walk through using DeepSeek via their own API platform and via OpenRouter, plus how to get reliable structured JSON output out of a reasoning model. The same setup works for whatever the current DeepSeek model is, not just R1. [...]