Source: https://ailoot.ai/models/ja/deepseek-v4-flash-0731/
Canonical: https://ailoot.ai/models/ja/deepseek-v4-flash-0731/
Language: ja

# DeepSeek: DeepSeek V4 Flash 0731

[Markdown](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/index.md) · [JSON](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/facts.json)

## [DeepSeek: DeepSeek V4 Flash 0731](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/)

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

- [**Ailoot · Anthropic メッセージ** `POST /v1/messages` `deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/#method-0)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/#method-1)
- [**Ailoot · OpenAI チャット** `POST /v1/chat/completions` `deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/#method-2)
- [**Ailoot Ultra · OpenAI チャット** `POST /v1/chat/completions` `deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/#method-3)
- [**Ailoot Ultra · Anthropic メッセージ** `POST /v1/messages` `deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/#method-4)
- [**Ailoot Ultra · OpenAI チャット** `POST /v1/chat/completions` `~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/#method-5)
- [**Ailoot Ultra · Anthropic メッセージ** `POST /v1/messages` `~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/deepseek-v4-flash-0731/#method-6)

モデルについて

この説明はモデルの機能を紹介するものです。Ailootで利用できる入力、出力、オプションは、選択したメソッドごとに以下に記載されています。

DeepSeek V4 Flash 0731 は、プレビュー版に代わる Flash 系列の正式リリースです。実用上はコーディングとエージェント作業を重視し、提供されたリポジトリの解釈、変更の提案、ツールによる観測の利用、呼び出し元が確認できる成果物の返却などを行います。Flash Preview、Pro 0813、V4.1 Flash と比較するときは、保存した結果に 0731 エディションを明記してください。

#### 資料と成果物から始める

実際のタスク、関係するファイルや文書の箇所、制約、期待する結果を渡します。リポジトリの変更では、対象コード、観測した動作、問題を再現するコマンドやリクエストを含めます。成果物が説明、パッチ案、指摘事項の一覧、構造化された計画のどれなのかを指定します。

デバッグの依頼例は、「提供したルートハンドラー、検証スキーマ、失敗するリクエストを使ってください。入力がスキーマから外れる箇所を説明し、最小限の変更を提案して、修正結果を見分けられる既存の確認方法を示してください」です。文書のタスクでは、提供した節を指定し、要件、根拠、未解決の質問の表を求めます。これらは依頼の例なので、リクエストには実際の元資料も含めてください。

#### 直接のチャットか thinking かを選ぶ

開発元の形式は、直接のチャットと thinking に対応します。直接のチャットでは、応答内容をそのまま返します。thinking では、モデルの推論フィールドと最終回答を分けます。thinking モードで文書化されている強度は low、high、max で、既定値は low です。このエディションでは、V4.1 Flash の整数による強度スケールではなく、これらの名前付きレベルを使います。

作業に合わせてモードを選びます。短い文言の変更では、残す事実と変更後の文体を指定できます。複雑なリポジトリのタスクでは、調査手順、関係する根拠、簡潔な最終報告を定められます。thinking の強度を上げても、求める最終成果物は明示します。例えば、短い説明と確認に必要なコマンドを添えた差分案です。

#### アプリケーションのワークフローでツールを接続する

ネイティブ形式は、複数ターンのメッセージと、名前付きパラメーターやスキーマを持つツール定義に対応します。モデルは、求められたツール呼び出しを返せます。アプリケーションが操作を実行し、その観測結果を次のターンで提供します。ツールの結果を対応する呼び出しと関連付け、複数の観測を返すときは順序を維持してください。

ファイルを調べるワークフローでは、実際のファイル読み取り操作を公開し、入力パスを説明して、観測した内容を返します。その内容を根拠に次の提案を行うようモデルに求めます。データのワークフローでは、クエリー操作を提供し、実際のレコードを返して、そのレコードを対象とする計算や要約を求めます。呼び出しが返ることと操作が実行されることは、結果を得るための別々の段階です。

開発元のエンコーダーは、ツールを使う対話の間、推論のコンテキストを保持します。通常のチャットでは、一般に最新のユーザーメッセージより前のターンから推論を除きます。複数段階のワークフローを維持するときは、文書化されたメッセージフィールドと会話処理を使ってください。参照パーサーは適切な形式の出力を前提とするため、実行前に解析済みの呼び出し名とパラメーターを確認し、不正な結果は調査用に保持します。

#### 会話と回答の予算を確保する

日付付きのモデル設定は、1,048,576 のシーケンス位置を指定しています。シーケンスを準備するときは、提供資料、会話履歴、ツール定義、返された観測、生成される応答を含めます。関係のないファイルで空間を埋めるのではなく、小さなパッチ、根拠の表、番号付き計画など、役立つ回答の目標を示してください。

開発元のローカル実行レシピでは、temperature 1.0、top\_p はエージェント作業で 0.95、それ以外で 1.0 を推奨しています。high と max の thinking 強度では、最大出力長を 384K トークンに設定することを推奨しています。これらは公開されたレシピ設定と生成予算の推奨値です。シーケンスの予算には、依頼の残りの部分も収める必要があります。

#### リリースとアーキテクチャを区別する

0731 リリースは Flash DSpark 構造を使い、投機的デコーディング用のモジュールを追加しています。Flash の基盤は、総パラメーター数 284B、トークンあたりの活性化パラメーター数 13B と説明される混合エキスパートモデルです。基盤のパラメーター数と追加モジュールの重みは区別してください。正確な日付付き設定では、43 層、256 のルーティングされるエキスパート、一つの共有エキスパート、トークンごとに選択される六つのエキスパートを持ちます。

役立つ出力は、呼び出し元が求めた回答、コード案、構造化された指摘、ワークフローの次の手順です。コード変更は提供されたファイルと観測した不具合に照らして確認します。文書の結論は、引用箇所や返されたレコードと比較します。後の比較で同じ問題と根拠を使えるよう、モデルのエディション、依頼内容、関係する観測を結果と共に保存してください。

実用タスク

### 実用タスク

英語の技術例

```
Repair a required-field check

A route rejects only if not payload.get("quantity"). The contract requires quantity to be an integer greater than zero, excluding booleans. Explain why inputs {"quantity": -2} and {"quantity": true} expose a problem. Propose a small Python validation patch and cases for missing, zero, negative, boolean and positive values.
```

#### 期待される結果

```
A diagnosis, a focused validation patch and five input cases with accept or reject expectations.
```

#### 結果の確認

```
Check that Python booleans are not accepted as integers and positive whole quantities still pass.
```

**Ailoot · Anthropic メッセージ** `POST /v1/messages` `deepseek-v4-flash-0731`

[`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=messages)

DeepSeek /`deepseek-v4-flash-0731`

### はじめに

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

対応する入力

テキスト

結果

テキスト

### Ailootで利用可能 · 入力とメソッド

**Ailoot · Anthropic メッセージ** `POST /v1/messages`

入力の種類

`text`

出力の種類

`text`

コンテキスト

1,000,000 tokens

最大出力

393,216 tokens

出力形式

jsonまたはSSE

| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
| --- | --- | --- | --- | --- |
| フィールド`model` | 種類`string` | 要件必須 | 値と制限 deepseek-v4-flash-0731 | デフォルト— |
| フィールド`messages` | 種類`message[]` | 要件必須 | 値と制限 最小項目数: 1 | デフォルト— |
| フィールド`messages[].role` | 種類`string` | 要件必須 | 値と制限 user, assistant | デフォルト— |
| フィールド`messages[].content` | 種類`string\|content_block[]` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`system` | 種類`string\|content_block[]` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`max_tokens` | 種類`integer` | 要件必須 | 値と制限 最小値: 1 制限の適用対象: 選択したモデル／カードに固有の正確な上限 | デフォルト— |
| フィールド`stream` | 種類`boolean` | 要件任意 | 値と制限 | デフォルトfalse |
| フィールド`temperature` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`top_p` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`stop_sequences` | 種類`string[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools` | 種類`tool[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools[].name` | 種類`string` | 要件任意 | 値と制限 適用条件: ツールの指定あり | デフォルト— |
| フィールド`tools[].description` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tools[].input_schema` | 種類`JSON_schema` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tool_choice` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`thinking.type` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`thinking.budget_tokens` | 種類`integer` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`output_config.effort` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`metadata` | 種類`object` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`cache_control` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |

入力素材の組み合わせ

**テキスト** · UTF8テキスト

`messages[].contentまたはtype=textブロック`

メソッドのパラメータとライフサイクル

| パラメータ | 仕様 |
| --- | --- |
| パラメータ`material_types` | 仕様text |
| パラメータ`required` | 仕様model, messages, max\_tokens |
| パラメータ`optional_controls` | 仕様null |
| パラメータ`content_type` | 仕様application/json |
| パラメータ`text_file_material` | 仕様実際のUTF-8内容をテキストとして挿入します。ファイルID/URLsには別途、正確な対応が必要です |

ライフサイクル: `exact retained published method`

メソッドの形式とIDは正確に記載しています。供給元の対応能力とリクエストの受け入れは別です。

### 料金

#### Ailootのメソッド料金

入力

$0.00044 */ 1K*

出力

$0.00132 */ 1K*

キャッシュ読み取り

$0.000044 */ 1K*

キャッシュ書き込み

$0.00044 */ 1K*

キャッシュ書き込み、5分

$0.00044 */ 1K tokens*

Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。[金額の確保と精算の仕組み →](https://ailoot.ai/docs/ja/billing/reserve/)

#### 参考料金の詳細

モデル単位の参照料金表は、メソッド選択、見積もり、課金を変更しません。実際の課金には、選択したAilootメソッドの料金を適用します。

モデルの参照料金表

#### 設定別の価格

各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。

| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
| --- | --- | --- | --- | --- |
| 設定OpenAI Chat · 基本トークン料金 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定OpenAI Chat · リクエスト長別料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定Anthropic Messages · 基本トークン料金 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定Anthropic Messages · リクエスト長別料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |

### リクエスト例

#### Ailoot · Anthropic メッセージ

テキストのサンプルPython SDKNode.js SDKPythonストリーミング

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "deepseek-v4-flash-0731", "max_tokens": 1024, "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
import anthropic
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = anthropic.Anthropic(base_url="https://api.ailoot.ai", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
msg = client.messages.create(
    model="deepseek-v4-flash-0731",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(msg.to_dict(mode="json"))
```

```js
import Anthropic from "@anthropic-ai/sdk";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new Anthropic({ baseURL: "https://api.ailoot.ai", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const msg = await client.messages.create({
  model: "deepseek-v4-flash-0731",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(msg);
```

```python
import anthropic,os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=anthropic.Anthropic(base_url="https://api.ailoot.ai",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.messages.stream(model='deepseek-v4-flash-0731',max_tokens=1024,messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_message()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### 結果を受け取って保存

#### Ailoot · Anthropic メッセージ

jsonまたはSSE

##### 完了した結果をすべて保存

返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。

すべてのコンテンツブロック、思考署名、実際のツール利用IDを保持してください。SSEのすべてのブロック差分を組み立てます。最初のテキストブロックだけでは完全な出力になりません。

##### 元のレスポンスを確認する場合

リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。

レスポンスのフィールド

| フィールド | 種類 |
| --- | --- |
| フィールド`id` | 種類string |
| フィールド`model` | 種類string |
| フィールド`content[]` | 種類text\|thinking\|tool\_use\|other content block |
| フィールド`stop_reason` | 種類string\|null |
| フィールド`usage` | 種類object |

エラーと次の手順

| レスポンス | 条件 | 次の手順 |
| --- | --- | --- |
| レスポンス400 · `invalid_request_error` | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |

### エイリアス

#### モデルのエイリアス

<strong>Ailoot</strong> [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=messages)
**Ailoot Ultra** [`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=messages), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=messages)

#### メソッドパスのエイリアス

上記に表示されたメソッドパスを使用してください。

#### 関連する呼び出し用ID

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=messages), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=messages), [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `deepseek-v4-flash-0731`

[`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=responses)

DeepSeek /`deepseek-v4-flash-0731`

### はじめに

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

対応する入力

テキスト

結果

テキスト

### Ailootで利用可能 · 入力とメソッド

**Ailoot · OpenAI Responses** `POST /v1/responses`

入力の種類

`text`

出力の種類

`text`

コンテキスト

1,000,000 tokens

最大出力

393,216 tokens

出力形式

jsonまたはSSE

| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
| --- | --- | --- | --- | --- |
| フィールド`model` | 種類`string` | 要件必須 | 値と制限 deepseek-v4-flash-0731 | デフォルト— |
| フィールド`input` | 種類`string\|input_item[]` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`instructions` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`input[].type` | 種類`string` | 要件任意 | 値と制限 message, reasoning, function\_call, function\_call\_output | デフォルト— |
| フィールド`input[].content` | 種類`string\|content_part[]` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`input[].call_id` | 種類`string` | 要件任意 | 値と制限 適用条件: function\_call\_output。実際に返されたcall\_idを保持してください | デフォルト— |
| フィールド`input[].output` | 種類`string\|content_part[]` | 要件任意 | 値と制限 適用条件: function\_call\_output | デフォルト— |
| フィールド`max_output_tokens` | 種類`integer` | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
| フィールド`stream` | 種類`boolean` | 要件任意 | 値と制限 | デフォルトfalse |
| フィールド`temperature` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`top_p` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools` | 種類`tool[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tool_choice` | 種類`string\|object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`parallel_tool_calls` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning.effort` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning.summary` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`text.format` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`text.verbosity` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`include` | 種類`string[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`store` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`previous_response_id` | 種類`string` | 要件任意 | 値と制限 IDの要件: 対応する継続処理の実際の応答IDのみ モデルによる | デフォルト— |
| フィールド`service_tier` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`prompt_cache_key` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`prompt_cache_options` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |

入力素材の組み合わせ

**テキスト** · UTF8テキスト

`入力テキストまたはinput_textパート`

メソッドのパラメータとライフサイクル

| パラメータ | 仕様 |
| --- | --- |
| パラメータ`material_types` | 仕様text |
| パラメータ`required` | 仕様model, input |
| パラメータ`optional_controls` | 仕様null |
| パラメータ`content_type` | 仕様application/json |
| パラメータ`text_file_material` | 仕様実際のUTF-8内容をテキストとして挿入します。ファイルID/URLsには別途、正確な対応が必要です |

ライフサイクル: `exact retained published method`

メソッドの形式とIDは正確に記載しています。供給元の対応能力とリクエストの受け入れは別です。

### 料金

#### Ailootのメソッド料金

入力

$0.00044 */ 1K*

出力

$0.00132 */ 1K*

キャッシュ読み取り

$0.000044 */ 1K*

キャッシュ書き込み

$0.00044 */ 1K*

キャッシュ書き込み、5分

$0.00044 */ 1K tokens*

Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。[金額の確保と精算の仕組み →](https://ailoot.ai/docs/ja/billing/reserve/)

#### 参考料金の詳細

モデル単位の参照料金表は、メソッド選択、見積もり、課金を変更しません。実際の課金には、選択したAilootメソッドの料金を適用します。

モデルの参照料金表

#### 設定別の価格

各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。

| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
| --- | --- | --- | --- | --- |
| 設定OpenAI Chat · 基本トークン料金 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定OpenAI Chat · リクエスト長別料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定Anthropic Messages · 基本トークン料金 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定Anthropic Messages · リクエスト長別料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |

### リクエスト例

#### Ailoot · OpenAI Responses

テキストのサンプルPython SDKNode.js SDKPythonストリーミング

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "deepseek-v4-flash-0731", "input": ""}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["input"]="Summarize this material and quote supporting source passages.\n\n"+text
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.responses.create(model="deepseek-v4-flash-0731", input="Explain the difference between an observation and a hypothesis in three sentences.")
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.responses.create({ model: "deepseek-v4-flash-0731", input: "Explain the difference between an observation and a hypothesis in three sentences." });
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="deepseek-v4-flash-0731", input="Explain the difference between an observation and a hypothesis in three sentences.") as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_response()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### 結果を受け取って保存

#### Ailoot · OpenAI Responses

jsonまたはSSE

##### 完了した結果をすべて保存

返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。

すべての出力項目とコンテンツのパート、実際の関数call\_id、暗号化された推論、使用量を保持してください。ストリーミングではイベント／項目の識別情報を完全に残します。

##### 元のレスポンスを確認する場合

リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。

レスポンスのフィールド

| フィールド | 種類 |
| --- | --- |
| フィールド`id` | 種類string |
| フィールド`status` | 種類string |
| フィールド`output[]` | 種類message\|reasoning\|function\_call\|other item |
| フィールド`output[].content[]` | 種類content part |
| フィールド`usage` | 種類object |

エラーと次の手順

| レスポンス | 条件 | 次の手順 |
| --- | --- | --- |
| レスポンス400 · `invalid_request_error` | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |

### エイリアス

#### モデルのエイリアス

<strong>Ailoot</strong> [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=responses)
**Ailoot Ultra** [`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest)

#### メソッドパスのエイリアス

上記に表示されたメソッドパスを使用してください。

#### 関連する呼び出し用ID

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest), [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=responses)

**Ailoot · OpenAI チャット** `POST /v1/chat/completions` `deepseek-v4-flash-0731`

[`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=chat)

DeepSeek /`deepseek-v4-flash-0731`

### はじめに

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

対応する入力

テキスト

結果

テキスト

### Ailootで利用可能 · 入力とメソッド

**Ailoot · OpenAI チャット** `POST /v1/chat/completions`

入力の種類

`text`

出力の種類

`text`

コンテキスト

1,000,000 tokens

最大出力

393,216 tokens

出力形式

jsonまたはSSE

| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
| --- | --- | --- | --- | --- |
| フィールド`model` | 種類`string` | 要件必須 | 値と制限 deepseek-v4-flash-0731 | デフォルト— |
| フィールド`messages` | 種類`message[]` | 要件必須 | 値と制限 最小項目数: 1 | デフォルト— |
| フィールド`messages[].role` | 種類`string` | 要件必須 | 値と制限 例：system, user, assistant, tool, function 条件: これらのロールはソースコードの互換型で明示されています。正確なロールの集合はモデルごとに異なります。 モデルによる | デフォルト— |
| フィールド`messages[].content` | 種類`string\|content_part[]\|null` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].tool_calls` | 種類`tool_call[]` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].tool_call_id` | 種類`string` | 要件任意 | 値と制限 適用条件: role=tool。実際に返されたIDを使ってください | デフォルト— |
| フィールド`messages[].name` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].reasoning_content` | 種類`string` | 要件任意 | 値と制限 適用条件: このモデルが使用する場合は、実際に返された推論をそのまま次のリクエストへ戻してください | デフォルト— |
| フィールド`messages[].reasoning_details` | 種類`object\|array` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`max_tokens` | 種類`integer` | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
| フィールド`max_completion_tokens` | 種類`integer` | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
| フィールド`stream` | 種類`boolean` | 要件任意 | 値と制限 | デフォルトfalse |
| フィールド`stream_options.include_usage` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`temperature` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`top_p` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`stop` | 種類`string\|string[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools` | 種類`function_tool[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools[].type` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools[].function.name` | 種類`string` | 要件必須 | 値と制限 適用条件: 関数ツールの指定あり | デフォルト— |
| フィールド`tools[].function.description` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tools[].function.parameters` | 種類`JSON_schema` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tool_choice` | 種類`string\|object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`parallel_tool_calls` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`response_format` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning_effort` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`service_tier` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`instructions` | 種類`string` | 要件任意 | 値と制限 互換性用のフィールド | デフォルト— |
| フィールド`functions` | 種類`function[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`function_call` | 種類`string\|object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`prompt_cache_options` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |

入力素材の組み合わせ

**テキスト** · UTF8テキスト

`messages[].content`

メソッドのパラメータとライフサイクル

| パラメータ | 仕様 |
| --- | --- |
| パラメータ`material_types` | 仕様text |
| パラメータ`required` | 仕様model, messages |
| パラメータ`optional_controls` | 仕様null |
| パラメータ`content_type` | 仕様application/json |
| パラメータ`text_file_material` | 仕様実際のUTF-8内容をテキストとして挿入します。ファイルID/URLsには別途、正確な対応が必要です |

ライフサイクル: `exact retained published method`

メソッドの形式とIDは正確に記載しています。供給元の対応能力とリクエストの受け入れは別です。

### 料金

#### Ailootのメソッド料金

入力

$0.00044 */ 1K*

出力

$0.00132 */ 1K*

キャッシュ読み取り

$0.000044 */ 1K*

キャッシュ書き込み

$0.00044 */ 1K*

キャッシュ書き込み、5分

$0.00044 */ 1K tokens*

Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。[金額の確保と精算の仕組み →](https://ailoot.ai/docs/ja/billing/reserve/)

#### 参考料金の詳細

モデル単位の参照料金表は、メソッド選択、見積もり、課金を変更しません。実際の課金には、選択したAilootメソッドの料金を適用します。

モデルの参照料金表

#### 設定別の価格

各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。

| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
| --- | --- | --- | --- | --- |
| 設定OpenAI Chat · 基本トークン料金 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定OpenAI Chat · リクエスト長別料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定Anthropic Messages · 基本トークン料金 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定Anthropic Messages · リクエスト長別料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |

### リクエスト例

#### Ailoot · OpenAI チャット

テキストのサンプルPython SDKNode.js SDKPythonストリーミング

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "deepseek-v4-flash-0731", "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.chat.completions.create(
    model="deepseek-v4-flash-0731",
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.chat.completions.create({
  model: "deepseek-v4-flash-0731",
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='deepseek-v4-flash-0731',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### 結果を受け取って保存

#### Ailoot · OpenAI チャット

jsonまたはSSE

##### 完了した結果をすべて保存

返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。

すべての選択肢と、その内容・ツール呼び出し・推論を保持してください。SSEでは選択肢／ツールのインデックスごとに差分を組み立て、最終的な終了理由と使用量を残します。

##### 元のレスポンスを確認する場合

リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。

レスポンスのフィールド

| フィールド | 種類 |
| --- | --- |
| フィールド`choices[].index` | 種類integer |
| フィールド`choices[].message.content` | 種類string\|null |
| フィールド`choices[].message.tool_calls` | 種類tool\_call\[\] |
| フィールド`choices[].message.reasoning_content` | 種類string |
| フィールド`choices[].message.reasoning_details` | 種類object\|array |
| フィールド`choices[].finish_reason` | 種類string\|null |
| フィールド`usage` | 種類object |

エラーと次の手順

| レスポンス | 条件 | 次の手順 |
| --- | --- | --- |
| レスポンス400 · `invalid_request_error` | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |

### エイリアス

#### モデルのエイリアス

<strong>Ailoot</strong> [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=chat)
**Ailoot Ultra** [`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=chat), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=chat)

#### メソッドパスのエイリアス

上記に表示されたメソッドパスを使用してください。

#### 関連する呼び出し用ID

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=chat), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=chat), [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=chat)

**Ailoot Ultra · OpenAI チャット** `POST /v1/chat/completions` `deepseek/deepseek-v4-flash-0731`

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=chat)

DeepSeek /`deepseek/deepseek-v4-flash-0731`

モデルID

- `deepseek/deepseek-v4-flash-0731`
- `~deepseek/deepseek-v4-flash-latest`

### はじめに

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

対応する入力

テキスト

結果

テキスト

### Ailootで利用可能 · 入力とメソッド

**Ailoot Ultra · OpenAI チャット** `POST /v1/chat/completions`

入力の種類

`text`

出力の種類

`text`

出力形式

jsonまたはSSE

| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
| --- | --- | --- | --- | --- |
| フィールド`model` | 種類`string` | 要件必須 | 値と制限 deepseek/deepseek-v4-flash-0731 | デフォルト— |
| フィールド`messages` | 種類`message[]` | 要件必須 | 値と制限 最小項目数: 1 | デフォルト— |
| フィールド`messages[].role` | 種類`string` | 要件必須 | 値と制限 例：system, user, assistant, tool, function 条件: これらのロールはソースコードの互換型で明示されています。正確なロールの集合はモデルごとに異なります。 モデルによる | デフォルト— |
| フィールド`messages[].content` | 種類`string\|content_part[]\|null` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].tool_calls` | 種類`tool_call[]` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].tool_call_id` | 種類`string` | 要件任意 | 値と制限 適用条件: role=tool。実際に返されたIDを使ってください | デフォルト— |
| フィールド`messages[].name` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].reasoning_content` | 種類`string` | 要件任意 | 値と制限 適用条件: このモデルが使用する場合は、実際に返された推論をそのまま次のリクエストへ戻してください | デフォルト— |
| フィールド`messages[].reasoning_details` | 種類`object\|array` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`max_tokens` | 種類`integer` | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
| フィールド`max_completion_tokens` | 種類`integer` | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
| フィールド`stream` | 種類`boolean` | 要件任意 | 値と制限 | デフォルトfalse |
| フィールド`stream_options.include_usage` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`temperature` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`top_p` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`stop` | 種類`string\|string[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools` | 種類`function_tool[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools[].type` | 種類`string` | 要件任意 | 値と制限 function モデルによる | デフォルト— |
| フィールド`tools[].function.name` | 種類`string` | 要件必須 | 値と制限 適用条件: 関数ツールの指定あり | デフォルト— |
| フィールド`tools[].function.description` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tools[].function.parameters` | 種類`JSON_schema` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tool_choice` | 種類`string\|object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`parallel_tool_calls` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`response_format` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning_effort` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`service_tier` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`instructions` | 種類`string` | 要件任意 | 値と制限 互換性用のフィールド | デフォルト— |
| フィールド`functions` | 種類`function[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`function_call` | 種類`string\|object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`prompt_cache_options` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`modalities` | 種類`string[]` | 要件任意 | 値と制限 text | デフォルト— |
| フィールド`provider` | 種類`object` | 要件任意 | 値と制限 条件: このUltraテキストルートではprovider.optionsは拒否されます | デフォルト— |
| フィールド`cache_control.ttl` | 種類`string` | 要件任意 | 値と制限 条件: 実際のプロンプトキャッシュの指定箇所では1hは拒否されます | デフォルト— |

入力素材の組み合わせ

**テキスト** · UTF8テキスト

`messages[].content`

メソッドのパラメータとライフサイクル

| パラメータ | 仕様 |
| --- | --- |
| パラメータ`content_type` | 仕様application/json |
| パラメータ`required` | 仕様model, messages |
| パラメータ`material_types` | 仕様text |
| パラメータ`messages` | 仕様role/content形式のメッセージ配列 |
| パラメータ`file_material` | 仕様実際のUTF-8文書をテキストとしてそのまま挿入します。ファイルIDは推定しません |
| パラメータ`optional_controls` | 仕様stream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| パラメータ`control_scope` | 仕様モデル固有。ユーザーの関数ツールとホスト側のツールは異なります |
| パラメータ`output_modalities` | 仕様text |
| パラメータ`hosted_operations` | 仕様false |
| パラメータ`multimodal_input_binding` | 仕様null |

ライフサイクル: `synchronous_or_streamed`

正確なモデルIDをmessagesとともに送ってください。

コンテキスト長は出力上限ではありません。

テキストファイルはテキストをそのまま提供できます。画像／音声／ファイルオブジェクトの入力には正確なバインディングが必要です。

### 料金

料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。

高速モード

標準料金 高速モードが選択されている場合

Flex モード

標準料金 flex モードが選択されている場合

最大推論量

標準料金 推論量が最大で、調整に既定値（default）を使用する場合

推論量 · 高

標準料金 推論量が高い場合

推論量 · 低

標準料金 推論量が低い場合

推論量 · 最大（max）

標準料金 推論量が最大（max）の場合

#### Ailootの料金

#### 設定別の価格

各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。

| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
| --- | --- | --- | --- | --- |
| 設定トークンの基本単価 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定リクエスト長に応じた料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |

Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。[金額の確保と精算の仕組み →](https://ailoot.ai/docs/ja/billing/reserve/)

### リクエスト例

#### Ailoot Ultra · OpenAI チャット

curlPython SDKPythonストリーミング

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "deepseek/deepseek-v4-flash-0731", "messages": [{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}]}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
    if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model='deepseek/deepseek-v4-flash-0731',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}])
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(result.to_dict(mode="json"))
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='deepseek/deepseek-v4-flash-0731',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### 結果を受け取って保存

#### Ailoot Ultra · OpenAI チャット

jsonまたはSSE

##### 完了した結果をすべて保存

返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。

すべての選択肢と、その内容・ツール呼び出し・推論を保持してください。SSEでは選択肢／ツールのインデックスごとに差分を組み立て、最終的な終了理由と使用量を残します。

##### 元のレスポンスを確認する場合

リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。

レスポンスのフィールド

| フィールド | 種類 |
| --- | --- |
| フィールド`choices[].index` | 種類integer |
| フィールド`choices[].message.content` | 種類string\|null |
| フィールド`choices[].message.tool_calls` | 種類tool\_call\[\] |
| フィールド`choices[].message.reasoning_content` | 種類string |
| フィールド`choices[].message.reasoning_details` | 種類object\|array |
| フィールド`choices[].finish_reason` | 種類string\|null |
| フィールド`usage` | 種類object |

エラーと次の手順

| レスポンス | 条件 | 次の手順 |
| --- | --- | --- |
| レスポンス400 · `invalid_request_error` | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |

### エイリアス

#### モデルのエイリアス

<strong>Ailoot</strong> [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=chat)
**Ailoot Ultra** [`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=chat), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=chat)

#### メソッドパスのエイリアス

上記に表示されたメソッドパスを使用してください。

#### 関連する呼び出し用ID

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=chat), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=chat), [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=chat)

**Ailoot Ultra · Anthropic メッセージ** `POST /v1/messages` `deepseek/deepseek-v4-flash-0731`

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=messages)

DeepSeek /`deepseek/deepseek-v4-flash-0731`

モデルID

- `deepseek/deepseek-v4-flash-0731`
- `~deepseek/deepseek-v4-flash-latest`

### はじめに

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

対応する入力

テキスト

結果

json · sse

### Ailootで利用可能 · 入力とメソッド

**Ailoot Ultra · Anthropic メッセージ** `POST /v1/messages`

入力の種類

`text`

出力の種類

`json`, `sse`

出力形式

JSONまたはSSE

| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
| --- | --- | --- | --- | --- |
| フィールド`model` | 種類`string` | 要件必須 | 値と制限 deepseek/deepseek-v4-flash-0731 | デフォルト— |
| フィールド`messages` | 種類`message[]` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`messages[].role` | 種類`string` | 要件必須 | 値と制限 user, assistant | デフォルト— |
| フィールド`messages[].content` | 種類`string` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`max_tokens` | 種類`integer` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`stream` | 種類`boolean` | 要件任意 | 値と制限 | デフォルトfalse |

入力素材の組み合わせ

**テキスト** · UTF-8テキスト

`messages[].contentの文字列`

メソッドのパラメータとライフサイクル

| パラメータ | 仕様 |
| --- | --- |
| パラメータ`content_type` | 仕様application/json |
| パラメータ`required` | 仕様model, messages, max\_tokens |
| パラメータ`optional_controls` | 仕様stream |
| パラメータ`material_types` | 仕様text |
| パラメータ`text_file_material` | 仕様実際のUTF-8文書を読み、その本文を指定された入力またはメッセージ内容の文字列に入れてください。 |

ライフサイクル: `synchronous_or_streamed`

### 料金

料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。

高速モード

標準料金 高速モードが選択されている場合

Flex モード

標準料金 flex モードが選択されている場合

最大推論量

標準料金 推論量が最大で、調整に既定値（default）を使用する場合

推論量 · 高

標準料金 推論量が高い場合

推論量 · 低

標準料金 推論量が低い場合

推論量 · 最大（max）

標準料金 推論量が最大（max）の場合

#### Ailootの料金

#### 設定別の価格

各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。

| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
| --- | --- | --- | --- | --- |
| 設定トークンの基本単価 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定リクエスト長に応じた料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |

Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。[金額の確保と精算の仕組み →](https://ailoot.ai/docs/ja/billing/reserve/)

### リクエスト例

#### Ailoot Ultra · Anthropic メッセージ

必要最小限の完全な JSON ボディcurl · ご自身の UTF-8 ドキュメントを使用するPython · 結果全体を保存する

```json
{
  "model": "deepseek/deepseek-v4-flash-0731",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'deepseek/deepseek-v4-flash-0731', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
```

```python
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'deepseek/deepseek-v4-flash-0731', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError

api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
    raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
    with urlopen(request, timeout=120) as response:
        raw = response.read()
        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
    Path('result.json').write_bytes(error.read())
    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
    raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
```

### 結果を受け取って保存

#### Ailoot Ultra · Anthropic メッセージ

JSONまたはSSE

##### 完了した結果をすべて保存

返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。

すべてのコンテンツブロック、思考署名、実際のツール利用IDを保持してください。SSEのすべてのブロック差分を組み立てます。最初のテキストブロックだけでは完全な出力になりません。

##### 元のレスポンスを確認する場合

リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。

レスポンスのフィールド

| フィールド | 種類 |
| --- | --- |
| フィールド`id` | 種類string |
| フィールド`model` | 種類string |
| フィールド`content[]` | 種類text\|thinking\|tool\_use\|other content block |
| フィールド`stop_reason` | 種類string\|null |
| フィールド`usage` | 種類object |

エラーと次の手順

| レスポンス | 条件 | 次の手順 |
| --- | --- | --- |
| レスポンス400 · `invalid_request_error` | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |

### エイリアス

#### モデルのエイリアス

<strong>Ailoot</strong> [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=messages)
**Ailoot Ultra** [`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=messages), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=messages)

#### メソッドパスのエイリアス

上記に表示されたメソッドパスを使用してください。

#### 関連する呼び出し用ID

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=messages), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=messages), [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=messages)

**Ailoot Ultra · OpenAI チャット** `POST /v1/chat/completions` `~deepseek/deepseek-v4-flash-latest`

[`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=chat)

DeepSeek /`~deepseek/deepseek-v4-flash-latest`

モデルID

- `deepseek/deepseek-v4-flash-0731`
- `~deepseek/deepseek-v4-flash-latest`

### はじめに

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

対応する入力

テキスト

結果

テキスト

### Ailootで利用可能 · 入力とメソッド

**Ailoot Ultra · OpenAI チャット** `POST /v1/chat/completions`

入力の種類

`text`

出力の種類

`text`

出力形式

jsonまたはSSE

| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
| --- | --- | --- | --- | --- |
| フィールド`model` | 種類`string` | 要件必須 | 値と制限 ~deepseek/deepseek-v4-flash-latest | デフォルト— |
| フィールド`messages` | 種類`message[]` | 要件必須 | 値と制限 最小項目数: 1 | デフォルト— |
| フィールド`messages[].role` | 種類`string` | 要件必須 | 値と制限 例：system, user, assistant, tool, function 条件: これらのロールはソースコードの互換型で明示されています。正確なロールの集合はモデルごとに異なります。 モデルによる | デフォルト— |
| フィールド`messages[].content` | 種類`string\|content_part[]\|null` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].tool_calls` | 種類`tool_call[]` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].tool_call_id` | 種類`string` | 要件任意 | 値と制限 適用条件: role=tool。実際に返されたIDを使ってください | デフォルト— |
| フィールド`messages[].name` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`messages[].reasoning_content` | 種類`string` | 要件任意 | 値と制限 適用条件: このモデルが使用する場合は、実際に返された推論をそのまま次のリクエストへ戻してください | デフォルト— |
| フィールド`messages[].reasoning_details` | 種類`object\|array` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`max_tokens` | 種類`integer` | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
| フィールド`max_completion_tokens` | 種類`integer` | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
| フィールド`stream` | 種類`boolean` | 要件任意 | 値と制限 | デフォルトfalse |
| フィールド`stream_options.include_usage` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`temperature` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`top_p` | 種類`number` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`stop` | 種類`string\|string[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools` | 種類`function_tool[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`tools[].type` | 種類`string` | 要件任意 | 値と制限 function モデルによる | デフォルト— |
| フィールド`tools[].function.name` | 種類`string` | 要件必須 | 値と制限 適用条件: 関数ツールの指定あり | デフォルト— |
| フィールド`tools[].function.description` | 種類`string` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tools[].function.parameters` | 種類`JSON_schema` | 要件任意 | 値と制限 | デフォルト— |
| フィールド`tool_choice` | 種類`string\|object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`parallel_tool_calls` | 種類`boolean` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`response_format` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning_effort` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`reasoning` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`service_tier` | 種類`string` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`instructions` | 種類`string` | 要件任意 | 値と制限 互換性用のフィールド | デフォルト— |
| フィールド`functions` | 種類`function[]` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`function_call` | 種類`string\|object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`prompt_cache_options` | 種類`object` | 要件任意 | 値と制限 モデルによる | デフォルト— |
| フィールド`modalities` | 種類`string[]` | 要件任意 | 値と制限 text | デフォルト— |
| フィールド`provider` | 種類`object` | 要件任意 | 値と制限 条件: このUltraテキストルートではprovider.optionsは拒否されます | デフォルト— |
| フィールド`cache_control.ttl` | 種類`string` | 要件任意 | 値と制限 条件: 実際のプロンプトキャッシュの指定箇所では1hは拒否されます | デフォルト— |

入力素材の組み合わせ

**テキスト** · UTF8テキスト

`messages[].content`

メソッドのパラメータとライフサイクル

| パラメータ | 仕様 |
| --- | --- |
| パラメータ`content_type` | 仕様application/json |
| パラメータ`required` | 仕様model, messages |
| パラメータ`material_types` | 仕様text |
| パラメータ`messages` | 仕様role/content形式のメッセージ配列 |
| パラメータ`file_material` | 仕様実際のUTF-8文書をテキストとしてそのまま挿入します。ファイルIDは推定しません |
| パラメータ`optional_controls` | 仕様stream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| パラメータ`control_scope` | 仕様モデル固有。ユーザーの関数ツールとホスト側のツールは異なります |
| パラメータ`output_modalities` | 仕様text |
| パラメータ`hosted_operations` | 仕様false |
| パラメータ`multimodal_input_binding` | 仕様null |

ライフサイクル: `synchronous_or_streamed`

正確なモデルIDをmessagesとともに送ってください。

コンテキスト長は出力上限ではありません。

テキストファイルはテキストをそのまま提供できます。画像／音声／ファイルオブジェクトの入力には正確なバインディングが必要です。

### 料金

料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。

高速モード

標準料金 高速モードが選択されている場合

Flex モード

標準料金 flex モードが選択されている場合

最大推論量

標準料金 推論量が最大で、調整に既定値（default）を使用する場合

推論量 · 高

標準料金 推論量が高い場合

推論量 · 低

標準料金 推論量が低い場合

推論量 · 最大（max）

標準料金 推論量が最大（max）の場合

#### Ailootの料金

#### 設定別の価格

各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。

| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
| --- | --- | --- | --- | --- |
| 設定トークンの基本単価 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定リクエスト長に応じた料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |

Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。[金額の確保と精算の仕組み →](https://ailoot.ai/docs/ja/billing/reserve/)

### リクエスト例

#### Ailoot Ultra · OpenAI チャット

curlPython SDKPythonストリーミング

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "~deepseek/deepseek-v4-flash-latest", "messages": [{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}]}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
    if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model='~deepseek/deepseek-v4-flash-latest',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}])
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(result.to_dict(mode="json"))
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='~deepseek/deepseek-v4-flash-latest',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### 結果を受け取って保存

#### Ailoot Ultra · OpenAI チャット

jsonまたはSSE

##### 完了した結果をすべて保存

返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。

すべての選択肢と、その内容・ツール呼び出し・推論を保持してください。SSEでは選択肢／ツールのインデックスごとに差分を組み立て、最終的な終了理由と使用量を残します。

##### 元のレスポンスを確認する場合

リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。

レスポンスのフィールド

| フィールド | 種類 |
| --- | --- |
| フィールド`choices[].index` | 種類integer |
| フィールド`choices[].message.content` | 種類string\|null |
| フィールド`choices[].message.tool_calls` | 種類tool\_call\[\] |
| フィールド`choices[].message.reasoning_content` | 種類string |
| フィールド`choices[].message.reasoning_details` | 種類object\|array |
| フィールド`choices[].finish_reason` | 種類string\|null |
| フィールド`usage` | 種類object |

エラーと次の手順

| レスポンス | 条件 | 次の手順 |
| --- | --- | --- |
| レスポンス400 · `invalid_request_error` | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |

### エイリアス

#### モデルのエイリアス

<strong>Ailoot</strong> [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=chat)
**Ailoot Ultra** [`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=chat), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=chat)

#### メソッドパスのエイリアス

上記に表示されたメソッドパスを使用してください。

#### 関連する呼び出し用ID

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=chat), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=chat), [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=chat)

**Ailoot Ultra · Anthropic メッセージ** `POST /v1/messages` `~deepseek/deepseek-v4-flash-latest`

[`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=messages)

DeepSeek /`~deepseek/deepseek-v4-flash-latest`

モデルID

- `deepseek/deepseek-v4-flash-0731`
- `~deepseek/deepseek-v4-flash-latest`

### はじめに

DeepSeek V4 Flash 0731 は、テキスト、コーディング、エージェントのワークフローに向けた公式の Flash リリースです。直接チャットするモードと思考モード、構造化されたツール呼び出し出力、100 万トークンのモデルコンテキストを備え、この日付付きの版には DSpark の投機的デコーディングモジュールが含まれています。

対応する入力

テキスト

結果

json · sse

### Ailootで利用可能 · 入力とメソッド

**Ailoot Ultra · Anthropic メッセージ** `POST /v1/messages`

入力の種類

`text`

出力の種類

`json`, `sse`

出力形式

JSONまたはSSE

| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
| --- | --- | --- | --- | --- |
| フィールド`model` | 種類`string` | 要件必須 | 値と制限 ~deepseek/deepseek-v4-flash-latest | デフォルト— |
| フィールド`messages` | 種類`message[]` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`messages[].role` | 種類`string` | 要件必須 | 値と制限 user, assistant | デフォルト— |
| フィールド`messages[].content` | 種類`string` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`max_tokens` | 種類`integer` | 要件必須 | 値と制限 | デフォルト— |
| フィールド`stream` | 種類`boolean` | 要件任意 | 値と制限 | デフォルトfalse |

入力素材の組み合わせ

**テキスト** · UTF-8テキスト

`messages[].contentの文字列`

メソッドのパラメータとライフサイクル

| パラメータ | 仕様 |
| --- | --- |
| パラメータ`content_type` | 仕様application/json |
| パラメータ`required` | 仕様model, messages, max\_tokens |
| パラメータ`optional_controls` | 仕様stream |
| パラメータ`material_types` | 仕様text |
| パラメータ`text_file_material` | 仕様実際のUTF-8文書を読み、その本文を指定された入力またはメッセージ内容の文字列に入れてください。 |

ライフサイクル: `synchronous_or_streamed`

### 料金

料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。

高速モード

標準料金 高速モードが選択されている場合

Flex モード

標準料金 flex モードが選択されている場合

最大推論量

標準料金 推論量が最大で、調整に既定値（default）を使用する場合

推論量 · 高

標準料金 推論量が高い場合

推論量 · 低

標準料金 推論量が低い場合

推論量 · 最大（max）

標準料金 推論量が最大（max）の場合

#### Ailootの料金

#### 設定別の価格

各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。

| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
| --- | --- | --- | --- | --- |
| 設定トークンの基本単価 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |
| 設定リクエスト長に応じた料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン **$0.00088** / 1K トークン 出力 · 出力トークン **$0.00264** / 1K トークン 入力 · キャッシュ読み取り **$0.000056** / 1K トークン 入力 · キャッシュ書き込み **—** / 1K トークン 入力 · キャッシュ書き込み、1時間 **—** / 1K トークン |

Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。[金額の確保と精算の仕組み →](https://ailoot.ai/docs/ja/billing/reserve/)

### リクエスト例

#### Ailoot Ultra · Anthropic メッセージ

必要最小限の完全な JSON ボディcurl · ご自身の UTF-8 ドキュメントを使用するPython · 結果全体を保存する

```json
{
  "model": "~deepseek/deepseek-v4-flash-latest",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': '~deepseek/deepseek-v4-flash-latest', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
```

```python
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': '~deepseek/deepseek-v4-flash-latest', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError

api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
    raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
    with urlopen(request, timeout=120) as response:
        raw = response.read()
        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
    Path('result.json').write_bytes(error.read())
    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
    raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
```

### 結果を受け取って保存

#### Ailoot Ultra · Anthropic メッセージ

JSONまたはSSE

##### 完了した結果をすべて保存

返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。

すべてのコンテンツブロック、思考署名、実際のツール利用IDを保持してください。SSEのすべてのブロック差分を組み立てます。最初のテキストブロックだけでは完全な出力になりません。

##### 元のレスポンスを確認する場合

リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。

レスポンスのフィールド

| フィールド | 種類 |
| --- | --- |
| フィールド`id` | 種類string |
| フィールド`model` | 種類string |
| フィールド`content[]` | 種類text\|thinking\|tool\_use\|other content block |
| フィールド`stop_reason` | 種類string\|null |
| フィールド`usage` | 種類object |

エラーと次の手順

| レスポンス | 条件 | 次の手順 |
| --- | --- | --- |
| レスポンス400 · `invalid_request_error` | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |

### エイリアス

#### モデルのエイリアス

<strong>Ailoot</strong> [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=messages)
**Ailoot Ultra** [`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=messages), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=messages)

#### メソッドパスのエイリアス

上記に表示されたメソッドパスを使用してください。

#### 関連する呼び出し用ID

[`deepseek/deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=deepseek%2Fdeepseek-v4-flash-0731&fmt=messages), [`~deepseek/deepseek-v4-flash-latest`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Ultra&caller=~deepseek%2Fdeepseek-v4-flash-latest&fmt=messages), [`deepseek-v4-flash-0731`](https://ailoot.ai/models/ja/#m=deepseek%2Fdeepseek-v4-flash-0731&route=Core&caller=deepseek-v4-flash-0731&fmt=messages)

FAQ · DeepSeek: DeepSeek V4 Flash 0731

利用できる入力と結果は何ですか？

`POST /v1/messages` · `deepseek-v4-flash-0731`: `text` → `text` `POST /v1/responses` · `deepseek-v4-flash-0731`: `text` → `text` `POST /v1/chat/completions` · `deepseek-v4-flash-0731`: `text` → `text` `POST /v1/chat/completions` · `deepseek/deepseek-v4-flash-0731`: `text` → `text` `POST /v1/messages` · `deepseek/deepseek-v4-flash-0731`: `text` → `json`, `sse` `POST /v1/chat/completions` · `~deepseek/deepseek-v4-flash-latest`: `text` → `text` `POST /v1/messages` · `~deepseek/deepseek-v4-flash-latest`: `text` → `json`, `sse`

リクエストはどの項目を使用しますか？

`POST /v1/messages` · `deepseek-v4-flash-0731`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `deepseek-v4-flash-0731`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `deepseek-v4-flash-0731`: `model`, `messages`, `stream` `POST /v1/chat/completions` · `deepseek/deepseek-v4-flash-0731`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `deepseek/deepseek-v4-flash-0731`: `model`, `messages`, `max_tokens`, `stream` `POST /v1/chat/completions` · `~deepseek/deepseek-v4-flash-latest`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `~deepseek/deepseek-v4-flash-latest`: `model`, `messages`, `max_tokens`, `stream`

どの制限が適用されますか？

`POST /v1/messages` · `deepseek-v4-flash-0731`: `ctx`: `1000000`; `max_out`: `393216`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `deepseek-v4-flash-0731`: `ctx`: `1000000`; `max_out`: `393216` `POST /v1/chat/completions` · `deepseek-v4-flash-0731`: `ctx`: `1000000`; `max_out`: `393216`; `messages.min_items`: `1` `POST /v1/chat/completions` · `deepseek/deepseek-v4-flash-0731`: `messages.min_items`: `1` `POST /v1/chat/completions` · `~deepseek/deepseek-v4-flash-latest`: `messages.min_items`: `1`

AilootをClaude Code、OpenCode、Hermes、自分のアプリに接続しましょう。

## 企業とそのプロジェクト群

企業とそのプロジェクト群：数百万の顧客、毎月数十億規模の売上。

## トークンを割引価格で購入。

継続利用にサブスクリプション割引。プロモコードでトークン購入が最大50%割引。

サブスクリプション

定期的なリクエストに合う割引プランを選びましょう。

最大50%のプロモコード

購入時にコードを入力すると、実施中のキャンペーンに沿って価格を再計算します。

支出を履歴で確認

各リクエストのモデル、トークン、金額が保存されます。

[サブスクリプションを選ぶ](https://ailoot.ai/docs/ja/billing/subscriptions/) · [モデルの価格を見る](https://ailoot.ai/models/ja/)

## 販売する製品に、 APIを組み込みましょう。

SaaS、アプリ、ボットをAilootの公式サービス提供条件とライセンス契約に基づいて接続できます。再販にはリセラーライセンスを申請できます。

商用アプリ

サービスの有料機能に、文章、画像、動画、音声の生成を組み込めます。

リセラーライセンス

プロジェクトの説明とアクセスの仕組みをお送りください。利用・再販条件の書面を申請できます。

サイトで契約文書を確認

接続前にサービス提供条件、ライセンス契約、データ処理ポリシーを読めます。

[リセラーライセンスを申請](mailto:support@ailoot.ai) · [サービス提供条件とライセンス契約](https://ailoot.ai/legal/offer?lang=ja)

## Ailoot · 企業とそのプロジェクト群





Ailootは、蓄積した運営経験、幅広い顧客基盤、安定したサービス、継続的なKPI管理を基盤としています。





企業とそのプロジェクト群：数百万の顧客、毎月数十億規模の売上。





Ailootはこの運営経験を、お客様の製品、エージェント、アプリケーション、自動化でAI機能を利用するためのAPIアクセスに活かしています。
