deepseek-v4.1-flash API pricing and access
Run deepseek-v4.1-flash (model ID deepseek-v4.1-flash) through Code By AI for $0.045 per 1M input tokens and $0.18 per 1M output tokens, with no monthly subscription.
What deepseek-v4.1-flash is for
Choose tasks supported by this model’s catalog channel and review its output before use.
Your price
$0.045
per 1M tokens, USD
| Your price | |
|---|---|
| Input | $0.045 |
| Cache read | $0.0009 |
| Output | $0.18 |
What deepseek-v4.1-flash costs in a typical month
On Code By AI, 20M input tokens and 2M output tokens cost $1.26.
How to use deepseek-v4.1-flash
Export OPENAI_BASE_URL=https://www.codebyai.net/api/agent and OPENAI_API_KEY=sk-proj-xxxx, then send OpenAI-compatible Chat Completions requests to /chat/completions with an explicit model ID, and use the model ID deepseek-v4.1-flash. The DeepSeek guide walks through the full configuration.
export OPENAI_BASE_URL="https://www.codebyai.net/api/agent"
export OPENAI_API_KEY="sk-proj-xxxx"
curl "$OPENAI_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "content-type: application/json" \
-d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}'No key yet? Create one
Claude Code, Codex and Gemini CLI compatibility
A client can call deepseek-v4.1-flash only when it speaks the endpoint that serves this model. The table shows what works and the minimum configuration.
- Claude CodeNot applicable
Not applicable: the Anthropic Messages endpoint serves Claude models only.
Open the Claude Code guide - CodexNot applicable
DeepSeek supports Chat Completions (/v1/chat/completions) but not Responses (/v1/responses), which Codex CLI requires. Use an OpenAI-compatible client with the model ID deepseek-v4.1-flash.
Open the Codex guide - Gemini CLINot applicable
Not applicable: the Gemini generateContent endpoint serves the Gemini family only.
Open the Gemini CLI guide
Compare other DeepSeek models
Your price /1M
deepseek-v4.1-flash FAQ
Get started
Four steps to your first request
- 01
Create a free account
Sign up with Google, GitHub or email and set a password. No card is required.
- 02
Generate an API key
Create a key in one click from the dashboard. It lets your CLI authenticate with Code By AI.
- 03
Top up your balance
Add credit before your first request; usage is charged per token from your balance.
- 04
Point your CLI at Code By AI
Export one base-URL variable, or add a model provider block to config.toml. The setup guides list the exact lines for each agent.
No card required to sign up · API usage requires a top-up