HomeBlogDeepSeek API Key: How to Get One and What It Costs
GeneralDec 5, 20265 min read

DeepSeek API Key: How to Get One and What It Costs

How to get a DeepSeek API key, what V4.1 Flash and V4 Pro cost per 1M tokens, and how a DeepSeek key compares with a Mercatus AI Gateway key.

M

Mercatus Compute

Author

DeepSeek API Key: How to Get One and What It Costs

You get a DeepSeek API key at platform.deepseek.com/api_keys. With that key, DeepSeek V4.1 Flash costs $0.15 per 1M input tokens and $0.60 per 1M output tokens off-peak, and twice that during peak hours. DeepSeek V4 Pro costs $0.66 and $1.98 off-peak.

That key is one of three ways to reach DeepSeek's models. The other two are a gateway key that covers several model families at once, and a key from a third-party host. The model is the same on each route. The price, the peak hours and the terms are not. This page covers how to get each key and what each one charges.

How to get a DeepSeek API key

DeepSeek's documentation says to apply for a key on the API keys page of its platform site, platform.deepseek.com. Once you have it, set it as the DEEPSEEK_API_KEY environment variable and send requests to https://api.deepseek.com. The API accepts the OpenAI format, and the Anthropic format at https://api.deepseek.com/anthropic, so most existing client code works with a changed base URL and key.

There are two model names. deepseek-flash is served by DeepSeek V4.1 Flash, and deepseek-v4-pro is the flagship. Both have a 1M token context window and a maximum output of 384K tokens.

Billing is per token. Charges come out of your topped-up balance, or out of a granted balance first if your account has one. DeepSeek's pricing page does not say how large a granted balance is or which accounts receive one, so do not plan a budget around free usage.

Limits are set per account, not per key. DeepSeek allows 2,500 concurrent requests on deepseek-flash and 500 on deepseek-v4-pro, and says higher limits can be requested at no additional cost.

What a DeepSeek API key costs

DeepSeek bills by time of day. Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday through Friday. Every other hour, all weekend, and Chinese public holidays are off-peak at half the peak rate. DeepSeek peak and off-peak hours has the windows in your time zone.

Rate (USD per 1M tokens)V4.1 Flash off-peakV4.1 Flash peakV4 Pro off-peakV4 Pro peak
Input$0.15$0.30$0.66$1.32
Cached input$0.003$0.006$0.022$0.044
Output$0.60$1.20$1.98$3.96

The full rate history and every host are on DeepSeek API pricing, with separate pages for DeepSeek V4.1 Flash and DeepSeek V4 Pro.

Three ways to get DeepSeek access

A DeepSeek key. This is the direct route described above. It reaches DeepSeek's two models and nothing else, at DeepSeek's rate card and on DeepSeek's peak schedule.

A Mercatus AI Gateway key. One key from the Mercatus AI Gateway reaches DeepSeek V4.1 Flash and DeepSeek V4 Pro along with models from xAI, Alibaba, Zhipu and Moonshot, ten listings in all as of December 5, 2026. The endpoint is https://gateway.mercatus-ai.com/v1 and accepts the OpenAI and Anthropic formats. Mercatus states that no prompts or outputs are stored by default. To get a key, use the Get API key button on the gateway page, which opens the Mercatus Console, and sign in with Google or GitHub. The Mercatus quickstart says to contact support if you need access.

A third-party host key. Other providers serve DeepSeek's open weights under their own keys and at their own prices. Why token prices differ explains why the same model lists at very different rates from one host to the next.

DeepSeek key vs Mercatus AI Gateway key

Rates as listed by each seller on December 5, 2026, in USD per 1M tokens.

TermDeepSeek keyMercatus AI Gateway key
V4 Pro, input and output$0.66 and $1.98 off-peak, $1.32 and $3.96 peak$0.66 and $1.98, no peak tier listed
V4 Pro, cached input$0.022 off-peak, $0.044 peak$0.066
V4.1 Flash, input and output$0.15 and $0.60 off-peak, $0.30 and $1.20 peak$0.15 and $0.60 off-peak, $0.30 and $1.20 peak
V4.1 Flash, peak window01:00 to 04:00 and 06:00 to 10:00 UTC, weekdays00:00 to 14:00 UTC (08:00 to 22:00 Beijing time)
V4.1 Flash, cached input$0.003 off-peak, $0.006 peak$0.015 off-peak, $0.03 peak
Other models on the same keyNoneGrok, Qwen, GLM and Kimi

Two things stand out. On V4 Pro, the gateway lists one rate at every hour. A team that calls V4 Pro during DeepSeek's peak windows pays half as much per uncached token through the gateway as it does on DeepSeek's own key. On V4.1 Flash, the direct key has the shorter peak window and the lower cached rate, so a cache-heavy Flash workload costs less on DeepSeek's key.

What a real workload pays

Take 10M input tokens and 1M output tokens per day, uncached.

Model and keyPer dayPer year
V4 Pro, DeepSeek key, all off-peak$8.58$3,132
V4 Pro, DeepSeek key, all peak$17.16$6,263
V4 Pro, Mercatus AI Gateway key, any hour$8.58$3,132
V4.1 Flash, either key, off-peak$2.10$767
V4.1 Flash, either key, peak$4.20$1,533

The gap on V4 Pro is $8.58 a day, about $3,132 a year, for a workload that runs entirely inside DeepSeek's peak hours. Daytime traffic from Asia and overnight batch jobs from the US are the two cases that land there. If your traffic already sits in off-peak hours, the two keys cost the same on V4 Pro and the choice comes down to whether you want other models on one key.

Which key to get

Get a DeepSeek key if you only need DeepSeek, your traffic is mostly off-peak, or you rely on cached input with V4.1 Flash.

Get a Mercatus AI Gateway key if you run V4 Pro during peak hours, if you want DeepSeek, Grok, Qwen, GLM and Kimi behind one key and one bill, or if you need to budget ahead. Mercatus sells IR for planned monthly usage. Each IR is $20 of inference credit for a set delivery month at fixed model prices, and unused IR can be sold on the Mercatus Forward Market before the serving period ends. Browse the gateway models and prices.

Whichever key you pick, the rate on it can change. DeepSeek moved to time-of-day billing on August 16, 2026 on short notice. A rate card is one seller's current offer. The Mercatus Token Index tracks where these models actually trade.

Frequently asked questions

How do I get a DeepSeek API key?

Create one on the API keys page at platform.deepseek.com, then use it with the base URL https://api.deepseek.com.

Is a DeepSeek API key free?

DeepSeek bills per token from a topped-up or granted balance. Its pricing page does not state a free tier or how much granted balance an account receives.

How much does the DeepSeek API cost?

DeepSeek V4.1 Flash is $0.15 input and $0.60 output per 1M tokens off-peak, and $0.30 and $1.20 at peak. DeepSeek V4 Pro is $0.66 and $1.98 off-peak, and $1.32 and $3.96 at peak.

Can I use DeepSeek models without a DeepSeek account?

Yes. A Mercatus AI Gateway key or a key from a third-party host reaches the same models without a DeepSeek account.

Is the DeepSeek API compatible with the OpenAI SDK?

Yes. DeepSeek accepts the OpenAI format at https://api.deepseek.com and the Anthropic format at https://api.deepseek.com/anthropic.

Does one DeepSeek API key work for both models?

Yes. The model is chosen per request with the model name, deepseek-flash or deepseek-v4-pro. Rate limits apply to the account, not to each key.

Methodology

DeepSeek key steps, base URLs, model names, prices, peak hours and limits are from DeepSeek's API documentation, read December 5, 2026. Mercatus AI Gateway listings, price tiers, endpoint and data retention statement are from the Mercatus gateway and console pages, read the same day. Workload figures assume 10M input and 1M output tokens per day for 365 days. Last verified: 2026-12-05.