Models/DeepSeek V4.1 Flash 1017 HQ

Model

DeepSeek V4.1 Flash 1017 HQ

DeepSeekdeepseek-v4.1-flash-1017-hq

DeepSeek V4.1 Flash 1017 HQ from DeepSeek: 1M context, $0.125 per million input tokens, image input, reasoning. One key, one balance, both wire formats.

Context
1M
1,000,000 tokens
Speed
188
tokens / second, measured
Input
$0.125
per 1M tokens
Output
$0.2
per 1M tokens

Price per 1M tokens

Line itemPriceNotes
Input$0.125Prompt tokens sent to the model.
Cached input$0.0165Prompt tokens served from the provider cache.
Output$0.2Generated tokens, hidden reasoning included.

Charged from your prepaid balance when the request ends. See Billing for the arithmetic and the 402 rule.

Call DeepSeek V4.1 Flash 1017 HQ

OpenAI format · curl

curl https://api.mafiallm.com/v1/chat/completions \
  -H "Authorization: Bearer $MAFIA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4.1-flash-1017-hq","messages":[{"role":"user","content":"Hello"}]}'

OpenAI format · Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.mafiallm.com/v1", api_key=os.environ["MAFIA_KEY"])
reply = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-hq",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

Anthropic format · curl

curl https://api.mafiallm.com/anthropic/v1/messages \
  -H "x-api-key: $MAFIA_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4.1-flash-1017-hq","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'

Full request and response shapes: OpenAI format and Anthropic format. The same key and balance work in both.

Limits and features

Context window1,000,000 tokens
Max outputPer request limit set by the provider
Image inputYes
ReasoningYes
Open weightsNo
ModerationStandard provider policy

Other DeepSeek models

FAQ

How much does DeepSeek V4.1 Flash 1017 HQ cost?

$0.125 per million input tokens, $0.2 per million output tokens, and $0.0165 per million cached input tokens. You pay per token from a prepaid balance.

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

1,000,000 tokens. The maximum output per request is set by the provider.

Which API formats work with DeepSeek V4.1 Flash 1017 HQ?

Both. Use deepseek-v4.1-flash-1017-hq as the model id with the OpenAI Chat Completions API at https://api.mafiallm.com/v1 or the Anthropic Messages API at https://api.mafiallm.com/anthropic.

Is there a free tier?

No free tier. Create an account, add credit in crypto (minimum $5) and pay only for the tokens you use.

Start with DeepSeek V4.1 Flash 1017 HQ

Create an account, generate a key and send your first request in a few minutes. No KYC, no card, no subscription.