What is the DeepSeek API base URL?
DeepSeek is OpenAI-compatible. Keep the standard openai library and change only base_url, api_key, and the model name.
base_url="https://api.deepseek.com/v1"Python quickstart guideStart with the DeepSeek quick answers below, then browse the curated official catalog. The page also calls/api/documentsin the browser to refresh page titles and descriptions from each official docs site. If a crawl fails, it falls back to the built-in official link summary.
Providers
7
Pages
28
Updated
2026年7月19日 18:10
The five things developers ask before their first call. Each answer links to a full guide.
DeepSeek is OpenAI-compatible. Keep the standard openai library and change only base_url, api_key, and the model name.
base_url="https://api.deepseek.com/v1"Python quickstart guideUse deepseek-v4-flash as the default for chat, streaming, and repeated tool steps. Switch to deepseek-v4-pro for harder reasoning or review-heavy work. Both have a 1M-token context window.
Pro vs Flash guideThinking mode returns a reasoning_content field alongside the answer, and DeepSeek supports OpenAI-style function calling / tools. Use Flash for high-frequency tool loops and Pro for harder chains.
Thinking & tool-call guideV4 Pro: $0.435 input / $0.87 output per 1M tokens ($0.003625 cache-hit input). V4 Flash: $0.14 input / $0.28 output per 1M tokens ($0.0028 cache-hit input). Rate limits are account-level and isolated per user_id.
Rate limit & user_id guideUse the /v1 OpenAI-compatible endpoint for standard SDKs, or DeepSeek's Anthropic-compatible endpoint for Claude Code. Always call the real model IDs (deepseek-v4-pro / deepseek-v4-flash); legacy aliases are being retired.
OpenAI vs Anthropic routing guideDeepSeek
DeepSeek official docs cover first API calls, model and pricing details, thinking mode, tool usage, and the API reference.
Start from the API key and base URL, then send your first chat/completions request.
Source
api-docs.deepseek.com
Review DeepSeek V4 Pro and Flash model routes, current context limits, and pricing guidance.
Source
api-docs.deepseek.com
Entry point for DeepSeek authentication, endpoints, and API reference material.
Source
api-docs.deepseek.com
Explains reasoning_content, thinking parameters, and compatibility notes for thinking mode.
Source
api-docs.deepseek.com