Skip to content

DeepSeek API Official References

YarCraSy edited this page Jul 8, 2026 · 2 revisions

Official References

Primary source: DeepSeek API Docs.

Quick start

API guides

API reference

Rules that affect the code

  • The main chat endpoint is POST /chat/completions.
  • stream: true returns SSE events and ends with data: [DONE].
  • reasoning_content appears separately from content in thinking mode.
  • In thinking mode, temperature and top_p have no effect according to the official guide.
  • Tool calls use tools, tool_choice, tool messages, and tool_call_id.
  • Tool arguments arrive as a JSON string and must be validated before execution.
  • JSON output requires response_format and prompt instructions asking for JSON.
  • FIM beta uses https://api.deepseek.com/beta and a 4K token maximum.

Clone this wiki locally