---
title: DeepSeek: DeepSeek V3.1 API | Text Generation | ModelsLab
description: Powerful 671B MoE LLM (37B active) with 128K context, hybrid thinking/non-thinking modes, advanced tool calling, and superior coding/reasoning for agents.
url: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/deepseek/deepseek-deepseek-chat-v3.1/api.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/deepseek/deepseek-deepseek-chat-v3.1/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-13T09:42:55.316398Z
---

DeepSeek: DeepSeek V3.1
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-chat-v3.1/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/deepseek/deepseek-deepseek-chat-v3.1.md)

deepseek-deepseek-chat-v3.1 deepseek Closed Source Model $0.500000 / call

DeepSeek: DeepSeek V3.1
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### DeepSeek: DeepSeek V3.1

deepseek deepseek-deepseek-chat-v3.1

Copy model ID

PricingInput $0.21 / 1M tokens

Output $0.79 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster)

[DR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [DeepSeek R1 Distill Qwen 14B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.1-chat)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-5.1 Chat

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.1-chat)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-3.3-70b-instruct-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Meta: Llama 3.3 70B Instruct (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-3.3-70b-instruct-free)

[AO](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/allenai-olmo-3-32b-think)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [AllenAI: Olmo 3 32B Think

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/allenai-olmo-3-32b-think)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/meta-llama-Meta-Llama-3-8B-Instruct)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Meta Llama 3 8B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/meta-llama-Meta-Llama-3-8B-Instruct)

[MS](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/mistralai-Magistral-Small-2506)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Magistral Small 2506

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/mistralai-Magistral-Small-2506)

[TH](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/tencent-hy3-preview)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Tencent: Hy3 preview

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/tencent-hy3-preview)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/morph-morph-v3-large)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Morph: Morph V3 Large

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/morph-morph-v3-large)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-235b-a22b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3 235B A22B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-235b-a22b)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-oss-120b-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: gpt-oss-120b (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-oss-120b-free)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/MiniMaxAI-MiniMax-M1-80k)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Minimax M1 80K

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/MiniMaxAI-MiniMax-M1-80k)

[G4](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-4-E2B-it)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Gemma 4 E2B-it

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-4-E2B-it)

[AN](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/amazon-nova-2-lite-v1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Amazon: Nova 2 Lite

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/amazon-nova-2-lite-v1)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mixtral-8x22b-instruct)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Mistral: Mixtral 8x22B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mixtral-8x22b-instruct)

[XG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/x-ai-grok-code-fast-1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [xAI: Grok Code Fast 1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/x-ai-grok-code-fast-1)

[DR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-r1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [DeepSeek: R1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-r1)

[L3](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/meta-llama-Llama-3.2-1B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Llama 3.2 1B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/meta-llama-Llama-3.2-1B)

[R1](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/perplexity_ai/perplexity-ai-r1-1776)[ModelsLab](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/perplexity_ai)

 [R1 1776

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/perplexity_ai/perplexity-ai-r1-1776)

About DeepSeek: DeepSeek 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...

### Technical Specifications

Model IDdeepseek-deepseek-chat-v3.1CategoryLLM ModelsTaskText GenerationPrice$0.500000 per million tokensAddedFebruary 20, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate DeepSeek: DeepSeek V3.1 into your application with a single API call. Get your API key from the [pricing page](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "deepseek-deepseek-chat-v3.1",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/deepseek/deepseek-deepseek-chat-v3.1/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

DeepSeek: DeepSeek V3.1 API costs $0.500000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Deepseek](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

DeepSeek: DeepSeek V3.1 FAQ
---

### What is DeepSeek: DeepSeek 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...

### How do I use the DeepSeek: DeepSeek V3.1 API?

You can integrate DeepSeek: DeepSeek V3.1 into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "deepseek-deepseek-chat-v3.1" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does DeepSeek: DeepSeek V3.1 cost?

DeepSeek: DeepSeek V3.1 costs $0.500000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the DeepSeek: DeepSeek V3.1 model ID?

The model ID for DeepSeek: DeepSeek V3.1 is "deepseek-deepseek-chat-v3.1". Use this ID in your API requests to specify this model.

### Does DeepSeek: DeepSeek V3.1 have a free tier?

Yes, ModelsLab offers a free tier that lets you try DeepSeek: DeepSeek V3.1 and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-05-13*