DeepSeek: DeepSeek V4.1 Flash (batch)
DeepSeek V4.1 Flashは、テキストと画像の分析、プログラミング、長いコンテキストを使うエージェント型の作業に向けたマルチモーダルモデルです。
モデルについて
この説明はモデルの機能を紹介するものです。Ailootで利用できる入力、出力、オプションは、選択したメソッドごとに以下に記載されています。
テキストと画像を一緒に処理する
DeepSeek V4.1 Flashは、初めからマルチモーダルなモデルとして設計されています。視覚エンコーダが画像を表現に変換し、テキストとともに処理します。結果はテキストです。視覚的な理解、プログラミング、エージェント型のタスクが用意され、コンテキストは最大百万トークンです。
大きな入力のための構造
主なネットワークには552Bパラメータがあります。因果的なエンコーダとデコーダは、それぞれ20層を持ちます。入力の処理時にはトークンごとに8Bパラメータ、生成時には16Bパラメータが有効になります。この分離は、入力素材が応答よりも大幅に多いタスクを想定しています。
圧縮されたスパース注意機構は、層の間でデータを再利用し、コンテキストの重要な部分の繰り返し検索を抑えます。不足する局所的な注意状態は、最近の部分から復元します。条件付き記憶のEngramには196Bパラメータがあり、トークンに基づくスパース検索で記録にアクセスします。これは独立した記憶ブロックであり、主なネットワークのサイズを言い換えたものではありません。各エキスパート層には、一つの共通エキスパートと384のルーティング対象エキスパートがあり、トークンごとに六つのルーティング対象エキスパートを選択します。さらに、層の間の接続を変更した仕組みと、投機的デコードのためのDSparkを使っています。
学習とエージェントの環境
モデルは、45兆トークンのマルチモーダルなコーパスで、一から学習されています。その後の準備は、例に基づく学習、強化学習、モデル自身の系列からの蒸留という順に進みます。
DeepSeekは、合成タスクのデータ、作業環境、エージェントの軌跡を大規模化しています。準備では、タスクそのもの、利用可能な環境、結果の検証方法を結び付けます。データは選別され、重複を取り除き、難易度に応じて選択されます。これは学習の構成についての説明であり、モデルにアクセスする際に外部ツールを自動的に利用できることを意味しません。
分析の深さを調整する
推論は、1〜100の整数で調整します。この連続的な尺度が分析の強度を定めます。深い推論には、より多くの時間とトークンが必要になる場合があります。
対話の継続と動作
モデルの形式は、複数ターンの対話、ツール呼び出し、保存された推論、テキストと画像の交互の入力を想定しています。ツールを実行するのはアプリケーションであり、取得した結果が次の段階の素材になります。
応答はテキストです。視覚的な能力には、対応する入力メソッドが必要です。コンテキストのサイズと推奨生成長は、すべてに共通する最大応答サイズを定めるものではありません。
Ailoot Ultra · バッチ POST /v1/batches deepseek/deepseek-v4.1-flash:batch
deepseek/deepseek-v4.1-flash:batch
deepseek/deepseek-v4.1-flash:batchはじめに
DeepSeek V4.1 Flashは、テキストと画像の分析、プログラミング、長いコンテキストを使うエージェント型の作業に向けたマルチモーダルモデルです。
- 対応する入力
- テキスト
- 結果
- テキスト
Ailootで利用可能 · 入力とメソッド
Ailoot Ultra · バッチ POST /v1/batches
- 入力の種類
text- 出力の種類
text- 出力形式
- インラインの results[].response.body JSON
| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
|---|---|---|---|---|
フィールドendpoint | 種類string | 要件必須 | 値と制限 /v1/chat/completions | デフォルト— |
フィールドmodel | 種類string | 要件必須 | 値と制限 deepseek/deepseek-v4.1-flash:batch | デフォルト— |
フィールドrequests | 種類batch_item[] | 要件必須 | 値と制限 最小項目数: 1 | デフォルト— |
フィールドrequests[].custom_id | 種類string | 要件必須 | 値と制限 | デフォルト— |
フィールドrequests[].body.messages | 種類message[] | 要件必須 | 値と制限 | デフォルト— |
フィールドcompletion_window | 種類string | 要件任意 | 値と制限 24h | デフォルト— |
フィールドprovider | 種類object|null | 要件任意 | 値と制限 | デフォルト— |
フィールドrequests[].body.model | 種類string | 要件任意 | 値と制限 deepseek/deepseek-v4.1-flash:batch, deepseek/deepseek-v4.1-flash | デフォルト— |
フィールドprovider.only | 種類string[] | 要件任意 | 値と制限 deepinfra/fp8 | デフォルト— |
フィールドprovider.allow_fallbacks | 種類boolean|null | 要件任意 | 値と制限 false, null | デフォルト— |
メソッドのパラメータとライフサイクル
| パラメータ | 仕様 |
|---|---|
パラメータcontent_type | 仕様application/json |
パラメータrequired | 仕様endpoint, model, requests |
パラメータmaterial_types | 仕様text |
パラメータrepresentation | 仕様インラインの requests[]。各項目には custom_id と body を指定します |
パラメータrequest_endpoint_profile | 仕様/v1/chat/completions |
パラメータfile_material | 仕様呼び出し元は実際の UTF-8 JSONL をローカルで読み込み、requests[] に格納できます。アップロードの purpose、input_file_id、ファイル参照は使用しません。顧客の素材が存在しない、または空の場合、POST の前に準備を停止します。 |
パラメータserialization_order | 仕様endpoint, model, provider(指定されている場合), completion_window(指定されている場合), requests を最後に配置 |
パラメータoptional_controls | 仕様provider.only, provider.allow_fallbacks, completion_window |
パラメータschema_scope | 仕様ドキュメントに記載されたインラインの Batch エンベロープに格納する、テキスト Chat Completions のリクエストボディ。 |
ライフサイクル: asynchronous
GET /v1/batches/{operation_id} · 元の作成レスポンスに実際に含まれる response.id。同じユーザー/キー/グループを使用します
料金
料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。
- 高速モード
- 未指定 高速モードが選択されている場合
- Flex モード
- 未指定 flex モードが選択されている場合
- 最大推論量
- 未指定 推論量が最大で、調整に既定値(default)を使用する場合
- 明示的キャッシュの料金
- 無効 明示的キャッシュを要求した場合
Ailootの料金
設定別の価格
各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。
| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
|---|---|---|---|---|
| 設定トークンの基本単価 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン $0.000224 / 1K トークン 出力 · 出力トークン $0.000672 / 1K トークン 入力 · キャッシュ読み取り $0.00000672 / 1K トークン 入力 · キャッシュ書き込み — / 1K トークン 入力 · キャッシュ書き込み、1時間 — / 1K トークン |
| 設定リクエスト長に応じた料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン $0.000224 / 1K トークン 出力 · 出力トークン $0.000672 / 1K トークン 入力 · キャッシュ読み取り $0.00000672 / 1K トークン 入力 · キャッシュ書き込み — / 1K トークン 入力 · キャッシュ書き込み、1時間 — / 1K トークン |
Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。金額の確保と精算の仕組み →
リクエスト例
Ailoot Ultra · バッチ
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json
from pathlib import Path
body=json.loads('{"endpoint":"/v1/chat/completions","model":"deepseek/deepseek-v4.1-flash:batch","requests":[{"custom_id":"req-0001","body":{"messages":[{"role":"user","content":"Hello!"}],"max_tokens":16}}]}')
Path("batch-request.json").write_text(json.dumps(body,ensure_ascii=False),encoding="utf-8")
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json
import json, os
from pathlib import Path
from urllib.request import Request, urlopen
def prepare_requests(customer_path):
path = Path(customer_path)
if not path.is_file(): raise ValueError("Customer JSONL file is missing")
items = [json.loads(line) for line in path.read_text(encoding="utf-8").splitlines() if line.strip()]
if not items: raise ValueError("Customer JSONL contains no requests")
ids = set()
for item in items:
if set(item) != {"custom_id", "body"}: raise ValueError("Each item needs custom_id and body")
cid = item["custom_id"]
if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError("custom_id must be nonempty and unique")
ids.add(cid)
if not isinstance(item["body"], dict) or not item["body"].get("messages"): raise ValueError("Supply actual text messages")
supplied_model = item["body"].get("model")
if supplied_model is not None and supplied_model not in ['deepseek/deepseek-v4.1-flash:batch', 'deepseek/deepseek-v4.1-flash']: raise ValueError("body.model must be an exact documented caller or wire ID")
return {"endpoint":"/v1/chat/completions", "model":"deepseek/deepseek-v4.1-flash:batch", "requests":items}
if __name__ == "__main__":
material = os.environ.get("AILOOT_BATCH_REQUESTS_JSONL", "")
if not material: raise SystemExit("Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file")
body = prepare_requests(material)
key = os.environ.get("AILOOT_API_KEY", "")
if not key: raise SystemExit("Set AILOOT_API_KEY")
request = Request("https://api.ailoot.ai/v1/batches", data=json.dumps(body, ensure_ascii=False).encode("utf-8"), headers={"Authorization":"Bearer " + key, "Content-Type":"application/json"}, method="POST")
with urlopen(request) as response:
raw = response.read()
Path("batch-create-response.json").write_bytes(raw)
print(raw.decode("utf-8"))
import json
from pathlib import Path
raw = Path("batch-status-response.json").read_bytes()
response = json.loads(raw)
if response.get("status") != "completed":
raise SystemExit("Keep the original operation; read its status without resubmitting")
results = response.get("results")
if not isinstance(results, list) or not results:
raise SystemExit("Preserve the original response; completed results are missing")
Path("batch-results.jsonl").write_text("".join(json.dumps(item, ensure_ascii=False) + "\n" for item in results), encoding="utf-8")
# Preserve batch-status-response.json with aggregate usage and every result/error.
結果を受け取って保存
Ailoot Ultra · バッチ
インラインの results[].response.body JSON
GET /v1/batches/{operation_id}
ジョブのステータスを確認
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
BATCH_OPERATION_ID="$(python3 - <<'PY_ID'
import json
from pathlib import Path
from urllib.parse import quote
response = json.loads(Path("batch-create-response.json").read_text(encoding="utf-8"))
operation = response.get("id")
if not isinstance(operation, str) or not operation: raise SystemExit("No actual original operation ID; preserve the response and do not resubmit")
print(quote(operation, safe=""))
PY_ID
)"
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o batch-status-response.json
完了した結果をすべて保存
返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。
元のステータス JSON の全体、各結果と custom_id、レスポンスまたはエラーボディの全体を保存してください。完了済みの results[] は、絞り込まずに JSONL として保存してください。
元のレスポンスを確認する場合
元の操作 ID を保存してください。503 result_pending_check には X-Should-Retry:false が設定されています。結果が不明な元のバッチを決して再送しないでください。
レスポンスのフィールド
| フィールド | 種類 |
|---|---|
フィールドresults[].custom_id | 種類string |
フィールドresults[].response.body.choices[].message.content | 種類string|null |
フィールドresults[].error | 種類object|null |
フィールドusage | 種類object|null |
フィールドid | 種類string |
フィールドmodel | 種類string |
フィールドendpoint | 種類string |
フィールドstatus | 種類string |
フィールドrequest_counts | 種類object |
フィールドresults[].id | 種類string |
フィールドresults[].response.status_code | 種類integer |
フィールドresults[].response.request_id | 種類string |
エラーと次の手順
| レスポンス | 条件 | 次の手順 |
|---|---|---|
レスポンス400 · invalid_request_error | 条件ドキュメントに記載されたインラインエンベロープが無効、キーが重複、項目の識別情報が不正、または設定されたモデル機能に矛盾があります。 | 次の手順新しく送信する前に、指摘されたフィールドを修正してください。 |
レスポンス401 · authentication_error | 条件無効な API キーです。 | 次の手順利用を許可された Ailoot キーを使用してください。 |
レスポンス403 · permission_error | 条件バッチグループを利用できません。 | 次の手順キー/グループの利用権限を確認してください。 |
レスポンス422 · invalid_request_error | 条件バッチは残高課金を使用します。サブスクリプションでのバッチ作成は拒否されます。 | 次の手順利用を許可された残高課金グループを使用してください。 |
レスポンス422 · price_unavailable | 条件バッチ入力の料金を見積もれません。 | 次の手順レスポンスを保存し、対象 API ファミリーのドキュメントに記載された入力を使用してください。 |
レスポンス402 · billing_error | 条件バッチの予約額を確保できません。 | 次の手順新しいリクエストの前に、受付条件の問題を解決してください。 |
レスポンス503 · price_unavailable | 条件Batch メソッドの価格/ネイティブ料金を利用できません。 | 次の手順レスポンスを保存してください。価格を別の値に置き換えないでください。 |
レスポンス503 · api_error | 条件指定どおりのサプライヤールートを利用できません。 | 次の手順ルートを修復するためにレスポンスを保存してください。 |
レスポンス503 · result_pending_check | 条件元の結果の確認が必要です。X-Should-Retry:false。 | 次の手順元の operation_id/id を保存し、そのステータスを読み取ってください。元の POST を決して繰り返さないでください。 |
レスポンス404 · not_found | 条件バッチのステータス操作が存在しないか、別の識別主体が所有しています。 | 次の手順元の正確な id と、同じユーザー/キー/グループを使用してください。 |
エイリアス
モデルのエイリアス
Ailoot Ultra deepseek/deepseek-v4.1-flash:batch
メソッドパスのエイリアス
上記に表示されたメソッドパスを使用してください。
関連する呼び出し用ID
FAQ · DeepSeek: DeepSeek V4.1 Flash (batch)
- 利用できる入力と結果は何ですか?
POST /v1/batches·deepseek/deepseek-v4.1-flash:batch:text→text- リクエストはどの項目を使用しますか?
POST /v1/batches·deepseek/deepseek-v4.1-flash:batch:endpoint,model,requests,completion_window,provider- どの制限が適用されますか?
POST /v1/batches·deepseek/deepseek-v4.1-flash:batch:requests.min_items:1