GPT 2.6, Veo 3.1, Seedance 2.5, Kling 4 in deAPI!
Web-search and web-contents are now available via API
Browse all Models
Browse all
Browse all
Browse all

LLM · Vision

DeepSeek V4.1 Flash API, free to try

DeepSeek V4.1 Flash is an open-weight large language model from DeepSeek that can reason. It reads text and images and holds up to 1M tokens of context. deAPI serves it on an OpenAI-compatible endpoint, so the OpenAI SDK works once you change the base URL, the key and the model ID.

  • Text and images in, a 1,048,576-token context window
  • JSON schema output, tool calls and streaming
  • reasoning_effort in seven levels, from none to max

No credit card · Free credits valid for 30 days · Then top up and pay as you go, no subscription

DeepSeek V4.1 Flash LLM · Vision

model: "deepseek-v4.1-flash:economy"
reasoning_effort: "high"

system: You are a senior Python engineer. Explain in two sentences, then give the fixed function.

user

Why does this print [1] and then [1, 2]?

def add(x, items=[]):
    items.append(x)
    return items

print(add(1))
print(add(2))
assistant reasoning_content · 113 tokens

The default list [] is created once when the function is defined and reused across calls, so the second call modifies the same list returned by the first call. That’s why it prints [1] and then [1, 2].

def add(x, items=None):
    if items is None:
        items = []
    items.append(x)
    return items
91 input + 198 output tokens (113 reasoning) · 3.5 s Cost on deAPI: $0.00012 (price as of November 2026)

DeepSeek V4.1 Flash use cases

Four jobs where the model fits, each with the number behind it. All of them run on the same deAPI key as transcription, OCR and image generation.

  1. Invoices, receipts and forms. Send a photo or scan as image_url with a JSON schema. On the generated German invoice below it returned all 10 fields in 5.8 seconds (one run), with dates in ISO format and amounts as numbers. DeepSeek reports 95.6 on DocVQA (4-shot) for the base model.

  2. Coding agents. At max reasoning effort DeepSeek reports 74.2% resolved on DeepSWE v1.1 (mini-SWE harness) and 90.6% on Terminal-Bench 2.1 (DeepSeek’s own harness). Coding tools that speak the OpenAI Chat Completions API can point at https://oai.deapi.ai/v1.

  3. Long transcripts and documents. The context window holds 1,048,576 tokens, prompt and answer together, and one answer can run to 393,216. Transcribe a day of sales calls with WhisperLargeV3Ct2 and ask for objections, follow-ups and quotes in one request.

  4. Agents that call deAPI. Describe deAPI endpoints as tools. Asked for chapters of a YouTube video, the model first called transcribe_video with include_ts: true. Your code runs that call and sends the transcript back.

German invoice from Nordlicht Studio GmbH with three line items and a total of 2,677.50 EUR
Response: message.content
{
  "invoice_number": "NS-2026-0418",
  "issue_date": "2026-11-03",
  "due_date": "2026-11-17",
  "seller": "Nordlicht Studio GmbH",
  "seller_vat_id": "DE298765431",
  "net": 2250.00,
  "vat": 427.50,
  "total": 2677.50,
  "currency": "EUR",
  "iban": "DE44 1001 0010 0123 4567 89"
}
Invoice example: image in, JSON out System: “Extract invoice fields. Dates as YYYY-MM-DD, amounts as numbers.” User: “Extract the fields from this invoice.” JSON schema with 10 fields, temperature 0. 782 input + 355 output tokens, 5.8 s on the first call.

DeepSeek V4.1 Flash API pricing

You pay per token from the same prepaid balance as every other deAPI model. Reasoning tokens are part of completion_tokens in usage. No subscription.

Input (text and images) $0.132 ≈ 37M tokens
Cached input (repeated prompt prefix) $0.0026 ≈ 1,923M tokens
Output (answer and reasoning) $0.528 ≈ 9.4M tokens
Question in the hero, one call $0.00012 ≈ 42,000 calls
Invoice example, one call $0.00029 ≈ 17,000 calls

What the free account includes

  • $5 of credits once you add a payment card
  • About 17,000 calls like the invoice example
  • Credits valid for 30 days, then top up and pay as you go
Get $5 credits

Prices for deepseek-v4.1-flash:economy in USD, November 2026. Token counts from the hero question and the invoice example. Context and output limits from GET https://oai.deapi.ai/v1/models.

DeepSeek V4.1 Flash vs Qwen3.8 Flash vs Kimi K3

Input Text, image Text, image Text, image
Context 1,048,576 tokens 1,000,000 tokens 1,000,000 tokens
Max output 393,216 tokens 131,072 tokens 131,072 tokens
reasoning_effort none to max, 7 levels none to max, 7 levels none to max, 7 levels
Invoice example: input tokens 782 1,108 1,426
Invoice example: fields correct 10 of 10 10 of 10 10 of 10 (IBAN without spaces)
Price per 1M, input / output $0.132 / $0.528 $0.165 / $0.517 $3.30 / $16.50

Two calls per model in one session on 9 November 2026: same image, prompt and JSON schema, temperature 0. Response times are not listed because they varied about twofold between identical calls. Limits from GET /v1/models.

DeepSeek V4.1 Flash API example

One POST to https://oai.deapi.ai/v1/chat/completions with your deAPI key as the Bearer token. In the OpenAI SDK, set base_url, your deAPI key and the model ID; the rest of a Chat Completions call stays the same. Replace YOUR_API_KEY with a key from your dashboard.

Model ID
deepseek-v4.1-flash:economy
Endpoint
POST https://oai.deapi.ai/v1/chat/completions
Input
Text and images as image_url parts: a base64 data URL or a public HTTPS link. PDFs and audio are rejected.
Context and output
1,048,576-token context window (prompt and answer together), up to 393,216 tokens per answer
Reasoning
reasoning_effort: none, minimal, low, medium, high, xhigh or max. The reasoning comes back in reasoning_content.
Output options
response_format with json_schema (strict) or json_object, tools, stream
curl https://oai.deapi.ai/v1/chat/completions \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "deepseek-v4.1-flash:economy",
    "reasoning_effort": "low",
    "messages": [
      {"role": "system", "content": "Sort support tickets. Reply with one word: billing, bug, feature or other."},
      {"role": "user", "content": "I was charged twice for the November top-up."}
    ]
  }'
import base64, json
from openai import OpenAI

client = OpenAI(base_url="https://oai.deapi.ai/v1", api_key="YOUR_API_KEY")

with open("invoice.png", "rb") as f:
    image = "data:image/png;base64," + base64.b64encode(f.read()).decode()

schema = {
    "type": "object",
    "additionalProperties": False,
    "required": ["invoice_number", "issue_date", "due_date", "seller",
                 "seller_vat_id", "net", "vat", "total", "currency", "iban"],
    "properties": {
        "invoice_number": {"type": "string"},
        "issue_date": {"type": "string"},
        "due_date": {"type": "string"},
        "seller": {"type": "string"},
        "seller_vat_id": {"type": "string"},
        "net": {"type": "number"},
        "vat": {"type": "number"},
        "total": {"type": "number"},
        "currency": {"type": "string"},
        "iban": {"type": "string"},
    },
}

response = client.chat.completions.create(
    model="deepseek-v4.1-flash:economy",
    temperature=0,
    messages=[
        {"role": "system", "content": "Extract invoice fields. "
         "Dates as YYYY-MM-DD, amounts as numbers."},
        {"role": "user", "content": [
            {"type": "text", "text": "Extract the fields from this invoice."},
            {"type": "image_url", "image_url": {"url": image}},
        ]},
    ],
    response_format={"type": "json_schema",
                     "json_schema": {"name": "invoice", "strict": True, "schema": schema}},
)

invoice = json.loads(response.choices[0].message.content)
print(invoice["total"], invoice["currency"])  # 2677.5 EUR
print(response.usage)

What is DeepSeek V4.1 Flash?

DeepSeek V4.1 Flash is an open-weight Mixture-of-Experts model that DeepSeek publishes under the MIT license. It has 552B backbone parameters and uses 8B of them per token while reading the prompt and 16B while writing. It reads text and images, writes text, and can reason before it answers. On deAPI you call it like any OpenAI chat model and pay per token.

  1. Create a free account

    Sign up and get $5 of credits.

  2. Point your client at deAPI

    Set base_url to https://oai.deapi.ai/v1 and use your deAPI key.

  3. Send the request

    Use deepseek-v4.1-flash:economy as the model and read the answer from choices[0].message.content.

DeepSeek V4.1 Flash FAQ

Yes. deAPI serves it at https://oai.deapi.ai/v1 under the model ID deepseek-v4.1-flash:economy, with the request and response format of the OpenAI Chat Completions API. If you already call the model through an OpenAI-compatible client, you change three values in most code: base_url, the API key and the model. Run your own tests before you switch traffic.
A new deAPI account gets $5 of credits once you add a payment card, enough for about 17,000 calls like the invoice example on this page. The credits are valid for 30 days. After that you top up and pay as you go, with no subscription.
$0.132 per million input tokens and $0.528 per million output tokens (November 2026). Reasoning tokens count as output, and you see them in usage.completion_tokens_details.reasoning_tokens.
Yes. Add an image_url part to the user message, as a base64 data URL or a public HTTPS link. PDFs and audio files are rejected: run PDFs through the OCR API or send pages as images, and transcribe audio first.
On deAPI the context window is 1,048,576 tokens, prompt and answer together, and one answer can be up to 393,216 tokens long. A larger max_tokens is rejected with an error.
DeepSeek’s model card, at max reasoning effort: 90.9 on GPQA Diamond, 74.2% resolved on DeepSWE v1.1, 90.6% on Terminal-Bench 2.1 and a Codeforces rating of 3471. For images, the base model scores 95.6 on DocVQA and 56.5 on MMMU-Pro (both 4-shot). These are DeepSeek’s numbers; test it on your own data with the free credits.
Set reasoning_effort to none. On the ticket request from the cURL example, none answered “billing” with 2 output tokens. high gave the same answer with 21 output tokens, 18 of them reasoning (one run each). The levels in between are minimal, low and medium; above high come xhigh and max.
DeepSeek publishes the weights on Hugging Face under the MIT license, which allows commercial use. Calls through deAPI are also covered by the deAPI Terms of Service.

Send your first DeepSeek V4.1 Flash request with $5 of free credits

Sign up with e-mail or Google. No subscription, pay as you go.