deepseek-chat-v3.1· Released Aug 21, 2025
deepseek/deepseek-chat-v3.1
DeepSeek-V3.1 is a large hybrid reasoning model (671B parameters, 37B active) that supports both thinking and non-thinking modes via prompt templates. It extends the DeepSeek-V3 base with a two-phase long-context...
Input
From$0.5166/M
Output
From$1.5489/M
Context
Up to 164K
Max output
Up to 33K
Modalities
TextTextInput and output show the lowest price across upstreams, for reference. Your actual prices are listed per upstream below.
Upstreams & pricing
| Upstream | Context | Max output | Input $/1M | Output $/1M | Cached input $/1M | Data policy |
|---|---|---|---|---|---|---|
Zenlayer AI Gateway-openai_compat/GlobalFrom price | 164K | 33K | $0.5166 | $1.5489 | $0.5166 | — |
Routed in real time — you pay the listed price of whichever upstream serves your call. Data policies reflect each upstream's own data terms and its agreement with us. We do not independently audit upstream implementations.
How to call
bashrequest.sh
curl https://api.lune.io/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-chat-v3.1",
"messages": [
{"role": "user", "content": "Say hello in five words."}
]
}'pythonrequest.py
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["API_KEY"],
base_url="https://api.lune.io/v1",
)
resp = client.chat.completions.create(
model="deepseek/deepseek-chat-v3.1",
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(resp.choices[0].message.content)tsrequest.ts
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.API_KEY,
baseURL: "https://api.lune.io/v1",
});
const resp = await client.chat.completions.create({
model: "deepseek/deepseek-chat-v3.1",
messages: [{ role: "user", content: "Say hello in five words." }],
});
console.log(resp.choices[0].message.content);gomain.go
package main
import (
"context"
"fmt"
"os"
"github.com/sashabaranov/go-openai"
)
func main() {
cfg := openai.DefaultConfig(os.Getenv("API_KEY"))
cfg.BaseURL = "https://api.lune.io/v1"
client := openai.NewClientWithConfig(cfg)
resp, err := client.CreateChatCompletion(
context.Background(),
openai.ChatCompletionRequest{
Model: "deepseek/deepseek-chat-v3.1",
Messages: []openai.ChatCompletionMessage{
{Role: "user", Content: "Say hello in five words."},
},
},
)
if err != nil {
panic(err)
}
fmt.Println(resp.Choices[0].Message.Content)
}