DeepSeek Chat v3.1 (Free)
Chat CompletionsDeepSeek-V3.1 is a 671B-parameter hybrid reasoning model (37B active), supporting both "thinking" and "non-thinking" modes via prompt templates. It extends DeepSeek-V3 with two-phase long-context training (up to 128K tokens) and uses FP8 microscaling for efficient inference. The model excels in tool use, code generation, and reasoning, with performance comparable to DeepSeek-R1 but with faster responses. It supports structured tool calling, code agents, and search agents, making it ideal for research and agentic workflows. Successor to DeepSeek V3-0324, it delivers strong performance across diverse tasks.
Code Example
Example code for using this model through our API with Python (OpenAI SDK) or cURL. Replace placeholders with your API key and model ID.
Basic request example. Ensure API key permissions. For more details, see our documentation.
from openai import OpenAI
client = OpenAI(
base_url="https://api.naga.ac/v1",
api_key="YOUR_API_KEY",
)
resp = client.chat.completions.create(
model="deepseek-chat-v3.1:free",
messages=[
{{"role": "user", "content": "What's 2+2?"}}
],
temperature=0.2,
)
print(resp.choices[0].message.content)