---
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.com/models/deepseek-ai/deepseek-ai-DeepSeek-V3.1/api.md
canonical: https://modelslab.com/models/deepseek-ai/deepseek-ai-DeepSeek-V3.1/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-04-15T02:08:20.377244Z
---

Deepseek V3.1
---

 [LLMs.txt](https://modelslab.com/models/together_ai/deepseek-ai-DeepSeek-V3.1/llms.txt) [.md](https://modelslab.com/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.com/models?feature=llmaster)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3-235b-a22b-thinking-2507)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 235B A22B Thinking 2507

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3-235b-a22b-thinking-2507)

[NH](https://modelslab.com/models/open_router/nousresearch-hermes-2-pro-llama-3-8b)[Open Router](https://modelslab.com/models/open_router)

 [NousResearch: Hermes 2 Pro - Llama-3 8B

Closed Source Model](https://modelslab.com/models/open_router/nousresearch-hermes-2-pro-llama-3-8b)

[GG](https://modelslab.com/models/open_router/google-gemini-2.5-flash-lite-preview-09-2025)[Open Router](https://modelslab.com/models/open_router)

 [Google: Gemini 2.5 Flash Lite Preview 09-2025

Closed Source Model](https://modelslab.com/models/open_router/google-gemini-2.5-flash-lite-preview-09-2025)

[L3](https://modelslab.com/models/meta/nvidia-Llama-3.1-Nemotron-70B-Instruct-HF)[ModelsLab](https://modelslab.com/models/meta)

 [Llama 3.1 Nemotron 70B Instruct HF

Closed Source Model](https://modelslab.com/models/meta/nvidia-Llama-3.1-Nemotron-70B-Instruct-HF)

[![GPT-5.1-Codex-Max](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/3d49b0e2-89a1-409b-ae7b-16ca83a2870e.png)](https://modelslab.com/models/openai/gpt-5.1-codex-max)[Open Ai](https://modelslab.com/models/openai)

 [GPT-5.1-Codex-Max

Closed Source Model](https://modelslab.com/models/openai/gpt-5.1-codex-max)

[DR](https://modelslab.com/models/deepseek/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B)[ModelsLab](https://modelslab.com/models/deepseek)

 [DeepSeek R1 Distill Qwen 14B

Closed Source Model](https://modelslab.com/models/deepseek/deepseek-ai-DeepSeek-R1-Distill-Qwen-14B)

[US](https://modelslab.com/models/open_router/upstage-solar-pro-3)[Open Router](https://modelslab.com/models/open_router)

 [Upstage: Solar Pro 3

Closed Source Model](https://modelslab.com/models/open_router/upstage-solar-pro-3)

[QQ](https://modelslab.com/models/open_router/qwen-qwen2.5-vl-72b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen2.5 VL 72B Instruct

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen2.5-vl-72b-instruct)

[MK](https://modelslab.com/models/open_router/moonshotai-kimi-k2-thinking)[Open Router](https://modelslab.com/models/open_router)

 [MoonshotAI: Kimi K2 Thinking

Closed Source Model](https://modelslab.com/models/open_router/moonshotai-kimi-k2-thinking)

[M8](https://modelslab.com/models/marin/marin-community-marin-8b-instruct)[ModelsLab](https://modelslab.com/models/marin)

 [Marin 8B Instruct

Closed Source Model](https://modelslab.com/models/marin/marin-community-marin-8b-instruct)

[GG](https://modelslab.com/models/open_router/google-gemini-2.0-flash-001)[Open Router](https://modelslab.com/models/open_router)

 [Google: Gemini 2.0 Flash

Closed Source Model](https://modelslab.com/models/open_router/google-gemini-2.0-flash-001)

[PS](https://modelslab.com/models/open_router/perplexity-sonar-reasoning-pro)[Open Router](https://modelslab.com/models/open_router)

 [Perplexity: Sonar Reasoning Pro

Closed Source Model](https://modelslab.com/models/open_router/perplexity-sonar-reasoning-pro)

[G3](https://modelslab.com/models/together_ai/google-gemma-3-4b-it)[Together AI](https://modelslab.com/models/together_ai)

 [Gemma 3 4b it

Closed Source Model](https://modelslab.com/models/together_ai/google-gemma-3-4b-it)

[M(](https://modelslab.com/models/together_ai/mistralai-Mistral-7B-Instruct-v0.1)[Together AI](https://modelslab.com/models/together_ai)

 [Mistral (7B) Instruct v0.1

Closed Source Model](https://modelslab.com/models/together_ai/mistralai-Mistral-7B-Instruct-v0.1)

[ER](https://modelslab.com/models/together_ai/essentialai-rnj-1-instruct)[Together AI](https://modelslab.com/models/together_ai)

 [EssentialAI Rnj-1 Instruct

Closed Source Model](https://modelslab.com/models/together_ai/essentialai-rnj-1-instruct)

[DD](https://modelslab.com/models/open_router/deepseek-deepseek-v3.2)[Open Router](https://modelslab.com/models/open_router)

 [DeepSeek: DeepSeek V3.2

Closed Source Model](https://modelslab.com/models/open_router/deepseek-deepseek-v3.2)

[D1](https://modelslab.com/models/together_ai/agentica-org-DeepCoder-14B-Preview)[Together AI](https://modelslab.com/models/together_ai)

 [Deepcoder 14B Preview

Closed Source Model](https://modelslab.com/models/together_ai/agentica-org-DeepCoder-14B-Preview)

[QQ](https://modelslab.com/models/open_router/qwen-qwen-turbo)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen-Turbo

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen-turbo)

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.com/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.com/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.com/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.com/models?feature=llmaster) [More from Deepseek Ai](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/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-04-15*