> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kymaapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepSeek

> DeepSeek's frontier models — V4 Pro and V4 Flash for the latest tier, R1 for reasoning, V3 for stable baseline.

## Available models

| Model ID            | Parameters             | Context | Speed  | Best For                        |
| ------------------- | ---------------------- | ------- | ------ | ------------------------------- |
| `deepseek-v4-pro`   | 1.6T (49B active, MoE) | 1M      | Medium | Top reasoning, complex coding   |
| `deepseek-v4-flash` | 284B (13B active, MoE) | 1M      | Fast   | General + coding, best value V4 |
| `deepseek-r1`       | 671B (MoE)             | 64K     | Slow   | Reasoning, math, analysis       |
| `deepseek-v3`       | 671B (MoE)             | 160K    | Medium | Previous-gen flagship, stable   |

## V4 vs V3 — When to upgrade?

|                | DeepSeek V4 Pro | DeepSeek V4 Flash | DeepSeek V3  |
| -------------- | --------------- | ----------------- | ------------ |
| **Tier**       | Flagship        | Value             | Previous-gen |
| **Context**    | 1M              | 1M                | 160K         |
| **Max output** | 65K             | 65K               | 8K           |
| **Speed**      | Medium          | Fast              | Medium       |
| **Reasoning**  | Native          | Native            | No           |
| **License**    | MIT             | MIT               | MIT          |
| **Release**    | Preview         | Preview           | Stable       |

**Rule of thumb:** Default to `deepseek-v4-flash` for new work — it gives you 1M context, native reasoning, and the same family behavior at a fraction of the cost. Upgrade to `deepseek-v4-pro` when quality matters more than price. Stay on `deepseek-v3` if you have a stable production workload that's already tuned to it.

## V4 vs R1 — When to use which?

V4 (both Pro and Flash) has reasoning built in, so it's broadly capable on the same tasks R1 was made for. R1 still has its place for pure step-by-step chain-of-thought work where you want the deeper, slower reasoning trace. Most users will find V4 covers both general and reasoning needs.

## Recommendation

**Default to `deepseek-v4-flash`** — the new V4 baseline. 1M context, MIT license, native reasoning, lowest V4-tier price.

**Step up to `deepseek-v4-pro`** for top-tier reasoning, complex coding, or research-grade work.

**Use `deepseek-r1`** for pure reasoning tasks where you want a slower, deeper chain-of-thought trace. It maps to the `reasoning` model alias.

```python theme={null}
from openai import OpenAI

client = OpenAI(base_url="https://kymaapi.com/v1", api_key="ky-...")

# General + coding — use V4 Flash
response = client.chat.completions.create(
    model="deepseek-v4-flash",
    messages=[{"role": "user", "content": "Refactor this module and explain the tradeoffs."}]
)

# Top reasoning — use V4 Pro
response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[{"role": "user", "content": "Walk through the proof, then propose a tighter bound."}]
)
```

## Model aliases

| Alias       | Resolves to   |
| ----------- | ------------- |
| `reasoning` | `deepseek-r1` |

```python theme={null}
# Using alias
model="reasoning"  # → deepseek-r1
```
