EN ▾
Get API key

deepseek4api.comGuide

Uncensored API Pricing: Cost per Million Tokens

If you searched for deepseek v4 api pricing, note first that this service sells a different model under its own rates: $0.15 per 1M input tokens and $0.50 per 1M output tokens, paid from prepaid credit with no subscription.

Updated

Two coin stacks of different height feeding a small server, showing input and output token pricing

Key points

  • Input costs $0.15 per 1M tokens and output costs $0.50 per 1M tokens.
  • A typical 2,000-token prompt with a 500-token reply costs $0.00055, or $0.55 per 1,000 calls.
  • Top up any whole amount from $20 to $500, with bonus credit from $50 upward. Credit never expires.
  • New users can claim $0.50 of trial credit with one click, no card needed.

The rates at a glance

There are two prices, one for the tokens you send and one for the tokens the model writes back. Everything else on this page is arithmetic built on those two numbers. If you came here comparing DeepSeek V4 API price quotes, keep one thing in mind: the model behind this API is a single open-weight model run by an independent provider. It is not the official API of DeepSeek or of any other vendor, and it is not a router that forwards your request to someone else. A price list from another vendor tells you nothing about this bill, and this bill tells you nothing about theirs.

ItemRate
Input tokens$0.15 per 1M ($0.00015 per 1K)
Output tokens$0.50 per 1M ($0.0005 per 1K)
SubscriptionNone, pay as you go
Top-up rangeAny whole amount from $20 to $500
Credit expiryNever
Failed or refused requestsNot charged
Trial$0.50, valid for 7 days, no card

Two rows in that table matter more than they look. You are not paying a monthly fee for capacity you do not use, and a request that fails or gets refused costs nothing. The full details of endpoints and parameters are in the API documentation, and the summary version of this page lives at pricing.

How a request turns into a charge

Every call to POST /v1/chat/completions has two parts that are counted separately. The prompt is everything you send: the system message, the whole conversation history, any tool definitions and the new user message. The completion is whatever the model generates. Prompt tokens are billed at $0.15 per million and completion tokens at $0.50 per million.

Two details trip people up. First, the prompt is re-sent on every turn of a chat. If your conversation history is 20,000 tokens long, each new turn bills those 20,000 tokens again as input. The model has no memory between calls, so your client has to resend the history, and you pay for it each time. Second, the context window is 100,000 tokens, prompt and completion together. A call that fills the window with 100,000 input tokens costs $0.015 before the model writes a single word, which is still a little over one cent.

You do not have to guess the token counts. The response includes a usage object with prompt_tokens and completion_tokens. When you stream with stream: true, the usage arrives at the end of the stream. The response headers also carry X-Balance-USD, which shows your remaining credit, and X-Request-Id, which you should log so any question about a specific call can be traced.

The max_tokens parameter is optional. If you leave it out, the completion can use the rest of the window, so a model that rambles will cost more than one you cap. Setting a sensible ceiling is the simplest way to keep a worst case predictable.

Worked examples with the math

The formula is short: cost = input tokens x $0.15 / 1,000,000 + output tokens x $0.50 / 1,000,000. Here are five cases, each computed from that line.

ScenarioTokens in / outMathCost per callPer 1,000 calls
Short question500 / 300$0.000075 + $0.000150$0.000225$0.225
Typical task2,000 / 500$0.000300 + $0.000250$0.00055$0.55
Long chat turn20,000 / 300$0.003000 + $0.000150$0.00315$3.15
Large document90,000 / 2,000$0.013500 + $0.001000$0.0145$14.50
Bulk batch1,000,000 / 1,000,000$0.15 + $0.50$0.65n/a

Look at the long chat turn. It generates only 300 tokens of output, yet the input side is 95% of the bill because the history rides along every time. That pattern is the main cost driver for chat apps, and it is why trimming history pays off faster than shortening replies.

To measure your own traffic instead of estimating, compute the cost from the usage object. This snippet makes one call and prints the exact charge.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepseek4api.com/v1",
    api_key="YOUR_API_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarize the plot of Hamlet in three sentences."}],
    max_tokens=200,
)

u = resp.usage
cost = u.prompt_tokens * 0.15 / 1_000_000 + u.completion_tokens * 0.50 / 1_000_000
print(u.prompt_tokens, u.completion_tokens, f"${cost:.6f}")

If you also want the remaining balance after each call, read it from the headers with the SDK's raw response wrapper.

from openai import OpenAI

client = OpenAI(base_url="https://api.deepseek4api.com/v1", api_key="YOUR_API_KEY")

raw = client.chat.completions.with_raw_response.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Say hello."}],
)
print("Balance:", raw.headers.get("X-Balance-USD"))
print("Request id:", raw.headers.get("X-Request-Id"))
reply = raw.parse()
print(reply.choices[0].message.content)

Prepaid credit, bonuses and what each top-up buys

You add credit in whole dollars, anywhere from $20 to $500. Larger top-ups earn bonus credit: +5% from $50, +10% from $100 and +15% from $200. Credit never expires, so a larger top-up is not a bet against a deadline.

You payBonusCredit you getTypical tasks (2,000 in / 500 out)
$20none$20.00about 36,363 calls
$50+5% ($2.50)$52.50about 95,454 calls
$100+10% ($10)$110.00200,000 calls
$200+15% ($30)$230.00about 418,181 calls
$500+15% ($75)$575.00about 1,045,454 calls

Amounts between the tiers work the same way. A $75 top-up falls in the +5% band, so the bonus is $3.75 and you receive $78.75. A $150 top-up falls in the +10% band, so the bonus is $15 and you receive $165.

For roleplay or companion chat with a 20,000-token history, the long-chat row above applies: $20 covers roughly 6,349 turns at $0.00315 each. Because of the bonus tiers, a heavy user who knows they will spend $100 over a couple of months does slightly better by topping up once than by adding $20 five times.

You can pay with crypto (USDT on TRC20, USDC on Base). The API key page is where you top up after signing in.

What the $0.50 trial actually covers

After you sign up with Google, or with an email and password, the API key page offers a one-click claim of $0.50 trial credit. It needs no card, it is limited to one claim per person, and it stays valid for 7 days. Trial keys run at 2 concurrent requests and 60 requests per minute, which is enough to test a client but not to stress it.

Fifty cents goes further than it sounds at these rates. Using the typical-task scenario at $0.00055 per call, $0.50 covers about 909 calls. Using the long chat turn at $0.00315, it covers about 158 turns, which is a long evening of roleplay. Use that allowance to check three things: that your client connects with the base URL, that the replies suit your use case, and that your token counts match what you expected. Then decide whether a $20 top-up makes sense.

Comparing this price with other providers

A fair comparison needs the same workload on both sides. Take one of your real calls, note the input and output token counts, and apply each provider's per-million rates to those numbers. Do not compare the headline input rate alone, because output tokens usually cost more and your mix of input to output decides which one dominates.

Check the other provider's current pricing page for anything that changes the math: discounts for repeated prompts, different rates above a certain context length, minimum spends, expiry on prepaid balances, or charges for failed calls. Here, none of those apply: one flat pair of rates, no expiry, and no charge for failures. If you also want to compare model behavior rather than only price, the Gemma 4 API vs DeepSeek V4 API comparison on this site is a reasonable next read.

One honest caveat: price is not the only reason to pick a service. If you need image generation, embeddings or fine-tuning, this API cannot help, because it is text only. If you need a specific vendor's official model, this is not it. The case for this service is a low flat price for a model that answers without content refusals for lawful adult use.

Practical ways to keep the bill small

  • Trim history. Keep the last several turns verbatim and replace older turns with a short summary. This is the largest saving for chat workloads.
  • Cap the reply. Set max_tokens to what your interface can show. A 300-token cap on a chat turn bounds the output cost at $0.00015.
  • Use stop sequences. A stop string ends generation at a known marker instead of letting the model keep going.
  • Keep the system prompt tight. A 1,500-token system prompt sent on 10,000 calls is 15M input tokens, or $2.25.
  • Watch the balance header. Log X-Balance-USD per call or per hour, so a runaway loop shows up within minutes.
  • Mind concurrency. A full key allows 8 concurrent requests and 300 per minute. A streamed request holds its slot until the stream ends, so slow clients reduce your throughput without reducing your bill.

When you are ready to start, the key page takes a minute, and the documentation has copy-paste examples for curl, Python and Node.

Questions and answers

Is this the official DeepSeek V4 API price?

No. This service runs one open-weight model through an independent provider and is not the official API of DeepSeek or any other vendor. The rates on this page apply only here.

Do I pay a monthly fee?

No. There is no subscription. You top up prepaid credit in whole dollars from $20 to $500 and pay only for tokens used. The credit never expires.

Am I charged when a request fails?

No. Failed or refused requests are not charged. You are billed for input and output tokens on requests that complete.

How many calls does the trial cover?

The $0.50 trial covers about 909 calls of 2,000 input and 500 output tokens, or about 158 chat turns with a 20,000-token history. It lasts 7 days.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.