# DeepSeek V3.1 API Pricing

As of October 10, 2026, DeepSeek V3.1 is free to use from Ollama, the lowest of 12 providers. It has a 163,840-token context window and returns up to 163,840 tokens per response.

- Page: https://models.litellm.ai/models/deepseek-v3.1
- Lab: DeepSeek
- LiteLLM model name: `ollama/deepseek-v3.1:671b-cloud`
- Context window: 163,840 tokens
- Max output: 163,840 tokens
- Added to LiteLLM: August 2025
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| Ollama | `ollama/deepseek-v3.1:671b-cloud` | $0 | $0 | – | – | – | 160K |
| Amazon Bedrock Mantle | `bedrock_mantle/deepseek.v3.1` | $0.58 | $1.68 | – | – | – | 128K |
| Azure AI Foundry | `azure_ai/deepseek-v3.1` | $1.23 | $4.94 | – | – | – | – |
| Baseten | `baseten/deepseek-ai/DeepSeek-V3.1` | $0.50 | $1.50 | – | – | – | – |
| DeepInfra | `deepinfra/deepseek-ai/DeepSeek-V3.1` | $0.25 | $0.95 | $0.216 | – | – | 160K |
| Fireworks AI | `fireworks_ai/accounts/fireworks/models/deepseek-v3p1` | $0.56 | $1.68 | – | – | – | 128K |
| Google Vertex AI | `vertex_ai/deepseek-ai/deepseek-v3.1-maas` | $0.60 | $1.70 | $0.06 | – | – | 160K |
| Novita AI | `novita/deepseek/deepseek-v3.1` | $0.27 | $1.00 | $0.135 | – | – | 128K |
| Replicate | `replicate/deepseek-ai/deepseek-v3.1` | $0.672 | $2.016 | – | – | – | 160K |
| SambaNova | `sambanova/DeepSeek-V3.1` | $3.00 | $4.50 | – | – | – | 128K |
| Together AI | `together_ai/deepseek-ai/DeepSeek-V3.1` | $0.60 | $1.70 | – | – | – | 128K |
| Weights & Biases | `wandb/deepseek-ai/DeepSeek-V3.1` | $0.55 | $1.65 | – | – | – | 161K |

## Cost examples

1,000 requests with 2,000 input and 500 output tokens each:

- Ollama: $0
- DeepInfra: $0.975
- Novita AI: $1.04
- Baseten: $1.75

100 long-document requests with 100,000 input and 2,000 output tokens each:

- Ollama: $0
- DeepInfra: $2.69
- Novita AI: $2.90
- Baseten: $5.30

## Features

Supported: Function calling, Parallel tool calls, Structured output, Reasoning, Prompt caching.

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="ollama/deepseek-v3.1:671b-cloud",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## FAQ

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

DeepSeek V3.1 is free to use from Ollama, the lowest of 12 providers.

### What is the context window of DeepSeek V3.1?

DeepSeek V3.1 has a 163,840-token context window and returns up to 163,840 tokens per response.

### Which providers offer DeepSeek V3.1?

DeepSeek V3.1 is available from 12 providers through LiteLLM: Ollama, Amazon Bedrock Mantle, Azure AI Foundry, Baseten, DeepInfra, Fireworks AI, Google Vertex AI, Novita AI, Replicate, SambaNova, Together AI and Weights & Biases. The lowest price is on Ollama.

### How do I call DeepSeek V3.1 with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="ollama/deepseek-v3.1:671b-cloud", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

### What features does DeepSeek V3.1 support?

DeepSeek V3.1 supports function calling, parallel tool calls, structured output, reasoning and prompt caching.

### When did LiteLLM add DeepSeek V3.1?

DeepSeek V3.1 was added to LiteLLM's model price file in August 2025.

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
