Skip to content
NewKimi K3.1 Pro is live
DeepSeek

DeepSeek V4.1 Flash

deepseek-v4.1-flash-1017

The standard DeepSeek V4.1 Flash. Very cheap and quick, for high-volume tasks where cost decides.

Input
Context
1M
Max output
262K
Tool calling
Streaming
Throughput
171 tok/s
Quantization
FP8
Reasoning effort
off, low, high, max
API formats
OpenAI, Anthropic, Responses

Price comparison with other providers

Input / output, per 1M tokens

ModelLibremodelDeepSeekFireworks AITogether AIDeepInfraVeniceFeatherless
DeepSeek V4.1 FlashLibremodelInput: $0.04 / Output: $0.30DeepSeekInput: $0.15 / Output: $0.60+275% more than Libremodel / +100% more than LibremodelFireworks AIInput: $0.30 / Output: $1.20+650% more than Libremodel / +300% more than LibremodelTogether AIInput: $0.30 / Output: $1.20+650% more than Libremodel / +300% more than LibremodelDeepInfraInput: $0.098 / Output: $0.294+145% more than Libremodel / −2% less than LibremodelVeniceInput: $0.30 / Output: $1.20+650% more than Libremodel / +300% more than LibremodelFeatherlessInput: $0.225 / Output: $0.90+463% more than Libremodel / +200% more than Libremodel

Public prices from each provider as of November 28, 2026, per million tokens and before taxes. They may change. See the full comparison

Quickstart

Set it up in your coding agent: copy the instructions and your agent gets it ready, or do it by hand.

  1. 1

    Add Libremodel to your OpenCode config

    Paste it into any coding agent: it sets up OpenCode for you and tells you how to save the key, without writing it in the file.

    Or do it by hand

    • macOS and Linux:~/.config/opencode/opencode.json
    • Windows:%USERPROFILE%\.config\opencode\opencode.json
    {  "$schema": "https://opencode.ai/config.json",  "model": "libremodel/deepseek-v4.1-flash-1017",  "provider": {    "libremodel": {      "npm": "@ai-sdk/openai-compatible",      "name": "Libremodel",      "options": {        "baseURL": "https://api.libremodel.ai/v1",        "apiKey": "{env:LIBREMODEL_API_KEY}"      },      "models": {        "kimi-k3.1-pro-uncensored": {          "name": "Kimi K3.1 Pro Uncensored",          "tool_call": true,          "interleaved": {            "field": "reasoning_content"          },          "modalities": {            "input": [              "text",              "image"            ],            "output": [              "text"            ]          },          "limit": {            "context": 1048576,            "output": 131072          },          "cost": {            "input": 3,            "output": 9,            "cache_read": 0.3          },          "variants": {            "low": {              "reasoningEffort": "low"            },            "high": {              "reasoningEffort": "high"            },            "max": {              "reasoningEffort": "max"            }          }        },        "deepseek-v4.1-flash-1017-uncensored": {          "name": "DeepSeek V4.1 Flash Uncensored",          "tool_call": true,          "interleaved": {            "field": "reasoning_content"          },          "modalities": {            "input": [              "text",              "image"            ],            "output": [              "text"            ]          },          "limit": {            "context": 1048576,            "output": 131072          },          "cost": {            "input": 0.25,            "output": 0.9,            "cache_read": 0.04          },          "variants": {            "off": {              "reasoningEffort": "off"            },            "low": {              "reasoningEffort": "low"            },            "high": {              "reasoningEffort": "high"            },            "max": {              "reasoningEffort": "max"            }          }        },        "glm-5.3-flash-uncensored": {          "name": "GLM 5.3 Flash Uncensored",          "tool_call": true,          "interleaved": {            "field": "reasoning_content"          },          "modalities": {            "input": [              "text",              "image"            ],            "output": [              "text"            ]          },          "limit": {            "context": 1048576,            "output": 131072          },          "cost": {            "input": 0.3,            "output": 1.2,            "cache_read": 0.06          },          "variants": {            "low": {              "reasoningEffort": "low"            },            "high": {              "reasoningEffort": "high"            },            "max": {              "reasoningEffort": "max"            }          }        },        "kimi-k3.1-pro": {          "name": "Kimi K3.1 Pro",          "tool_call": true,          "interleaved": {            "field": "reasoning_content"          },          "modalities": {            "input": [              "text",              "image"            ],            "output": [              "text"            ]          },          "limit": {            "context": 1048576,            "output": 131072          },          "cost": {            "input": 1,            "output": 6,            "cache_read": 0.25          },          "variants": {            "low": {              "reasoningEffort": "low"            },            "high": {              "reasoningEffort": "high"            },            "max": {              "reasoningEffort": "max"            }          }        },        "deepseek-v4.1-flash-1017": {          "name": "DeepSeek V4.1 Flash",          "tool_call": true,          "interleaved": {            "field": "reasoning_content"          },          "modalities": {            "input": [              "text",              "image"            ],            "output": [              "text"            ]          },          "limit": {            "context": 1048576,            "output": 262144          },          "cost": {            "input": 0.04,            "output": 0.3,            "cache_read": 0.004          },          "variants": {            "off": {              "reasoningEffort": "off"            },            "low": {              "reasoningEffort": "low"            },            "high": {              "reasoningEffort": "high"            },            "max": {              "reasoningEffort": "max"            }          }        },        "minimax-m3.1-flash": {          "name": "MiniMax M3.1 Flash",          "tool_call": true,          "interleaved": {            "field": "reasoning_content"          },          "modalities": {            "input": [              "text",              "image"            ],            "output": [              "text"            ]          },          "limit": {            "context": 1048576,            "output": 131072          },          "cost": {            "input": 0.05,            "output": 0.2,            "cache_read": 0.005          },          "variants": {            "low": {              "reasoningEffort": "low"            },            "high": {              "reasoningEffort": "high"            },            "max": {              "reasoningEffort": "max"            }          }        }      }    }  }}

    New file: copy the whole file. Already have one: copy only the highlighted block and paste it in the same place of yours, keeping everything else.

  2. 2

    Connect your key

    The config reads the key from LIBREMODEL_API_KEY, so it never sits in the file. Use a key from your API keys page (it starts with sk-libremodel-) and open a new terminal.

    export LIBREMODEL_API_KEY="sk-libremodel-..."
  3. 3

    Pick the model and say hi

    opencode --model libremodel/deepseek-v4.1-flash-1017

    Send “Say ok.” to check it works. All 6 models are in the config, so you can switch any time.

Or call it from your code

from openai import OpenAI

client = OpenAI(
    base_url="https://api.libremodel.ai/v1",
    api_key="sk-libremodel-...",
)

response = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017",
    messages=[
        {"role": "user", "content": "Hello, Libremodel"},
    ],
)
print(response.choices[0].message.content)

Frequently asked questions

01What is DeepSeek V4.1 Flash?

The standard DeepSeek V4.1 Flash. Very cheap and quick, for high-volume tasks where cost decides.

02How much does DeepSeek V4.1 Flash cost?

DeepSeek V4.1 Flash costs $0.04 per million input tokens and $0.30 per million output tokens, with cached input at $0.004.

03What is the context length of DeepSeek V4.1 Flash?

DeepSeek V4.1 Flash has a context window of 1M tokens and writes up to 262K tokens per response.

04Does DeepSeek V4.1 Flash support tool calling?

Yes. Pass your functions in tools, as with the OpenAI SDK, and DeepSeek V4.1 Flash answers with the calls to make. The tool calling guide has an example.

05What inputs and outputs does DeepSeek V4.1 Flash support?

DeepSeek V4.1 Flash takes text and images, and answers with text.

06Can I set how much DeepSeek V4.1 Flash reasons?

Yes. Set the reasoning effort to off, low, high, max. If the request doesn't set one, it uses high.

Try DeepSeek V4.1 Flash

Create an account, add credit by card, and call it with your own key. You pay per token.

Other models

DeepSeek
Uncensored

DeepSeek V4.1 Flash Uncensored

Fast, cheap, and it answers.

Input
$0.25
Output
$0.90
Cached
$0.04

$ per 1M tokens

deepseek-v4.1-flash-1017-uncensored
Moonshot AI
Uncensored

Kimi K3.1 Pro Uncensored

The heavy lifter, without the refusals.

Input
$3.00
Output
$9.00
Cached
$0.30

$ per 1M tokens

kimi-k3.1-pro-uncensored
Z.ai
UncensoredNew

GLM 5.3 Flash Uncensored

GLM for a fraction of the price.

Input
$0.30
Output
$1.20
Cached
$0.06

$ per 1M tokens

glm-5.3-flash-uncensored
Moonshot AI
StandardNew

Kimi K3.1 Pro

The flagship, as its makers shipped it.

Input
$1.00
Output
$6.00
Cached
$0.25

$ per 1M tokens

kimi-k3.1-pro
MiniMax
Standard

MiniMax M3.1 Flash

Agents and code, for cents.

Input
$0.05
Output
$0.20
Cached
$0.005

$ per 1M tokens

minimax-m3.1-flash