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

# DeepSeek V4 Flash

> Efficiency-optimized MoE model for fast, low-cost inference.

<Info>
  **Model ID:** `deepseek/deepseek-v4-flash` | **Endpoint ID:** `deepseek-v4-flash` | **Parameters:** 284B (MoE, 13B active) | **Released:** 2026-04-24
</Info>

|  Input Price | Output Price | Context |   Modality  |
| :----------: | :----------: | :-----: | :---------: |
| \$0.098 / 1M | \$0.196 / 1M | 131,072 | text → text |

## Overview

DeepSeek V4 Flash is DeepSeek's efficiency-optimized Mixture-of-Experts model. Out of 284B total parameters, only 13B are activated per token, delivering fast responses at low cost. It's well suited for workloads where speed and cost matter, such as coding assistants, chatbots, and agentic workflows. The model supports a context window of up to 131,072 tokens.

<CardGroup cols={3}>
  <Card title="Air API Playground" icon="play" href="https://ap-1.aieev.cloud:3007/models/deepseek%2Fdeepseek-v4-flash">
    Try the model in the playground.
  </Card>

  <Card title="Deploy with Container" icon="container-storage" href="/docs/air-container/deploy-a-container">
    Deploy with AIR Container.
  </Card>

  <Card title="OpenAI Compatible API" icon="arrow-left-right" href="/docs/air-api/openai-compatible-api">
    Connect with the OpenAI SDK as-is.
  </Card>
</CardGroup>

## Pricing

| Currency | Input (1M tokens) | Output (1M tokens) |
| :------- | ----------------: | -----------------: |
| USD      |           \$0.098 |            \$0.196 |
| KRW      |              ₩147 |               ₩294 |

## Supported Features

All features are available through the [OpenAI Compatible API](/docs/air-api/openai-compatible-api).

| Feature                                                                           | Supported | Notes                                                                                                      |
| :-------------------------------------------------------------------------------- | :-------: | :--------------------------------------------------------------------------------------------------------- |
| [Streaming](/docs/air-api/openai-compatible-api#streaming)                        |     ✅     | SSE, `include_usage` supported                                                                             |
| [Tool Calling](/docs/air-api/openai-compatible-api#tool-calling-function-calling) |     ✅     | Multiple calls supported, controllable via `parallel_tool_calls`                                           |
| [Vision](/docs/air-api/openai-compatible-api#vision-image-input)                  |     ❌     | Not supported                                                                                              |
| [Reasoning](/docs/air-api/openai-compatible-api#reasoning)                        |     ✅     | The reasoning trace is returned separately in the `reasoning` field. Disable via `enable_thinking: false`. |
| [JSON Mode](/docs/air-api/openai-compatible-api#json-mode-structured-outputs)     |     ✅     | `response_format: json_object`                                                                             |
| logprobs                                                                          |     ✅     | `logprobs` / `top_logprobs`                                                                                |

## Key Features

* Sparse MoE activation (13B of 284B) for fast, low-cost inference
* Reasoning (thinking) support that can be disabled when not needed
* Tool calling and JSON mode support
* Optimized for coding and agentic workloads

## Use Cases

### Coding Assistant

Generate and explain code for practical development tasks.

<CodeGroup>
  ```text Input theme={null}
  Write a Python function to check if a number is prime and explain the logic.
  ```

  ```python Output theme={null}
  def is_prime(n):
      if n <= 1:
          return False
      for i in range(2, int(n ** 0.5) + 1):
          if n % i == 0:
              return False
      return True

  # This function checks divisibility only up to the square root of n,
  # which improves efficiency.
  ```
</CodeGroup>

### Agentic Workflows

<CodeGroup>
  ```text Input theme={null}
  Given a list of files in a directory, write a plan to find and delete all files older than 30 days.
  ```

  ```text Output theme={null}
  1. List all files with their last-modified timestamps.
  2. Compute the cutoff date (today - 30 days).
  3. Filter files whose modified time is before the cutoff.
  4. Confirm the filtered list, then delete each file.
  5. Log the deleted file names for auditing.
  ```
</CodeGroup>

### General Chat

Handle everyday conversation and general-purpose Q\&A quickly and at low cost.

## Parameters

| Parameter            | Type             | Required | Default | Description                                                    |
| -------------------- | ---------------- | -------- | ------- | -------------------------------------------------------------- |
| `messages`           | array            | Required | -       | List of input messages for chat-based generation.              |
| `max_tokens`         | integer          | Optional | -       | Maximum output tokens to generate                              |
| `temperature`        | number           | Optional | 1       | Sampling temperature (0.0-2.0)                                 |
| `top_p`              | number           | Optional | 1       | Nucleus sampling threshold                                     |
| `top_k`              | integer          | Optional | -       | Limit sampling to the top-k most likely tokens                 |
| `min_p`              | number           | Optional | -       | Minimum probability threshold for token sampling               |
| `frequency_penalty`  | number           | Optional | 0       | Penalty for token frequency                                    |
| `presence_penalty`   | number           | Optional | 0       | Penalty for token presence                                     |
| `repetition_penalty` | number           | Optional | -       | Penalty for repeated token generation                          |
| `stop`               | string \| array  | Optional | -       | Stop sequence(s) that end generation                           |
| `seed`               | integer          | Optional | -       | Random seed for reproducible sampling                          |
| `stream`             | boolean          | Optional | false   | Enable streaming responses                                     |
| `tools`              | array            | Optional | -       | Tool calling function definitions                              |
| `tool_choice`        | string \| object | Optional | auto    | How tools are invoked (`auto`, `none`, or a specific function) |
| `response_format`    | object           | Optional | -       | JSON mode (`{"type": "json_object"}`)                          |
| `logprobs`           | boolean          | Optional | false   | Return per-token log probabilities                             |

## Model Details

| Property           | Value                                             |
| ------------------ | ------------------------------------------------- |
| Context Length     | 131,072                                           |
| Max Output Length  | 131,072                                           |
| Input Modalities   | text                                              |
| Output Modalities  | text                                              |
| Supported Features | tools, reasoning, streaming, json\_mode, logprobs |

## Quick Start

<Steps>
  <Step title="Get your API key">
    Generate an API key from your [AirCloud account](https://aieev.com).
  </Step>

  <Step title="Run the code">
    Replace `YOUR_API_KEY` with your actual key and choose your preferred language (Python, cURL, Node.js).
  </Step>
</Steps>

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_API_KEY",
      base_url="https://ap-1.aieev.cloud/endpoints/deepseek-v4-flash/v1"
  )

  response = client.chat.completions.create(
      model="deepseek/deepseek-v4-flash",
      messages=[{"role": "user", "content": "Hello!"}]
  )

  print(response.choices[0].message.content)
  ```

  ```bash cURL theme={null}
  curl https://ap-1.aieev.cloud/endpoints/deepseek-v4-flash/v1/chat/completions \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "deepseek/deepseek-v4-flash",
      "messages": [{"role": "user", "content": "Hello!"}]
    }'
  ```

  ```javascript Node.js theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: "YOUR_API_KEY",
    baseURL: "https://ap-1.aieev.cloud/endpoints/deepseek-v4-flash/v1",
  });

  const response = await client.chat.completions.create({
    model: "deepseek/deepseek-v4-flash",
    messages: [{ role: "user", content: "Hello!" }],
  });

  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

## Tags

`open-source` `conversational` `moe` `reasoning` `efficient`
