APIMart
Back to all models

DeepSeek V4.1 Flash API

DeepSeekModel ID deepseek-v4.1-flashText modelReleased September 10, 2026

Use DeepSeek V4.1 Flash to build a small tool from a one-paragraph description, turn a screenshot of a page into working HTML, or run the many tool-calling steps of an agent at low cost.

Max input
1,000,000 tokens
Max output
393,216 tokens
Input → output
Text, Image → Text
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

DeepSeek V4.1 Flash API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on DeepSeek V4.1 Flash.

Try DeepSeek V4.1 Flash with your own material

Building a small project from a description

Describe the tool you want in a paragraph, and have DeepSeek V4.1 Flash plan the files, write them and say how to run it. Run the result yourself and paste back any error instead of describing it.

Example: Can you build a CSV deduplication tool from this spec?

Material

Request
Input: contacts.csv with columns name, email, city. Emails may differ only in upper and lower case.

PromptWrite a command-line tool that removes duplicate rows from a CSV file by the email column, keeps the first occurrence, and prints how many rows it removed. List the files and how to run it.

Sample answer · written by hand to show the reasoning

One file, dedupe.py. It reads contacts.csv, lower-cases each email before comparing so [email protected] and [email protected] count as the same person, keeps the first row for each email, writes contacts.deduped.csv and prints the number of rows removed. Run it with: python dedupe.py contacts.csv.

About the DeepSeek V4.1 Flash API

  • Ahead of V4 Pro, per DeepSeek

    DeepSeek says tests by multiple parties put V4.1 Flash ahead of V4 Pro on performance, cost, speed and total runtime. It is the smallest model in the new architecture family, and its weights are openly available.

  • Thinking on by default, three effort levels

    DeepSeek V4.1 Flash thinks before answering unless you turn thinking off. Effort can be low, high (the default) or max; use non-thinking mode for the fastest replies on simple requests.

  • Reads images natively

    Visual understanding is built into the model, so a request can include screenshots, charts and scanned pages alongside text. The reply is text, and JSON output and tool calls are supported.

  • DeepSeek V4.1 Flash API key and access

    You don’t need a separate DeepSeek V4.1 Flash API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint with the model ID deepseek-v4.1-flash.

DeepSeek V4.1 Flash official benchmark results

Selected results DeepSeek published at launch.

  • DeepSWE v1.1

    77.0

    Long-horizon software engineering tasks solved by an agent, run with the Mini-SWE-V2 framework. The September release scored 74.2.

  • Terminal-Bench 4.0

    42.3

    Coding tasks completed in a terminal, run with the Claude Code framework. The September release scored 31.2.

  • Automation-Bench v1.0.6

    60.5

    Business process automation. The September release scored 54.8.

  • Agents' Last Exam

    35.4

    Long, multi-step professional tasks. The September release scored 31.8.

  • Chartography (with tools)

    83.0

    Reading and understanding charts. The September release scored 78.9.

  • Humanity's Last Exam (no tools)

    42.6

    Hard questions across many disciplines. The September release scored 36.8.

How to call the DeepSeek V4.1 Flash API

To call DeepSeek V4.1 Flash, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "deepseek-v4.1-flash",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

DeepSeek V4.1 Flash access details

Model IDdeepseek-v4.1-flash
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

DeepSeek V4.1 Flash API request parameters

DeepSeek V4.1 Flash uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use deepseek-v4.1-flash for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

DeepSeek V4.1 Flash API pricing

The DeepSeek V4.1 Flash API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input2.2857Credits~$0.22862.1714Credits~$0.21712.0571Credits~$0.20572.8571Credits~$0.285720%
Cached input0.0453Credits~$0.00450.043Credits~$0.00430.0408Credits~$0.00410.0566Credits~$0.005720%
Output9.1429Credits~$0.91438.6857Credits~$0.86868.2286Credits~$0.822911.4286Credits~$1.142920%

Prices are for reference only. View full pricing

Why call DeepSeek V4.1 Flash API through APIMart

  • 20% below official pricing

    DeepSeek V4.1 Flash API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below DeepSeek's official prices, and cached input costs just $0.0045 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    DeepSeek V4.1 Flash, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try DeepSeek V4.1 Flash with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

DeepSeek V4.1 Flash FAQ

Which model ID should I use when moving from DeepSeek’s API to APIMart?

On APIMart, set model to deepseek-v4.1-flash. DeepSeek’s own API calls the same model deepseek-flash, so code written for DeepSeek’s endpoint needs the model parameter changed along with base_url and your APIMart API key.

How is DeepSeek V4.1 Flash different from DeepSeek V4 Pro?

DeepSeek says tests by multiple parties put V4.1 Flash ahead of V4 Pro on performance, cost, speed and total runtime, and V4.1 Flash adds image input, which V4 Pro does not support. V4 Pro is still available. On APIMart both share one endpoint and API key; you only change the model parameter.

How do I set the thinking effort on DeepSeek V4.1 Flash?

Thinking is on by default at high effort. According to DeepSeek’s docs, reasoning_effort accepts low, high and max, and sending thinking with type disabled turns thinking off. In thinking mode, temperature, presence_penalty and frequency_penalty are accepted but have no effect.

Is the DeepSeek V4.1 Flash max output 384K or 393,216 tokens?

They are the same limit written two ways. DeepSeek’s docs list the maximum output as 384K tokens, counting 1K as 1,024, which is 393,216 tokens; this page shows 393,216.

Does DeepSeek V4.1 Flash support image input?

Yes. DeepSeek lists vision as supported for deepseek-flash, which serves V4.1-Flash-1017. On APIMart, use deepseek-v4.1-flash and send the image with your prompt; the model returns text.

When was DeepSeek V4.1 Flash released?

DeepSeek released DeepSeek V4.1 Flash on September 10, 2026 and upgraded it to DeepSeek-V4.1-Flash-1017 on October 17, 2026, with openly available weights. On APIMart it is available under the model ID deepseek-v4.1-flash.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select DeepSeek V4.1 Flash in the text category to start exploring.

Which model ID does the DeepSeek V4.1 Flash API use?

Set model to deepseek-v4.1-flash. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of DeepSeek V4.1 Flash?

On APIMart, DeepSeek V4.1 Flash accepts up to 1,000,000 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

DeepSeek V4.1 Flash can output up to 393,216 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the DeepSeek V4.1 Flash API cost?

The DeepSeek V4.1 Flash API on APIMart is billed by token, and prices depend on your membership tier. Gold: $0.2286 per million input tokens and $0.9143 per million output tokens. Diamond: $0.2057 per million input tokens and $0.8229 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.