DeepSeek V4 Flash: model id, API pricing, and the real cost of running it on Twitter (X) data

By TwitterAPI.io Team•14 min read
Diagram: the legacy model names deepseek-v4-flash and deepseek-v4-flash-vision-exp route to model=deepseek-flash, which is served by DeepSeek-V4.1-Flash-1017 with 1M context, 384K max output and peak / off-peak prices per 1M tokens
Every Flash model name on the DeepSeek API now resolves to DeepSeek-V4.1-Flash-1017. Prices from DeepSeek's Models & Pricing page.

This page is about the DeepSeek V4 Flash model itself: its API name, its price per 1M tokens, its limits, and what it costs on real data. If you want a terminal agent built on DeepSeek, our DeepSeek Harness guide covers the CLI; if you want to try DeepSeek without paying, the free DeepSeek API guide covers that. Here the question is narrower and more practical: you have seen "DeepSeek V4 Flash" in a launch post or a price tracker, and you want to know what to put in the model field and what the bill will look like.

The short version is that the name you searched for has moved. DeepSeek shipped V4 Flash in April 2026, upgraded it to V4.1 Flash in September 2026, and on October 17, 2026 shipped DeepSeek-V4.1-Flash-1017 behind the same API name, deepseek-flash. Several third-party price trackers still show older V4 Flash rates, so every price below comes from DeepSeek's own Models & Pricing page, read the day this page was built, and every cost figure is computed from posts we actually collected from X.

01 — Section

What DeepSeek V4 Flash is today

DeepSeek runs two API models at the moment: deepseek-flash and deepseek-v4-pro. The Models & Pricing page lists the model version behind deepseek-flash as DeepSeek-V4.1-Flash-1017 and the version behind deepseek-v4-pro as DeepSeek-V4-Pro-0813. Both are reachable through an OpenAI-format base URL (https://api.deepseek.com) and an Anthropic-format base URL (https://api.deepseek.com/anthropic), so the OpenAI and Anthropic SDKs work after you change the base URL and the key.

Footnote (1) on that page is the part most people miss: use deepseek-flash as the model name; the legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp are still accepted, but the corresponding models have been retired, and their requests are served by DeepSeek-V4.1-Flash-1017 and billed at the Flash price. In other words, code written for V4 Flash keeps running, but it is no longer talking to V4 Flash.

The change log shows how the name drifted. April 24, 2026: the V4 Preview added deepseek-v4-pro and deepseek-v4-flash, and pointed the old deepseek-chat and deepseek-reasoner names at V4 Flash's non-thinking and thinking modes until their retirement on July 24, 2026. July 31, 2026: the official V4 Flash API went into public beta. September 10, 2026: V4.1 Flash shipped with native image understanding, the model name became deepseek-flash, V4 Flash and V4 Flash Vision Exp were retired, and API prices were cut. October 17, 2026: V4.1-Flash-1017 replaced it behind the same name with "the API calling method and pricing" unchanged, according to the change log.

The October release note describes the 1017 build as a Pareto improvement: higher benchmark scores with shorter outputs and faster task completion. Shorter outputs matter for cost, because output tokens are the most expensive line on the rate card. The weights are also published on Hugging Face as deepseek-ai/DeepSeek-V4.1-Flash-1017, so self-hosting is an option if you have the hardware; the prices on this page apply only to DeepSeek's hosted API.

02 — Section

DeepSeek V4 Flash pricing per 1M tokens

DeepSeek bills model usage per token: expense equals tokens times price, deducted from your topped-up or granted balance (granted balance first). There is no subscription for the API. Prices are listed per 1M tokens and split three ways: input tokens that hit the context cache, input tokens that miss it, and output tokens. Since August 16, 2026 every rate also has a peak and an off-peak version.

Rate (USD per 1M tokens)deepseek-flash peakdeepseek-flash off-peakdeepseek-v4-pro peakdeepseek-v4-pro off-peak
Input, cache hit$0.006$0.003$0.044$0.022
Input, cache miss$0.30$0.15$1.32$0.66
Output$1.20$0.60$3.96$1.98

Peak hours. The pricing page defines peak as 01:00-04:00 and 06:00-10:00 UTC, Monday through Friday, excluding Chinese public holidays. Every other hour is off-peak, including weekends and Chinese public holidays in full. For a team in the Americas that is mostly the middle of the night, so interactive daytime traffic in the US lands almost entirely in off-peak hours, while a European morning overlaps the 06:00-10:00 UTC window.

Cache hits are 50x cheaper than misses. A cache hit on deepseek-flash costs $0.006 per 1M tokens at peak against $0.30 for a miss. DeepSeek's context-caching guide explains that the cache matches repeated prefixes (for example the same system prompt at the start of every request), works on a best-effort basis with no guaranteed hit rate, and reports what happened in two usage fields: prompt_cache_hit_tokens and prompt_cache_miss_tokens.

Flash vs Pro. At the same hour, deepseek-v4-pro costs 4.4x Flash on cache-miss input and 3.3x on output. DeepSeek's own September note said multiple parties found V4.1 Flash ahead of V4 Pro on performance, cost and speed; the change log later says V4 Pro service continues with billing unchanged. For high-volume text jobs such as labeling posts, Flash is the default choice the docs point you to.

Search and Fetch are billed separately. The same page lists DeepSeek's Search and Fetch APIs at $0.75 per 1,000 successful requests each, and notes that server-side tool calls from DeepSeek Harness, Claude Code and Codex started being billed at 16:00 UTC on October 31, 2026. If your agent lets the model browse, that is a separate line item from tokens.

03 — Section

Context window, output limit, thinking mode, and concurrency

Context length: 1M tokens. DeepSeek made 1M context the default across its official services with the V4 Preview, and the pricing page lists 1M for both current models. Maximum output: 384K tokens. That is a ceiling, not a default; set max_tokens to what your task needs, because you pay for every output token.

Thinking mode is on by default. The thinking-mode guide says both models support non-thinking and thinking modes, that thinking is enabled by default with effort high, and that the chain of thought comes back in reasoning_content. Reasoning tokens are generated output, so a classification call in thinking mode can cost several times the same call in non-thinking mode. For short, well-defined labels, send "thinking": {"type": "disabled"} in the request body; keep thinking for multi-step agent work. Effort levels are low, high and max.

Sampling parameters. In thinking mode, temperature, presence_penalty and frequency_penalty are accepted but have no effect. For deepseek-flash, top_p only takes effect in thinking mode, within 0.95 to 1.0.

Concurrency: 2,500 for Flash, 500 for Pro. The Rate Limit & Isolation page counts limits per account, not per key. A request occupies one slot from send until the response completes; above the limit you get HTTP 429. DeepSeek offers capacity expansion at no extra cost on request, and a user_id parameter for isolating your own end users. Requests that have not started inference after 10 minutes are closed by the server.

Features. Both models support JSON Output, tool calls, the Responses API, the Anthropic API format and chat prefix completion (beta). FIM completion is non-thinking only. Vision is supported on deepseek-flash and not on deepseek-v4-pro, per the pricing table.

04 — Section

What 1,000 real X posts cost to process with deepseek-flash

Price per token only becomes useful once you know how many tokens your data has. So we collected 1,000 recent public X posts that mention DeepSeek Flash or DeepSeek V4 (search query below), measured each one, and priced two common jobs. We did not have a DeepSeek API key for this build, so no post was sent to DeepSeek: the token counts are estimates, made two ways. The first uses DeepSeek's own documented ratio (about 0.3 token per English character and 0.6 per Chinese character). The second uses OpenAI's cl100k_base tokenizer as a cross-check; it is a different tokenizer, so treat the two as a range.

The sample is short text, but with a long tail. The median post is 216 characters and 73 estimated tokens; the mean is 164 tokens because some posts are long-form (the 90th percentile is 319 tokens and the longest is 5,706). If you process every post, budget for the mean, not the median.

Job (per 1,000 posts)Flash off-peakFlash peakPro peak
Classify each post, cached system prompt$0.040$0.080$0.321
Classify each post, no cache hits$0.055$0.109$0.448
Summarize in 10 batches of 100$0.027$0.055$0.236

How the jobs are modeled. Classification sends one request per post with a fixed 100-token system prompt and a 25-token JSON label in non-thinking mode; after the first calls, the repeated system prompt is billed as a cache hit. Per 1,000 posts that is about 164,591 cache-miss input tokens, 99,800 cache-hit tokens and 25,000 output tokens. Summarization packs 100 posts into each request and asks for a roughly 250-word brief (350 output tokens), so 1,000 posts become 10 calls with about 168,253 input tokens.

The cross-check moves the numbers, not the conclusion. With cl100k_base counts the same classification job comes to $0.048 off-peak and $0.097 at peak per 1,000 posts. Either way, labeling 1,000 posts with deepseek-flash costs a few cents, and the batch summary costs less than the per-post labels because the instructions are paid for ten times instead of a thousand.

Thinking mode would change this table. All figures above assume thinking is disabled. With the default thinking mode, every call also generates reasoning tokens at the output rate, which is the most expensive token on the card. Measure it on a few hundred calls with the usage object before you run a large job.

Horizontal bar chart on a log scale: reading 1,000 posts costs $5.00 on the official X API and $0.15 on TwitterAPI.io; classifying 1,000 posts costs about $0.32 on deepseek-v4-pro peak, $0.080 on deepseek-flash peak and $0.040 off-peak; summarizing costs $0.055 peak and $0.027 off-peak
Per 1,000 real X posts: data cost vs estimated deepseek-flash token cost. 1,000 posts, token counts estimated. Collected in 2026.
05 — Section

Why language matters for your DeepSeek bill

A post about a Chinese AI lab draws a multilingual audience. In our sample, 57.8% of posts were tagged English, 23.3% Chinese and 9.2% Japanese, with the rest spread across Portuguese, Korean, Spanish, Indonesian and others. Language changes the token count per character, and so the cost per post.

LanguagePostsMean charactersEst. tokens (DeepSeek ratio)Est. tokens (cl100k)
English578502151145
Chinese233398180326
Japanese92400187330

Chinese and Japanese posts are shorter in characters but heavier in tokens under both estimators. The gap between the two estimators is also much wider for CJK text (180 vs 326 tokens for Chinese), which is expected: DeepSeek's tokenizer is built for Chinese and English, while cl100k_base splits CJK text into more pieces. For English the two agree closely (151 vs 145).

Use the real count before you scale. DeepSeek publishes an offline tokenizer package on its Token & Token Usage page, and every API response returns exact usage numbers. Run it on a slice of your own data; a feed that is mostly Japanese will cost more per post than this blended sample suggests, and one that is mostly short English replies will cost less.

06 — Section

The data is the bigger line item: TwitterAPI.io vs the official X API

Once the model costs a few cents per 1,000 posts, the cost of getting the posts dominates. TwitterAPI.io charges 15 credits per tweet returned, which is $0.15 per 1,000 tweets ($1 = 100,000 credits), with a minimum of 15 credits per request. The official X API's pay-per-use rate card on docs.x.com/x-api/getting-started/pricing lists $0.005 per post read, which is $5.00 per 1,000 posts, roughly 33x more for the same read.

Pipeline, per 1,000 postsDatadeepseek-flash classifyTotal
TwitterAPI.io + Flash off-peak$0.15$0.040$0.19
TwitterAPI.io + Flash peak$0.15$0.080$0.23
Official X API + Flash peak$5.00$0.080$5.08

What the official card adds. X's pay-per-usage plan is capped at 3M post reads a month, with Enterprise above that; new developers get $20 in credits after saving a first card and buying credits, plus a match of the first auto-recharge up to $50. User reads are $0.010 each on that card, against $0.18 per 1,000 profiles on TwitterAPI.io.

No X account needed for reads. On TwitterAPI.io you sign up, get a key, and call endpoints such as /twitter/tweet/advanced_search with an X-API-Key header. New accounts that pass the automatic bot check get up to $1 of free credits (at most 100,000 credits, no card, one per person or network, expiring after 31 days), which is enough to pull several thousand posts for a test like this one. Rate limits start at 0.2 requests per second before the first payment and rise to 20 once paid. Plan details are on the pricing page.

07 — Section

How @deepseek_ai announces Flash models

DeepSeek announces every model change on its X account first, which makes @deepseek_ai a useful feed to watch if you depend on the API. We pulled the account's timeline: the endpoint returned 69 posts spanning 2023 to 2026, 13 of them from 2026. Every one of them is authored by @deepseek_ai.

Flash posts draw the account's largest 2026 audiences. The 7 posts that mention Flash had a median of 7.2M views, against 2.2M for the account's other 6 posts of 2026. The DeepSeek-V4.1-Flash-1017 launch post reached 8.3M views and 37,210 likes; the V4 Flash official-API post reached 9.6M, the V4 Preview post 10.2M, and the V4 Pro launch 3.1M.

Launch postYearViewsLikes
DeepSeek-V4 Preview (Pro + Flash)202610.2M45,375
DeepSeek-V4-Flash official API20269.6M29,791
DeepSeek-V4.1-Flash20267.2M28,778
DeepSeek-V4.1-Flash-101720268.3M37,210
DeepSeek-V4-Pro20263.1M15,272

Why this matters for an API user. Price changes, retirements and model swaps behind an unchanged name were all announced on this account as well as in the API docs change log. A small watcher that polls /twitter/user/last_tweets for deepseek_ai and alerts on words like price, retired or model name is a cheap way to avoid finding out from a changed invoice. At the polling floor, a check every 5 minutes that usually finds nothing costs about $1.30 a month.

Bar chart of views on @deepseek_ai launch posts: DeepSeek-R1 12.6M, DeepSeek-V4 Preview 10.2M, DeepSeek-V4-Flash official API 9.6M, DeepSeek-V4.1-Flash-1017 8.3M, DeepSeek-V3 7.4M, DeepSeek-V4.1-Flash 7.2M, with Flash launches highlighted
Views on @deepseek_ai launch posts, Flash family in orange. 69 timeline posts. Collected in 2026.
08 — Section

Calling deepseek-flash on tweets: a working pattern

The full script at the end of this page does three things: pulls recent posts with /twitter/tweet/advanced_search (following has_next_page and next_cursor), sends each post to deepseek-flash with JSON Output and thinking disabled, and adds up the real usage numbers so you see your actual cost instead of our estimate.

Keep the system prompt identical. The cache matches prefixes, so put the fixed instructions first and the post text last. Any change to the system prompt (even a timestamp) turns every call back into a cache miss.

Disable thinking for labels. Send "thinking": {"type": "disabled"} and cap max_tokens. Turn thinking back on, with reasoning_effort set to low, high or max, only for tasks that need multi-step reasoning.

Batch when you can. If you want a digest rather than per-post labels, send 50 to 100 posts per call. In our model that cut the cost per 1,000 posts by roughly a third versus per-post labeling, and a 1M-token context leaves plenty of room.

Schedule bulk jobs off-peak. A backfill that can wait should run outside 01:00-04:00 and 06:00-10:00 UTC on weekdays; every token is half price.

Truncate long-form posts. The longest post in our sample was over 5,000 estimated tokens. Cutting the input at a few thousand characters keeps one outlier from costing as much as a hundred normal posts.

python
# Minimal DeepSeek call (OpenAI format), non-thinking, JSON Output
import os, requests

r = requests.post(
    "https://api.deepseek.com/chat/completions",
    headers={"Authorization": f"Bearer {os.environ['DEEPSEEK_API_KEY']}"},
    json={
        "model": "deepseek-flash",
        "messages": [
            {"role": "system", "content": "Return JSON: {\"sentiment\": \"positive|neutral|negative\"}"},
            {"role": "user", "content": "V4.1 Flash is fast and the price is fine."},
        ],
        "thinking": {"type": "disabled"},
        "response_format": {"type": "json_object"},
        "max_tokens": 40,
    },
    timeout=60,
)
body = r.json()
print(body["choices"][0]["message"]["content"])
print(body["usage"])  # prompt_cache_hit_tokens, prompt_cache_miss_tokens, completion_tokens
09 — Section

How we collected this

Question. How many tokens does a real X post contain, and what does it cost to classify or summarize 1,000 of them with deepseek-flash at DeepSeek's published rates, next to the cost of the data itself? Secondary: how does @deepseek_ai announce Flash models, and how much attention do those posts get?

Sources and query. An advanced search for posts containing "deepseek flash", "deepseek-flash", "deepseek v4" or "v4.1 flash", excluding reposts, sorted Latest; and the public timeline of the @deepseek_ai organization account via /twitter/user/last_tweets.

Window and sample. 1,000 search posts covering the most recent 26 hours at collection time (about 38 posts an hour), plus the 69 timeline posts the endpoint returned. Collected in 2026. The study used 55 requests and returned 1,069 tweets, which at 15 credits per tweet is 16,035 credits, or about $0.16.

Method. Characters were counted on the post text as returned. Tokens were estimated two ways, DeepSeek's documented character ratio and the cl100k_base tokenizer, because no DeepSeek key was available and nothing was sent to DeepSeek. Costs multiply those estimates by the rates on DeepSeek's Models & Pricing page under the stated job assumptions (non-thinking mode, fixed prompts, fixed output lengths).

What the sample cannot show. It is one topic over about one day, so its language mix and length distribution are specific to DeepSeek chatter; your feed will differ. The estimates are not DeepSeek's tokenizer output and ignore message-format overhead per request. Cache hit rates are best-effort on DeepSeek's side and may be lower than modeled. Timeline view counts are a snapshot and keep growing; the timeline endpoint did not return the account's full history.

Privacy. Aggregates only. Search posts come from private individuals: their raw pages were kept out of the repository, and the published sample holds only language, length, token estimates and engagement counts, with no IDs, text, links or handles. Only the @deepseek_ai organization account is named.

python
import os
import requests

TW_BASE = "https://api.twitterapi.io"
TW_HEADERS = {"X-API-Key": os.environ["TWITTERAPI_IO_KEY"]}
DS_URL = "https://api.deepseek.com/chat/completions"
DS_HEADERS = {"Authorization": f"Bearer {os.environ['DEEPSEEK_API_KEY']}",
              "Content-Type": "application/json"}

SYSTEM = (
    "You label X posts for a product team. Return JSON only: "
    '{"topic": "pricing|benchmark|coding|release|complaint|other", '
    '"sentiment": "positive|neutral|negative", "mentions_price": true|false}'
)


def fetch_posts(query, max_pages=5):
    """Pull recent posts with advanced_search; 20 per page, follow next_cursor."""
    posts, cursor = [], ""
    for _ in range(max_pages):
        r = requests.get(
            f"{TW_BASE}/twitter/tweet/advanced_search",
            headers=TW_HEADERS,
            params={"query": query, "queryType": "Latest", "cursor": cursor},
            timeout=30,
        )
        r.raise_for_status()
        data = r.json()
        posts.extend(data.get("tweets", []))
        if not data.get("has_next_page"):
            break
        cursor = data.get("next_cursor", "")
    return posts


def label(text):
    """One deepseek-flash call in non-thinking mode with JSON Output."""
    body = {
        "model": "deepseek-flash",
        "messages": [
            {"role": "system", "content": SYSTEM},  # identical prefix -> cache hits
            {"role": "user", "content": text[:4000]},
        ],
        "thinking": {"type": "disabled"},
        "response_format": {"type": "json_object"},
        "max_tokens": 60,
    }
    r = requests.post(DS_URL, headers=DS_HEADERS, json=body, timeout=60)
    r.raise_for_status()
    out = r.json()  # OpenAI-format chat completion from DeepSeek
    return out["choices"][0]["message"]["content"], out["usage"]


PRICE = {"hit": 0.006, "miss": 0.3, "out": 1.2}  # deepseek-flash PEAK, USD per 1M tokens

if __name__ == "__main__":
    posts = fetch_posts('"deepseek flash" -is:retweet', max_pages=3)
    hit = miss = out_tok = 0
    for p in posts:
        labels, usage = label(p["text"])
        hit += usage.get("prompt_cache_hit_tokens", 0)
        miss += usage.get("prompt_cache_miss_tokens", 0)
        out_tok += usage.get("completion_tokens", 0)
        print(p["createdAt"], p["likeCount"], labels)
    llm_cost = (hit * PRICE["hit"] + miss * PRICE["miss"] + out_tok * PRICE["out"]) / 1e6
    data_cost = len(posts) * 15 / 100_000  # 15 credits per tweet returned
    print(f"{len(posts)} posts | model ${llm_cost:.5f} (peak) | data ${data_cost:.4f}")
10 — Questions

Questions readers ask

What is the model name for DeepSeek V4 Flash in the API?

Use deepseek-flash. DeepSeek's docs list it as served by DeepSeek-V4.1-Flash-1017. The older name deepseek-v4-flash is still accepted, but the original V4 Flash model is retired and those requests go to V4.1-Flash-1017 at the Flash price.

How much does DeepSeek V4 Flash cost per 1M tokens?

On DeepSeek's Models & Pricing page, deepseek-flash costs $0.30 per 1M input tokens on a cache miss at peak ($0.15 off-peak), $0.006 on a cache hit ($0.003 off-peak), and $1.20 per 1M output tokens ($0.60 off-peak). DeepSeek can change prices, so check the page before a large job.

What are DeepSeek's peak and off-peak hours?

Peak is 01:00-04:00 and 06:00-10:00 UTC, Monday through Friday, excluding Chinese public holidays. All other hours, including weekends and those holidays, are off-peak, and off-peak rates are half of peak.

What is the context window of DeepSeek V4 Flash?

The current deepseek-flash model has a 1M-token context length and a maximum output of 384K tokens, according to the pricing page. DeepSeek made 1M context the default with the V4 Preview.

Is DeepSeek V4.1 Flash the same as V4 Flash?

No. V4.1 Flash, released in September 2026, replaced V4 Flash and added native image understanding; the October 17, 2026 build, V4.1-Flash-1017, replaced that again. All three were or are reached through the Flash model name, which is why the search term and the model you get no longer match.

Does thinking mode cost more on DeepSeek?

Usually yes. Thinking is on by default, and the chain of thought is generated output billed at the output rate. For short classification or extraction tasks, disable it with "thinking": {"type": "disabled"} and cap max_tokens.

How much does it cost to analyze tweets with DeepSeek?

In our sample of 1,000 real X posts, an estimated 164 tokens per post put per-post classification with deepseek-flash at about $0.040 per 1,000 posts off-peak and $0.080 at peak. Pulling the posts costs $0.15 per 1,000 on TwitterAPI.io or $5.00 on the official X API pay-per-use card.

Can I use the OpenAI or Anthropic SDK with DeepSeek?

Yes. Set the base URL to https://api.deepseek.com for the OpenAI format or https://api.deepseek.com/anthropic for the Anthropic format, use your DeepSeek key, and set the model to deepseek-flash or deepseek-v4-pro.

11 — Further reading

Continue

Sources & further reading
More from this series
Build it

Stop reading. Start building.

Starter credits cover real testing on real data. Google sign-in, no card, no application queue.

Get an API key

Already building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.