GPT Image 2.5 is live — OpenAI's newest image model, targeted edits that leave the rest of the frame alone
rreAPI Docs

deepseek-v4.1-flash

deepseek-v4.1-flash — DeepSeek's V4.1-Flash weights on an OpenAI-compatible /api/v1/chat/completions endpoint at reapi.ai, with a 1M-token context window, a documented 384K max output, vision input, and thinking enabled by default across three effort rungs.

DeepSeek's V4.1-Flash weights, exposed through reAPI as a drop-in OpenAI-compatible Chat Completions endpoint. A 1M-token context window, a documented maximum of 384K output tokens, reasoning_effort across low / high / max with thinking on by default, vision input, JSON output and tool calls. The wire model id is deepseek-v4.1-flash. Current rates live on the model page.

DeepSeek names its current model deepseek-flash and gives its version as DeepSeek-V4.1-Flash. The legacy name deepseek-v4-flash is still accepted by DeepSeek but now served by those same weights. On reAPI the string you send is deepseek-v4.1-flash.

Quick example

curl https://reapi.ai/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [
      { "role": "user", "content": "Summarise this contract and list every clause that shifts liability to the supplier." }
    ],
    "reasoning_effort": "high",
    "max_tokens": 8192,
    "stream": true
  }'
from openai import OpenAI

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

stream = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Summarise this contract and list every clause that shifts liability to the supplier."}],
    reasoning_effort="high",
    max_tokens=8192,
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta.content if chunk.choices else None
    if delta:
        print(delta, end="")
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_API_KEY",
  baseURL: "https://reapi.ai/api/v1",
});

const stream = await client.chat.completions.create({
  model: "deepseek-v4.1-flash",
  messages: [
    { role: "user", content: "Summarise this contract and list every clause that shifts liability to the supplier." },
  ],
  reasoning_effort: "high",
  max_tokens: 8192,
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	body := []byte(`{
		"model": "deepseek-v4.1-flash",
		"messages": [{"role": "user", "content": "Summarise this contract."}],
		"reasoning_effort": "high",
		"max_tokens": 8192
	}`)

	req, _ := http.NewRequest("POST", "https://reapi.ai/api/v1/chat/completions", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	out, _ := io.ReadAll(resp.Body)
	fmt.Println(string(out))
}

Authentication

Every request carries a reAPI key as a bearer token:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Create a key in the dashboard under API keys. The same key reaches every model on the platform, so nothing is provisioned per model.


Endpoint

POST https://reapi.ai/api/v1/chat/completions

OpenAI-compatible Chat Completions. Point an existing OpenAI client at https://reapi.ai/api/v1 and change the model string; nothing else in the call site changes.


Parameter support on this model

Support differs per model on this endpoint. For deepseek-v4.1-flash:

ParameterStatusNotes
max_tokensSupportedOutput cap for this model, reasoning included
reasoning_effortSupportedlow / high / max; other rungs are mapped, not rejected
streamSupportedServer-sent events
response_formatSupportedDeepSeek documents JSON output for these weights
tools / tool_choiceSupportedSee Tool calling below
top_pPartially effectiveIn thinking mode values below 0.95 are raised to 0.95; in non-thinking mode it is fixed at 1.0 and your value is ignored
temperatureIgnored in thinking modeAccepted without error, no effect while thinking is on
presence_penaltyIgnoredAccepted without error, no effect
frequency_penaltyIgnoredAccepted without error, no effect
nNot supportedAbsent from the request surface; accepted in silence
seedNot supportedAbsent from the request surface; accepted in silence

The ignored parameters are accepted rather than rejected, so a request that sets temperature looks like it worked. If output is not varying the way you expect, this table is the reason — steer with prompting and reasoning_effort instead.


Request body

model — string, required

Always deepseek-v4.1-flash.

messages — array, required

Standard OpenAI message array. Each entry has role and content. content is either a plain string or an array of content blocks when you mix text and images.

max_tokens — integer, optional

Upper bound on generated tokens for the response, reasoning included. DeepSeek documents a maximum of 384K output tokens for these weights. Left unset, the endpoint's own default applies — which is far below the ceiling, so raise it explicitly for long jobs.

reasoning_effort — string, optional, default high

low, high or max. See Reasoning effort below.

stream — boolean, default false

When true, tokens arrive as server-sent events terminated by data: [DONE].

response_format — object, optional

Request JSON instead of prose.


Reasoning effort

Thinking is enabled by default at high effort. Three rungs are real:

ValueBehavior
lowShortest chain of thought, lowest latency
highDefault
maxDeepest reasoning, highest output-token cost

DeepSeek publishes a mapping for the other OpenAI rungs rather than rejecting them, so an unsupported value runs quietly as one of the three above:

RequestedActually runs as
minimallow
lowlow
mediumhigh
highhigh
xhighhigh
maxmax
ultramax

Reasoning text is returned in reasoning_content, at the same level as content. Whether you must echo it back on later turns depends on tools — see below.


Image input

DeepSeek documents vision support for these weights. Images travel in the standard OpenAI content-block form:

{
  "model": "deepseek-v4.1-flash",
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "Which metric regressed week over week?" },
        { "type": "image_url", "image_url": { "url": "https://example.com/dashboard.png" } }
      ]
    }
  ]
}
  • Formats: JPEG, PNG, GIF and WebP. The format is detected from the file's actual content, not from its name or declared MIME type.
  • By URL: a public http(s) link, at most 8192 characters, the file at most 32 MiB, and the download must finish within 60 seconds.
  • Inline: a data: URL carrying base64, counted against the request body limit.

Tool calling

tools and tool_choice follow the OpenAI shape. One rule is specific to these weights and easy to miss:

When a request carries tools, the reasoning_content from every previous assistant turn must be passed back in messages — it is concatenated into the context. When the request carries no tools, reasoning_content does not need to be returned and is ignored if you send it.


Pricing dimensions

Billing is per token, from your reAPI credit balance, with separate input, output and cache read rates. Three things to keep in mind:

  • Reasoning tokens bill as output. Thinking is on by default, so this is the usual reason a bill exceeds an estimate built from visible answer length.
  • The rate is flat across context length. There is no long-context tier on this model, so a near-full prompt costs the same per token as a short one.
  • Cache reads bill at their own rate. A repeated prefix is charged at the cache rate rather than the input rate.

Current numbers are on the model page — that table is the canonical source, not this page. The platform constants are 1 credit = $0.001 and $1 = 1,000 credits.


Response shape

Non-streaming (stream: false)

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1789000000,
  "model": "deepseek-v4.1-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "...",
        "reasoning_content": "..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 60,
    "completion_tokens": 244,
    "total_tokens": 304
  }
}

Streaming (stream: true)

Server-sent events of object: "chat.completion.chunk", each carrying a delta. Reasoning arrives as delta.reasoning_content and the answer as delta.content. The stream ends with data: [DONE].


Errors

The envelope is the platform-wide shape:

{ "error": { "code": 40001, "message": "...", "request_id": "req_..." } }
CodeMeaning
40001Invalid parameter value
40401Model not supported on this endpoint
40201Insufficient credits
42901Rate limit exceeded

The full catalog is at /docs/api/errors.


Tips

  • Raise max_tokens deliberately. The 384K ceiling is a maximum, not a default. Long translation and refactor jobs are the whole reason to pick these weights, and they need the cap lifted explicitly.
  • Drop to low before looking for a switch. Reasoning tokens bill as output, so effort is the cost lever on this model.
  • Do not tune temperature. It is ignored while thinking is on and no error tells you so.
  • Put the stable bulk first. Cache reads bill below the input rate, so a fixed prefix followed by the varying question is cheaper than the reverse.
  • Mislabelled images are fine. Format comes from file content, so a .png that is really a JPEG still works.

  • deepseek-v4 — the V4 family page, covering the Pro tier
  • gpt-5-6-luna — the nearest cost-sensitive alternative
  • kimi-k3 — another 1M-context model with always-on reasoning
  • API errors — the full error-code catalog

Table of Contents