---
title: Deepseek V3.1 API | Text Generation | ModelsLab
description: Build with Deepseek V3.1 API by Deepseek Ai. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/deepseek-ai/deepseek-ai-DeepSeek-V3.1.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/deepseek-ai/deepseek-ai-DeepSeek-V3.1.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-13T08:43:17.392337Z
---

Deepseek V3.1
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/deepseek-ai-DeepSeek-V3.1/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/deepseek-ai/deepseek-ai-DeepSeek-V3.1.md)

deepseek-ai-DeepSeek-V3.1 deepseek-ai Closed Source Model $1.150000 / call

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 V3.1

deepseek-ai deepseek-ai-DeepSeek-V3.1

Copy model ID

PricingInput $0.60 / 1M tokens

Output $1.70 / 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)

[Q3](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3.6-35B-A3B-FP8)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen3.6 35B A3b Fp8

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen3.6-35B-A3B-FP8)

[KK](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/kwaipilot-kat-coder-pro-v2)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Kwaipilot: KAT-Coder-Pro V2

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/kwaipilot-kat-coder-pro-v2)

[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)

[![Gemini 2.5 Flash](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/4fc6b09e-c7ae-4301-aed1-0b180b88157b.png)](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/google/gemini-2.5-flash)[Google](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/google)

 [Gemini 2.5 Flash

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/google/gemini-2.5-flash)

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

 [Meta Llama 3 70B Instruct Turbo

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

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-medium-3.1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Mistral: Mistral Medium 3.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-medium-3.1)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud/qwen-qwen3.5-397b-a17b)[Alibaba](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud)

 [Qwen: Qwen3.5 397B A17B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud/qwen-qwen3.5-397b-a17b)

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

 [Meta Llama 3.1 70B Instruct Turbo

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

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3.5-plus-02-15)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3.5 Plus 2026-02-15

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3.5-plus-02-15)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-Llama-3-8b-chat-hf)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Meta Llama 3 8B Instruct Reference

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-Llama-3-8b-chat-hf)

[ZG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-5.1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Z.ai: GLM 5.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-5.1)

[Q7](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-7B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen2.5 7B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-7B)

[TD](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/alibaba-tongyi-deepresearch-30b-a3b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Tongyi DeepResearch 30B A3B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/alibaba-tongyi-deepresearch-30b-a3b)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-7b-instruct-v0.1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Mistral: Mistral 7B Instruct v0.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-7b-instruct-v0.1)

[AC](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-3-haiku)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Anthropic: Claude 3 Haiku

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-3-haiku)

[LL](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/liquid-lfm-2.5-1.2b-instruct-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [LiquidAI: LFM2.5-1.2B-Instruct (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/liquid-lfm-2.5-1.2b-instruct-free)

[G4](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/zai-org-GLM-4.5V)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [GLM 4.5V

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/zai-org-GLM-4.5V)

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

 [OpenAI: GPT-5.1-Codex

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

About Deepseek V3.1
---

Deepseek V3.1 is a text generation AI model by Deepseek Ai available on ModelsLab. Access Deepseek V3.1 through our API with pay-per-use pricing and no minimum commitments.

### Technical Specifications

Model IDdeepseek-ai-DeepSeek-V3.1CategoryLLM ModelsTaskText GenerationPrice$1.150000 per million tokensAddedApril 4, 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 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-ai-DeepSeek-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-ai/deepseek-ai-DeepSeek-V3.1/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

Deepseek V3.1 API costs $1.150000 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 Ai](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 V3.1 FAQ
---

### What is Deepseek V3.1?

Deepseek V3.1 is a text generation AI model by Deepseek Ai available on ModelsLab. Access it through our API with pay-per-use pricing and no minimum commitments.

### How do I use the Deepseek V3.1 API?

You can integrate 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-ai-DeepSeek-V3.1" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does Deepseek V3.1 cost?

Deepseek V3.1 costs $1.150000 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 V3.1 model ID?

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

### Does Deepseek V3.1 have a free tier?

Yes, ModelsLab offers a free tier that lets you try 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*