A local long-term memory runtime for AI agents that stores memories as Markdown files, ranks recall with a rebuildable index and needs no API key.
DeepSeek API
Pay-per-token API for DeepSeek V4 models with a 1M-token context, thinking modes, tool calls and OpenAI or Anthropic formats.
What is DeepSeek API?
The DeepSeek API gives developers HTTP access to DeepSeek language models, billed by the million input and output tokens. The documentation lists the deepseek-v4-pro model alongside a Flash model, with a 1M-token context window and output of up to 384K tokens. It accepts requests in OpenAI format at api.deepseek.com and in Anthropic format at api.deepseek.com/anthropic, so existing SDK code works after swapping the base URL and key. Models support JSON output, tool calls, the Responses API, and a thinking mode with low, high and max reasoning effort, which suits coding agents and tools like Codex. The docs also describe beta chat prefix completion and fill-in-the-middle completion. Billing separates cache-hit from cache-miss input and halves the price off-peak. The Chinese pricing page lists deepseek-v4-pro at 4.5元 per 1M cache-miss input tokens off-peak and 13.5元 per 1M output tokens, but the changelog says Flash prices were cut in September 2026, so check the live page.
Use cases
- Add an LLM to an app through an API
- Build tool-calling agents
- Return structured JSON output
- Complete code with fill-in-the-middle
- Analyze long documents in a 1M context
- Use DeepSeek as the backend for Codex
Who it's for
Why use DeepSeek API
- The OpenAI and Anthropic-compatible endpoints let you switch an existing client by changing a base URL and key.
- Off-peak prices are half of peak prices, so queued jobs can run at lower cost.
- Cache-hit input is billed far below cache-miss input, which helps repeated prompts that share a prefix.
- Choosing low, high or max reasoning effort lets you match spend to the difficulty of each task.
DeepSeek API features
- OpenAI-format and Anthropic-format base URLs
- 1M-token context and 384K maximum output
- Thinking and non-thinking modes
- Low, high and max reasoning effort
- JSON output and tool calls
- Native OpenAI Responses API support
- Chat prefix completion (beta)
- Fill-in-the-middle completion in non-thinking mode (beta)
- Peak and off-peak pricing with cache-hit discounts
- Concurrency limits of 500 to 2500 depending on model
DeepSeek API integrations
How to get started with DeepSeek API
- Apply for an API key on the DeepSeek platform and top up your balance.
- Set your OpenAI or Anthropic SDK base URL to the DeepSeek endpoint and pass the key.
- Choose a model name such as deepseek-v4-pro and enable or disable thinking.
- Set a reasoning effort of low, high or max for the task.
- Send requests; costs are deducted from your balance, using granted balance first.
DeepSeek API limitations
- Prices are listed in 元 on the Chinese pricing page and can change without notice
- Fill-in-the-middle only works in non-thinking mode
- Legacy model names such as deepseek-v4-flash are routed to the newer Flash model
- Concurrency is capped at 500 for V4-Pro
DeepSeek API pricing
DeepSeek API has no free plan.
DeepSeek API plans
deepseek-v4-pro
4.5元-9.0元 per 1M input tokens
cache miss, off-peak to peak; usage-based
- Cache-hit input 0.15元 off-peak, 0.30元 peak
- Output 13.5元 off-peak, 27.0元 peak
- Concurrency limit 500
deepseek-flash
Price on vendor site
usage-based
- 1M context and 384K max output
- Concurrency limit 2500
- Prices cut with V4.1 Flash release
Plans as listed on the official pricing page on . Prices can change and may vary by country or exclude tax. Check the official pricing page.
DeepSeek API alternatives
The main DeepSeek API alternatives listed on Debuly are OpenAI API, Mistral AI, Together AI, Groq, DeepSeek and OmniRoute. The table compares pricing and platforms; order is A–Z.
| Tool | Pricing | Starting price | Platforms |
|---|---|---|---|
| DeepSeek API | Paid | — | API |
| DeepSeek | Freemium | — | Web, API |
| Groq | Freemium | — | Web, API |
| Mistral AI | Freemium | $14.99/mo | Web, API, CLI, Self-hosted |
| OmniRoute | Open source | — | CLI, Web, API, Self-hosted |
| OpenAI API | Paid | $0.1, usage-based | API, Web |
| Together AI | Paid | — | Web, API |

DeepSeek
AI lab and chat assistant with a pay-per-token API for its V4 Flash and V4 Pro models, plus an app and web chat.
FreemiumVisit DeepSeek (official site)
Groq
GroqCloud inference API that serves open models such as GPT-OSS and Whisper on Groq's LPU hardware, billed per token.
FreemiumVisit Groq (official site)
Mistral AI
AI company offering open-weight models, the Vibe assistant, Studio and an API, with a free plan and paid tiers.
FreemiumVisit Mistral AI (official site)OmniRoute
Free open-source AI gateway that puts 352 providers behind one OpenAI-compatible endpoint with automatic fallback.
Open sourceVisit OmniRoute (official site)
OpenAI API
Developer API for OpenAI's GPT models, image generation, realtime voice and transcription, priced per million tokens with batch and flex options.

Together AI
AI cloud for running open-source models through serverless and batch inference, dedicated endpoints, GPU clusters and fine-tuning.
DeepSeek API FAQ
What is the DeepSeek API?
It is a hosted API for DeepSeek's V4 language models. You call it over HTTP in OpenAI or Anthropic format and pay by input and output tokens.
How much does the DeepSeek API cost?
The pricing page bills per million tokens. For deepseek-v4-pro it lists 4.5元 (off-peak) or 9.0元 (peak) for cache-miss input, and 13.5元 or 27.0元 for output. Flash prices were reduced in September 2026.
Is there a free plan for the DeepSeek API?
The pricing page describes pay-as-you-go billing from a topped-up or granted balance, with granted balance used first. It lists no free tier.
What are peak and off-peak hours?
Off-peak prices are half the peak prices. The Chinese page lists peak hours as 9:00-12:00 and 14:00-18:00 Beijing time on weekdays.
Is the DeepSeek API compatible with OpenAI SDKs?
Yes. Use https://api.deepseek.com as the OpenAI base URL or https://api.deepseek.com/anthropic for Anthropic format, and the official SDKs work.
Does the DeepSeek API support tool calls and JSON output?
Yes. Both listed models support JSON output, tool calls, the Responses API and the Anthropic API format.
What are alternatives to the DeepSeek API?
The OpenAI API, Anthropic API, Google Gemini API, Mistral's API and Together AI are common alternatives.
Sources & verification
Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.
| Source | Type | Accessed |
|---|---|---|
| api-docs.deepseek.com/quick_start/pricing/ | official | |
| api-docs.deepseek.com/zh-cn/quick_start/pricing | pricing | |
| api-docs.deepseek.com/quick_start/pricing | pricing | |
| api-docs.deepseek.com/news/news260813/ | official | |
| api-docs.deepseek.com/zh-cn/updates | official | |
| api-docs.deepseek.com/zh-cn/news/news260813 | official |
Image credits
- Logo: from api-docs.deepseek.com · fetched · Vendor trademark, used only to identify the product; removed on request
- Cover: none collected yet, so a generated tile is shown.
Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.


