DeepSeek API Integration: OpenAI & Anthropic Formats
Master DeepSeek API integration. OpenAI-compatible SDK configuration, Anthropic API format for Claude tooling, tool calls with thinking mode, strict JSON schema enforcement, and migration patterns from OpenAI and Anthropic.
DeepSeek's API is uniquely dual-format — it supports both OpenAI-compatible endpoints and Anthropic API format. This means you can use the OpenAI SDK with base_url=https://api.deepseek.com or the Anthropic SDK with base_url=https://api.deepseek.com/anthropic. Migration from either ecosystem is typically a single-line change.
But integration depth varies. The Anthropic format supports thinking mode, tool calls, and streaming — but ignores budget_tokens for thinking and cache_control. The OpenAI format supports JSON mode, FIM completion, and streaming. Tool calls in thinking mode have unique constraints around reasoning_content management. The pages in this section cover the full integration landscape.
Note:
LangChain compatible: DeepSeek works with LangChain out of the box. Just set the OpenAI-compatible base_url and api_key in your LangChain configuration.
What You'll Find Here
OpenAI-Compatible API
SDK configuration for OpenAI, LangChain, and other compatible tooling. Anthropic API format for Claude ecosystem tools. Migration patterns from both platforms. Streaming differences and keep-alive handling.
Tool Calls with Thinking
Combining tools and reasoning in DeepSeek. The mandatory reasoning_content passback rule for tool-call loops. strict mode (beta) for JSON schema enforcement in function calls. Error handling and 400 avoidance patterns.
Related Articles
Toy Transformations: Action Figures & Collectibles Guide
Turn photos into retro action figures and 3D collectibles with Nano Banana. Master the art of toy transformations and packaging design.
Illustration Styles SREF Collection
Master 15 curated Midjourney SREF codes for illustration aesthetics. Control style weight, combine codes, and create professional artwork for books, comics, and digital media.
Midjourney Cheat Sheet 2026
All Midjourney parameters, aspect ratios, SREF codes, and settings in one reference. Updated for Midjourney v6 and v7.