DeepSeekReasoning Model
DeepSeek V4.1 Flash 1017
The October 2026 checkpoint of DeepSeek V4.1 Flash: the same 552B-parameter multimodal Mixture-of-Experts, with stronger reasoning, coding, agentic, and visual results and shorter outputs that finish tasks faster at lower cost. Image input, tool calling, and a controllable reasoning-effort dial.
import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://api.inference.net/v1",
apiKey: "<YOUR_API_KEY>",
});
const completion = await openai.chat.completions.create({
model: "deepseek-v4.1-flash-1017",
messages: [
{
role: "user",
content: "What is the meaning of life?"
}
],
stream: true,
});
for await (const chunk of completion) {
process.stdout.write(chunk.choices[0]?.delta.content as string);
}import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://api.inference.net/v1",
apiKey: "<YOUR_API_KEY>",
});
const completion = await openai.chat.completions.create({
model: "deepseek-v4.1-flash-1017",
messages: [
{
role: "user",
content: "What is the meaning of life?"
}
],
stream: true,
});
for await (const chunk of completion) {
process.stdout.write(chunk.choices[0]?.delta.content as string);
}Prompt caching
- Keep the prompt prefix stable and byte-identical across calls.
- Do not send prompt_cache_key. These routes do not support it and may reject the request.
- Check usage.prompt_tokens_details.cached_tokens in the response to confirm cache reads.