{
  "aboutHtml": "<p>Sora 2 は、文章によるシーン説明や参照画像から動きのあるクリップを作る、OpenAI の動画・音声生成モデルです。映像の連続した動きとともに、同期した発話、効果音、背景音を生成します。標準の Sora 2 プロファイルは、映像表現の探索、コンセプト開発、試作、ラフ編集向けに位置付けられています。Sora 2 Pro は、より高い映像忠実度と高解像度での仕上げを目指す別の版です。</p><h4>見えて、聞こえるショットを描写する</h4><p>開発元のプロンプトガイドでは、構図、被写体、動作、場所、光を軸に依頼を組み立てています。シーン全体の映像スタイルを統一し、動きを明確な段階に分けて説明してください。独自の商品コンセプトなら、小さな機械が作業台の上で 1 回転し、カメラがゆっくり近づく場面を、柔らかな窓の光と控えめなモーター音とともに描けます。視聴者に注目してほしい点と、動作の終わり方を明示します。</p><p>各ショットのカメラの動きと被写体の動作を、理解しやすく保ってください。複雑なシーケンスは、構図、動作、照明をそれぞれ指定したショット単位に分けられます。複数のクリップを 1 つのシーケンスにする場合は、被写体の細部と色調を共通にします。ガイドでは、一般に短いショットのほうが指示に忠実になりやすく、同じプロンプトを繰り返し生成しても異なるテイクになると強調しています。</p><p>モデルの発表では、リアル、映画的、アニメの各スタイルを含め、物理的な挙動とショット間の連続性の改善が説明されています。これらは、指示して確かめるべき目標能力です。最初のフレームが自然に見えるだけでシーケンス全体も一貫すると考えず、動き、物体同士の接触、比率、連続性を確認してください。動作が不明瞭なら単純化し、目に見える始まりと終わりを設定します。</p><h4>会話と音を分けて指示する</h4><p>せりふは映像の説明と分けて指定し、話者のラベルを一貫させます。会話は、動作と予定するクリップの長さに収まる短さにしてください。2 人のキャラクターが登場するアニメーションなら、短いショットに長い演説を詰め込むより、短い質問と回答を交互にします。ガイドでは、複雑で長い会話はテンポと同期を乱すおそれがあると注意しています。</p><p>小さな動作の音、室内の環境音、周囲の現象が生むリズムなど、シーンに合った音の環境を説明してください。どの音を動作に合わせるかを明示します。生成された発話と効果音を映像と一緒に聞き、話者の割り当て、言葉、タイミングを確認します。同期した音声は生成クリップの一部であり、別のテキスト回答ではありません。</p><h4>サイズ、長さ、画像を使った冒頭</h4><p>標準モデルで文書化されている出力サイズは、縦向きの 720×1280 と横向きの 1280×720 です。Pro プロファイルの高解像度サイズを、標準 Sora 2 の仕様として扱わないでください。サイズと長さは明示的なリクエスト設定です。プロンプトに別のサイズを書いたり、より長い映像を求めたりしても、その設定は変わりません。生成リファレンスには 4 秒、8 秒、12 秒のクリップ設定が記載されているため、ショットの準備では短く明確な動きの単位を選びます。拡張された開発元のワークフローには、16 秒と 20 秒のクリップ設定も記載されています。</p><p>参照画像が最初のフレームの基準となり、テキストでその後の展開を説明します。開発元は JPEG、PNG、WebP の参照画像に対応し、画像を対象動画のサイズに合わせることを求めています。冒頭の画像で被写体、環境、構図を整え、その後の具体的な動きを指示してください。これは開始フレームの参照であり、クリップ全体のすべての細部が一致する保証ではありません。</p><h4>再利用可能な人間以外のキャラクター</h4><p>拡張された開発元のワークフローでは、動物、マスコット、物体の短い参照動画から、再利用可能なキャラクターアセットを作れます。準備ガイドは、長さがおよそ 2〜4 秒、解像度が 720p〜1080p、アスペクト比が 16:9 または 9:16 の MP4 クリップを求めています。元動画と出力のアスペクト比を合わせると、引き伸ばされた見た目を避けやすくなります。1 回の生成で参照できるキャラクターは最大 2 つです。</p><p>キャラクター識別子を保持し、プロンプトにその名前を記載してください。識別子を渡すだけでは、ガイドが示す準備を満たしません。画像を使った生成にはキャラクターアセットを併用できますが、動画の延長では使えません。開発元は標準で人間に似たキャラクターのアップロードをブロックし、文書化された API フローでは人間の顔を含む参照画像を拒否します。Sora アプリの個人キャラクター機能は、別の製品ワークフローです。</p><h4>完成したクリップを延長、編集する</h4><p>延長では、完成した元動画と続きのプロンプトを受け取り、元クリップ全体を、動き、カメラの方向、シーンの連続性に関するコンテキストとして使います。ガイドには、1 回の延長で最大 20 秒を追加できると説明されています。文書化されている延長の入力は元動画とテキストで、このモードでは追加のキャラクターや画像の参照を使えません。つながりなく無関係なシーンを導入するのではなく、既存の動作がどう続くかを説明してください。</p><p>動画編集は、既存のクリップへの明確な変更を対象とします。対象を絞った修正では、ショットの残りを保ちながら物体の色やシーンの色調を変えられます。開発元のガイドは、一度に 1 つの明確な変更を行うことを勧め、生成済み動画の編集と、別の利用条件がある任意の映像のアップロードを区別しています。完成した元動画を残し、次の編集の前に必要な修正を正確に指定してください。</p><h4>レンダリングジョブと完成動画</h4><p>文書化された開発元の動画フローは非同期です。送信されたジョブは、完了または失敗する前に、待機中や処理中の状態になる場合があります。完了したジョブからは MP4 動画が得られ、サムネイルとスプライトシートのアセットはプレビューや一覧表示に使えます。ジョブの識別情報を、プロンプト、参照素材、返されたアセットと関連付けて保持してください。最初のジョブ応答は、再生可能な完成動画ではありません。</p><p>通常のダウンロードワークフローでは、ダウンロード URL の有効期間は 1 時間と説明されています。拡張されたバッチワークフローでは、安定した項目識別子とアップロード済み参照素材を使って独立した JSON レンダリングリクエストを用意し、各ショットに結果を対応付けます。その完成アセットには最大 24 時間という別のダウンロード期間があります。完成したクリップを速やかに保存し、採用テイクとみなす前に実際の映像と音を確認してください。</p><p>開発元が文書化している API のコンテンツ制限では、18 歳未満の視聴者にも適した素材を求め、著作権で保護されたキャラクターや音楽、実在する人物の生成を拒否します。それに沿ってシーンと参照素材を用意してください。モデルが直接返す結果は音声付きの動画であり、生成した静止画、対話ツールの応答、長さ無制限の映画ではありません。映像コンセプトを発展させる際は、標準モデルの正確な識別情報と、採用した元クリップを保持します。</p>",
  "aboutText": "Sora 2 は、文章によるシーン説明や参照画像から動きのあるクリップを作る、OpenAI の動画・音声生成モデルです。映像の連続した動きとともに、同期した発話、効果音、背景音を生成します。標準の Sora 2 プロファイルは、映像表現の探索、コンセプト開発、試作、ラフ編集向けに位置付けられています。Sora 2 Pro は、より高い映像忠実度と高解像度での仕上げを目指す別の版です。\n\n### 見えて、聞こえるショットを描写する\n\n開発元のプロンプトガイドでは、構図、被写体、動作、場所、光を軸に依頼を組み立てています。シーン全体の映像スタイルを統一し、動きを明確な段階に分けて説明してください。独自の商品コンセプトなら、小さな機械が作業台の上で 1 回転し、カメラがゆっくり近づく場面を、柔らかな窓の光と控えめなモーター音とともに描けます。視聴者に注目してほしい点と、動作の終わり方を明示します。\n\n各ショットのカメラの動きと被写体の動作を、理解しやすく保ってください。複雑なシーケンスは、構図、動作、照明をそれぞれ指定したショット単位に分けられます。複数のクリップを 1 つのシーケンスにする場合は、被写体の細部と色調を共通にします。ガイドでは、一般に短いショットのほうが指示に忠実になりやすく、同じプロンプトを繰り返し生成しても異なるテイクになると強調しています。\n\nモデルの発表では、リアル、映画的、アニメの各スタイルを含め、物理的な挙動とショット間の連続性の改善が説明されています。これらは、指示して確かめるべき目標能力です。最初のフレームが自然に見えるだけでシーケンス全体も一貫すると考えず、動き、物体同士の接触、比率、連続性を確認してください。動作が不明瞭なら単純化し、目に見える始まりと終わりを設定します。\n\n### 会話と音を分けて指示する\n\nせりふは映像の説明と分けて指定し、話者のラベルを一貫させます。会話は、動作と予定するクリップの長さに収まる短さにしてください。2 人のキャラクターが登場するアニメーションなら、短いショットに長い演説を詰め込むより、短い質問と回答を交互にします。ガイドでは、複雑で長い会話はテンポと同期を乱すおそれがあると注意しています。\n\n小さな動作の音、室内の環境音、周囲の現象が生むリズムなど、シーンに合った音の環境を説明してください。どの音を動作に合わせるかを明示します。生成された発話と効果音を映像と一緒に聞き、話者の割り当て、言葉、タイミングを確認します。同期した音声は生成クリップの一部であり、別のテキスト回答ではありません。\n\n### サイズ、長さ、画像を使った冒頭\n\n標準モデルで文書化されている出力サイズは、縦向きの 720×1280 と横向きの 1280×720 です。Pro プロファイルの高解像度サイズを、標準 Sora 2 の仕様として扱わないでください。サイズと長さは明示的なリクエスト設定です。プロンプトに別のサイズを書いたり、より長い映像を求めたりしても、その設定は変わりません。生成リファレンスには 4 秒、8 秒、12 秒のクリップ設定が記載されているため、ショットの準備では短く明確な動きの単位を選びます。拡張された開発元のワークフローには、16 秒と 20 秒のクリップ設定も記載されています。\n\n参照画像が最初のフレームの基準となり、テキストでその後の展開を説明します。開発元は JPEG、PNG、WebP の参照画像に対応し、画像を対象動画のサイズに合わせることを求めています。冒頭の画像で被写体、環境、構図を整え、その後の具体的な動きを指示してください。これは開始フレームの参照であり、クリップ全体のすべての細部が一致する保証ではありません。\n\n### 再利用可能な人間以外のキャラクター\n\n拡張された開発元のワークフローでは、動物、マスコット、物体の短い参照動画から、再利用可能なキャラクターアセットを作れます。準備ガイドは、長さがおよそ 2〜4 秒、解像度が 720p〜1080p、アスペクト比が 16:9 または 9:16 の MP4 クリップを求めています。元動画と出力のアスペクト比を合わせると、引き伸ばされた見た目を避けやすくなります。1 回の生成で参照できるキャラクターは最大 2 つです。\n\nキャラクター識別子を保持し、プロンプトにその名前を記載してください。識別子を渡すだけでは、ガイドが示す準備を満たしません。画像を使った生成にはキャラクターアセットを併用できますが、動画の延長では使えません。開発元は標準で人間に似たキャラクターのアップロードをブロックし、文書化された API フローでは人間の顔を含む参照画像を拒否します。Sora アプリの個人キャラクター機能は、別の製品ワークフローです。\n\n### 完成したクリップを延長、編集する\n\n延長では、完成した元動画と続きのプロンプトを受け取り、元クリップ全体を、動き、カメラの方向、シーンの連続性に関するコンテキストとして使います。ガイドには、1 回の延長で最大 20 秒を追加できると説明されています。文書化されている延長の入力は元動画とテキストで、このモードでは追加のキャラクターや画像の参照を使えません。つながりなく無関係なシーンを導入するのではなく、既存の動作がどう続くかを説明してください。\n\n動画編集は、既存のクリップへの明確な変更を対象とします。対象を絞った修正では、ショットの残りを保ちながら物体の色やシーンの色調を変えられます。開発元のガイドは、一度に 1 つの明確な変更を行うことを勧め、生成済み動画の編集と、別の利用条件がある任意の映像のアップロードを区別しています。完成した元動画を残し、次の編集の前に必要な修正を正確に指定してください。\n\n### レンダリングジョブと完成動画\n\n文書化された開発元の動画フローは非同期です。送信されたジョブは、完了または失敗する前に、待機中や処理中の状態になる場合があります。完了したジョブからは MP4 動画が得られ、サムネイルとスプライトシートのアセットはプレビューや一覧表示に使えます。ジョブの識別情報を、プロンプト、参照素材、返されたアセットと関連付けて保持してください。最初のジョブ応答は、再生可能な完成動画ではありません。\n\n通常のダウンロードワークフローでは、ダウンロード URL の有効期間は 1 時間と説明されています。拡張されたバッチワークフローでは、安定した項目識別子とアップロード済み参照素材を使って独立した JSON レンダリングリクエストを用意し、各ショットに結果を対応付けます。その完成アセットには最大 24 時間という別のダウンロード期間があります。完成したクリップを速やかに保存し、採用テイクとみなす前に実際の映像と音を確認してください。\n\n開発元が文書化している API のコンテンツ制限では、18 歳未満の視聴者にも適した素材を求め、著作権で保護されたキャラクターや音楽、実在する人物の生成を拒否します。それに沿ってシーンと参照素材を用意してください。モデルが直接返す結果は音声付きの動画であり、生成した静止画、対話ツールの応答、長さ無制限の映画ではありません。映像コンセプトを発展させる際は、標準モデルの正確な識別情報と、採用した元クリップを保持します。",
  "editorialOverlay": {
    "copy_fields": null,
    "copy_sha256": null,
    "copy_source": null,
    "html_sha256": "c7f495a921b0aa817eb3c60d433c9cddb4c1ef72137379da0ee769760bdb10b5",
    "module_sha256": "ee9dc1c50b1e6a8fb7fa062030fcb4646b9aaaeb08be513b723a5a92a7290f06",
    "raw_model_unchanged": true,
    "schema": "ailoot-native-model-editorial-v1"
  },
  "locale": "ja",
  "methods": [
    {
      "html": "<div class=\"sheet-head\"><span class=\"mav\" aria-hidden=\"true\">•</span><h2 id=\"sheet-title\">sora-2</h2><button class=\"icon-btn\" type=\"button\" data-close-sheet aria-label=\"閉じる\">×</button></div><div class=\"idline\"><span>その他 /</span><code>sora-2</code><button type=\"button\" id=\"copy-id\">IDをコピー</button></div><nav class=\"card-jump-nav\" aria-label=\"モデルカードのセクション\"><button type=\"button\" data-card-jump=\"overview\">はじめに</button><button type=\"button\" data-card-jump=\"methods\">入力とメソッド</button><button type=\"button\" data-card-jump=\"pricing\">料金</button><button type=\"button\" data-card-jump=\"examples\">例</button><button type=\"button\" data-card-jump=\"results\">結果</button><button type=\"button\" data-card-jump=\"aliases\">エイリアス</button></nav><div class=\"card-method-tabs\" role=\"tablist\" aria-label=\"APIメソッド\"><button type=\"button\" role=\"tab\" tabindex=\"-1\" aria-controls=\"card-method-content\" aria-selected=\"false\" id=\"card-method-tab-0\" data-card-method=\"Ultra|messages|/v1/messages|sora-2\">Messages</button><button type=\"button\" role=\"tab\" tabindex=\"0\" aria-controls=\"card-method-content\" aria-selected=\"true\" id=\"card-method-tab-1\" data-card-method=\"Ultra|chat_completions|/v1/chat/completions|sora-2\">Chat Completions</button></div><div id=\"card-method-content\" role=\"tabpanel\" aria-labelledby=\"card-method-tab-1\"><section class=\"card-section\" data-card-section=\"overview\"><h3 tabindex=\"-1\">はじめに</h3><p class=\"mdesc-full\">Sora 2 は、テキストや参照画像から、会話、効果音、背景音を同期させた動画を生成します。標準プロファイルは映像表現の探索やコンセプト映像に対応し、再利用可能な人間以外のキャラクター、延長、対象を絞った動画編集には、それぞれ開発元の専用ワークフローがあります。</p><dl class=\"card-io\" data-card-io><div><dt>対応する入力</dt><dd>テキスト</dd></div><div><dt>結果</dt><dd>json · sse</dd></div></dl><details class=\"card-about\"><summary>モデルについて</summary><p class=\"note-s\" data-model-method-boundary>この説明はモデルの機能を紹介するものです。Ailootで利用できる入力、出力、オプションは、選択したメソッドごとに以下に記載されています。</p><div class=\"mabout\" id=\"m-about\"><p>Sora 2 は、文章によるシーン説明や参照画像から動きのあるクリップを作る、OpenAI の動画・音声生成モデルです。映像の連続した動きとともに、同期した発話、効果音、背景音を生成します。標準の Sora 2 プロファイルは、映像表現の探索、コンセプト開発、試作、ラフ編集向けに位置付けられています。Sora 2 Pro は、より高い映像忠実度と高解像度での仕上げを目指す別の版です。</p><h4>見えて、聞こえるショットを描写する</h4><p>開発元のプロンプトガイドでは、構図、被写体、動作、場所、光を軸に依頼を組み立てています。シーン全体の映像スタイルを統一し、動きを明確な段階に分けて説明してください。独自の商品コンセプトなら、小さな機械が作業台の上で 1 回転し、カメラがゆっくり近づく場面を、柔らかな窓の光と控えめなモーター音とともに描けます。視聴者に注目してほしい点と、動作の終わり方を明示します。</p><p>各ショットのカメラの動きと被写体の動作を、理解しやすく保ってください。複雑なシーケンスは、構図、動作、照明をそれぞれ指定したショット単位に分けられます。複数のクリップを 1 つのシーケンスにする場合は、被写体の細部と色調を共通にします。ガイドでは、一般に短いショットのほうが指示に忠実になりやすく、同じプロンプトを繰り返し生成しても異なるテイクになると強調しています。</p><p>モデルの発表では、リアル、映画的、アニメの各スタイルを含め、物理的な挙動とショット間の連続性の改善が説明されています。これらは、指示して確かめるべき目標能力です。最初のフレームが自然に見えるだけでシーケンス全体も一貫すると考えず、動き、物体同士の接触、比率、連続性を確認してください。動作が不明瞭なら単純化し、目に見える始まりと終わりを設定します。</p><h4>会話と音を分けて指示する</h4><p>せりふは映像の説明と分けて指定し、話者のラベルを一貫させます。会話は、動作と予定するクリップの長さに収まる短さにしてください。2 人のキャラクターが登場するアニメーションなら、短いショットに長い演説を詰め込むより、短い質問と回答を交互にします。ガイドでは、複雑で長い会話はテンポと同期を乱すおそれがあると注意しています。</p><p>小さな動作の音、室内の環境音、周囲の現象が生むリズムなど、シーンに合った音の環境を説明してください。どの音を動作に合わせるかを明示します。生成された発話と効果音を映像と一緒に聞き、話者の割り当て、言葉、タイミングを確認します。同期した音声は生成クリップの一部であり、別のテキスト回答ではありません。</p><h4>サイズ、長さ、画像を使った冒頭</h4><p>標準モデルで文書化されている出力サイズは、縦向きの 720×1280 と横向きの 1280×720 です。Pro プロファイルの高解像度サイズを、標準 Sora 2 の仕様として扱わないでください。サイズと長さは明示的なリクエスト設定です。プロンプトに別のサイズを書いたり、より長い映像を求めたりしても、その設定は変わりません。生成リファレンスには 4 秒、8 秒、12 秒のクリップ設定が記載されているため、ショットの準備では短く明確な動きの単位を選びます。拡張された開発元のワークフローには、16 秒と 20 秒のクリップ設定も記載されています。</p><p>参照画像が最初のフレームの基準となり、テキストでその後の展開を説明します。開発元は JPEG、PNG、WebP の参照画像に対応し、画像を対象動画のサイズに合わせることを求めています。冒頭の画像で被写体、環境、構図を整え、その後の具体的な動きを指示してください。これは開始フレームの参照であり、クリップ全体のすべての細部が一致する保証ではありません。</p><h4>再利用可能な人間以外のキャラクター</h4><p>拡張された開発元のワークフローでは、動物、マスコット、物体の短い参照動画から、再利用可能なキャラクターアセットを作れます。準備ガイドは、長さがおよそ 2〜4 秒、解像度が 720p〜1080p、アスペクト比が 16:9 または 9:16 の MP4 クリップを求めています。元動画と出力のアスペクト比を合わせると、引き伸ばされた見た目を避けやすくなります。1 回の生成で参照できるキャラクターは最大 2 つです。</p><p>キャラクター識別子を保持し、プロンプトにその名前を記載してください。識別子を渡すだけでは、ガイドが示す準備を満たしません。画像を使った生成にはキャラクターアセットを併用できますが、動画の延長では使えません。開発元は標準で人間に似たキャラクターのアップロードをブロックし、文書化された API フローでは人間の顔を含む参照画像を拒否します。Sora アプリの個人キャラクター機能は、別の製品ワークフローです。</p><h4>完成したクリップを延長、編集する</h4><p>延長では、完成した元動画と続きのプロンプトを受け取り、元クリップ全体を、動き、カメラの方向、シーンの連続性に関するコンテキストとして使います。ガイドには、1 回の延長で最大 20 秒を追加できると説明されています。文書化されている延長の入力は元動画とテキストで、このモードでは追加のキャラクターや画像の参照を使えません。つながりなく無関係なシーンを導入するのではなく、既存の動作がどう続くかを説明してください。</p><p>動画編集は、既存のクリップへの明確な変更を対象とします。対象を絞った修正では、ショットの残りを保ちながら物体の色やシーンの色調を変えられます。開発元のガイドは、一度に 1 つの明確な変更を行うことを勧め、生成済み動画の編集と、別の利用条件がある任意の映像のアップロードを区別しています。完成した元動画を残し、次の編集の前に必要な修正を正確に指定してください。</p><h4>レンダリングジョブと完成動画</h4><p>文書化された開発元の動画フローは非同期です。送信されたジョブは、完了または失敗する前に、待機中や処理中の状態になる場合があります。完了したジョブからは MP4 動画が得られ、サムネイルとスプライトシートのアセットはプレビューや一覧表示に使えます。ジョブの識別情報を、プロンプト、参照素材、返されたアセットと関連付けて保持してください。最初のジョブ応答は、再生可能な完成動画ではありません。</p><p>通常のダウンロードワークフローでは、ダウンロード URL の有効期間は 1 時間と説明されています。拡張されたバッチワークフローでは、安定した項目識別子とアップロード済み参照素材を使って独立した JSON レンダリングリクエストを用意し、各ショットに結果を対応付けます。その完成アセットには最大 24 時間という別のダウンロード期間があります。完成したクリップを速やかに保存し、採用テイクとみなす前に実際の映像と音を確認してください。</p><p>開発元が文書化している API のコンテンツ制限では、18 歳未満の視聴者にも適した素材を求め、著作権で保護されたキャラクターや音楽、実在する人物の生成を拒否します。それに沿ってシーンと参照素材を用意してください。モデルが直接返す結果は音声付きの動画であり、生成した静止画、対話ツールの応答、長さ無制限の映画ではありません。映像コンセプトを発展させる際は、標準モデルの正確な識別情報と、採用した元クリップを保持します。</p></div></details></section><section class=\"card-section\" data-card-section=\"methods\"><h3 tabindex=\"-1\">Ailootで利用可能 · 入力とメソッド</h3><details class=\"card-method\" open><summary><b>Ailoot Ultra · Chat Completions</b> <code>POST /v1/chat/completions</code></summary><dl class=\"method-capabilities\"><div><dt>入力の種類</dt><dd><code>text</code></dd></div><div><dt>出力の種類</dt><dd><code>json</code>, <code>sse</code></dd></div><div><dt>出力形式</dt><dd>JSONまたはtext/event-stream</dd></div></dl><div class=\"tw\" data-card-parameters data-typed-parameters><table><thead><tr><th>フィールド</th><th>種類</th><th>要件</th><th>値と制限</th><th>デフォルト</th></tr></thead><tbody><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>string</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span><div>sora-2</div></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">messages</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>message[]</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">messages[].role</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>string</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">messages[].content</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>string</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">stream</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>boolean</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>任意</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"known\"><span class=\"card-cell-label\">デフォルト</span>false</td></tr></tbody></table></div><details class=\"card-about\" data-material-combinations><summary>入力素材の組み合わせ</summary><p class=\"note-s\"><b>owned_text_messages</b></p></details><details class=\"note-s\" data-method-contract><summary>メソッドのパラメータとライフサイクル</summary><div class=\"tw\" data-card-table=\"contract\"><table><thead><tr><th>パラメータ</th><th>仕様</th></tr></thead><tbody><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>content_type</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>application/json</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>required</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>model, messages</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>material_types</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>text</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>messages</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>roleとリテラル文字列のcontentを含むメッセージ配列</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>file_material</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>実際のUTF-8素材は、リテラル文字列のcontentとして挿入できます。ファイル参照を意味するものではありません。</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>optional_controls</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>stream</td></tr></tbody></table></div><p>ライフサイクル: <code>synchronous_json_or_sse</code></p></details></details></section><section class=\"card-section\" data-card-section=\"pricing\"><h3 tabindex=\"-1\">料金</h3><div data-native-semantic-method=\"v1\" data-tariff-reference-only><p class=\"note-s\" data-rate-support-note>料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。</p><dl data-price-conditions><dt>高速モード</dt><dd>未指定 <span class=\"note-s\">高速モードが選択されている場合</span></dd><dt>Flex モード</dt><dd>未指定 <span class=\"note-s\">flex モードが選択されている場合</span></dd><dt>最大推論量</dt><dd>未指定 <span class=\"note-s\">推論量が最大で、調整に既定値（default）を使用する場合</span></dd></dl></div><div data-declared-tariff-pricing><h4>Ailootの料金</h4><h4>設定別の価格</h4><div class=\"tw\" data-pricing-profiles><table><thead><tr><th>設定</th><th>料金表</th><th>料金</th></tr></thead><tbody><tr><th data-cell-label=\"設定\" scope=\"row\"><span class=\"card-cell-label\">設定</span>トークンの基本単価</th><td data-cell-label=\"料金表\"><span class=\"card-cell-label\">料金表</span>基本料金</td><td data-cell-label=\"料金\"><span class=\"card-cell-label\">料金</span><div><span>入力 · 入力トークン</span> <b>$0</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>出力 · 出力トークン</span> <b>$0.2</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>入力 · キャッシュ読み取り</span> <b>$0</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>入力 · キャッシュ書き込み</span> <b>$0</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>入力 · キャッシュ書き込み、1時間</span> <b>—</b> <span class=\"price-unit\">/ 1K トークン</span></div></td></tr></tbody></table></div></div><p class=\"note-s\">Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。<a href=\"/docs/ja/billing/reserve/\">金額の確保と精算の仕組み →</a></p></section><section class=\"card-section\" data-card-section=\"examples\"><h3 tabindex=\"-1\">リクエスト例</h3><h4>Ailoot Ultra · Chat Completions</h4><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"コードの種類\"><button class=\"cg-tab\" id=\"model-code-2605-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2605-panel-0\" aria-selected=\"true\" tabindex=\"0\">curl · 完全な JSON レスポンス</button><button class=\"cg-tab\" id=\"model-code-2605-tab-1\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2605-panel-1\" aria-selected=\"false\" tabindex=\"-1\">Python SDK · 完全な JSON レスポンス</button><button class=\"cg-tab\" id=\"model-code-2605-tab-2\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2605-panel-2\" aria-selected=\"false\" tabindex=\"-1\">curl · SSE ストリームを保存する</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"コードをコピー\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-2605-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-2605-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json,os\nfrom pathlib import Path\np=json.loads(&#39;{&quot;model&quot;:&quot;sora-2&quot;,&quot;messages&quot;:[{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;hello&quot;}],&quot;stream&quot;:false}&#39;)\n\nPath(&quot;request.json&quot;).write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -H &#39;Content-Type: application/json&#39; \\\n  --data-binary @request.json -D response-headers.txt -o result.json\npython3 - &lt;&lt;&#39;PY_RESULT&#39;\nfrom pathlib import Path\nprint(Path(&quot;result.json&quot;).read_text(encoding=&quot;utf-8&quot;))\nPY_RESULT\n</code></pre></div><div class=\"cg-pane\" id=\"model-code-2605-panel-1\" role=\"tabpanel\" aria-labelledby=\"model-code-2605-tab-1\" hidden><pre data-lang=\"python\"><code>from openai import OpenAI\nimport os\n\nif not os.environ.get(&quot;AILOOT_API_KEY&quot;, &quot;&quot;).strip(): raise SystemExit(&quot;Set AILOOT_API_KEY before making a request&quot;)\nclient=OpenAI(base_url=&quot;https://api.ailoot.ai/v1&quot;,api_key=os.environ[&quot;AILOOT_API_KEY&quot;],max_retries=0)\nresult=client.chat.completions.create(model=&quot;sora-2&quot;, messages=[{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;hello&quot;}], stream=False)\nimport json\nfrom pathlib import Path\n\ndata = result.to_dict(mode=&quot;json&quot;)\nPath(&quot;result.json&quot;).write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding=&quot;utf-8&quot;)\nprint(json.dumps(data, ensure_ascii=False, indent=2))\n</code></pre></div><div class=\"cg-pane\" id=\"model-code-2605-panel-2\" role=\"tabpanel\" aria-labelledby=\"model-code-2605-tab-2\" hidden><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json,os\nfrom pathlib import Path\np=json.loads(&#39;{&quot;model&quot;:&quot;sora-2&quot;,&quot;messages&quot;:[{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;hello&quot;}],&quot;stream&quot;:true}&#39;)\n\nPath(&quot;request.json&quot;).write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -H &#39;Content-Type: application/json&#39; \\\n  --data-binary @request.json -D response-headers.txt -o result.sse\n</code></pre></div></div></div></section><section class=\"card-section\" data-card-section=\"results\"><h3 tabindex=\"-1\">結果を受け取って保存</h3><h4>Ailoot Ultra · Chat Completions</h4><p class=\"note-s\">JSONまたはtext/event-stream</p><div class=\"card-result-process\" data-all-results><h5>完了した結果をすべて保存</h5><p class=\"note-s\">返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。</p><p class=\"note-s\">JSONまたはSSEの完全なバイト列、レスポンスヘッダー、返された使用量、提供されたすべての結果フィールドを保持してください。モデル固有の出力種別は断定しません。</p></div><div class=\"card-result-process\" data-unknown-recovery><h5>元のレスポンスを確認する場合</h5><p class=\"note-s\">元のレスポンスと試行の識別情報を保持してください。新しいジョブのポーリングや再送信ができるとは判断しないでください。</p></div><details class=\"card-about\" data-output-fields><summary>レスポンスのフィールド</summary><div class=\"tw\" data-card-table=\"output\"><table><thead><tr><th>フィールド</th><th>種類</th><th>意味</th></tr></thead><tbody><tr><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">complete response JSON</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span>object</td><td data-cell-label=\"意味\"><span class=\"card-cell-label\">意味</span>モデル固有の結果種別を想定せず、返されたすべてのフィールドを保持してください。</td></tr><tr><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">SSE data events</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span>stream</td><td data-cell-label=\"意味\"><span class=\"card-cell-label\">意味</span>返されたイベントと終端マーカーをすべて保持してください。テキストフィールドだけを抜き出さないでください。</td></tr></tbody></table></div></details></section><section class=\"card-section\" data-card-section=\"aliases\"><h3 tabindex=\"-1\">エイリアス</h3><h4>モデルのエイリアス</h4><p class=\"note-s\"><span data-model-alias-route=\"Ultra\"><b>Ailoot Ultra</b> <a href=\"#m=sora-2&amp;route=Ultra&amp;caller=sora-2&amp;fmt=chat_completions\"><code>sora-2</code></a></span></p><h4>メソッドパスのエイリアス</h4><p class=\"note-s\">上記に表示されたメソッドパスを使用してください。</p><h4>関連する呼び出し用ID</h4><p class=\"note-s\"><a href=\"#m=sora-2&amp;route=Ultra&amp;caller=sora-2&amp;fmt=chat_completions\"><code>sora-2</code></a></p></section></div>",
      "method_identity": {
        "effective_request_model_id": "sora-2",
        "fmt": "chat_completions",
        "http": "POST",
        "path": "/v1/chat/completions",
        "request_model_id": "sora-2",
        "route_label": "Ultra"
      },
      "method_key": "Ultra|chat_completions|/v1/chat/completions|sora-2",
      "ordinal": 0,
      "rawMethod": {
        "available": null,
        "cache_read": 0,
        "cache_write": 0,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "example_body": {
              "messages": [
                {
                  "content": "hello",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "hints": [
              "Supply owned text as messages[].content.",
              "Use stream:false for JSON or stream:true for SSE; keep the complete response."
            ],
            "ignored_fields": [],
            "lifecycle": {
              "cancel": null,
              "create": {
                "http": "POST",
                "path": "/v1/chat/completions"
              },
              "job_read": null,
              "mode": "synchronous_json_or_sse",
              "status_poll": null,
              "unknown": "元のレスポンスと試行の識別情報を保持してください。新しいジョブのポーリングや再送信ができるとは判断しないでください。"
            },
            "material_combinations": [
              {
                "alternatives": [
                  "message[] with literal string content"
                ],
                "mode": "owned_text_messages"
              }
            ],
            "outputs": {
              "all_results": "JSONまたはSSEの完全なバイト列、レスポンスヘッダー、返された使用量、提供されたすべての結果フィールドを保持してください。モデル固有の出力種別は断定しません。",
              "family": "protocol",
              "fields": [
                {
                  "description": "モデル固有の結果種別を想定せず、返されたすべてのフィールドを保持してください。",
                  "name": "complete response JSON",
                  "type": "object"
                },
                {
                  "description": "返されたイベントと終端マーカーをすべて保持してください。テキストフィールドだけを抜き出さないでください。",
                  "name": "SSE data events",
                  "type": "stream"
                }
              ],
              "format": "JSONまたはtext/event-stream"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "sora-2"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages[].role",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages[].content",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": false,
                "default_known": true,
                "enum": null,
                "enum_known": false,
                "name": "stream",
                "required": false,
                "type": "boolean"
              }
            ],
            "profile_binding": "Current d09 shared client interface only; model-specific provider output and acceptance are not claimed.",
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "messages": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "content": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "items": {
                              "oneOf": [
                                {
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "text"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "properties": {
                                    "image_url": {
                                      "properties": {
                                        "detail": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ],
                                      "type": "object"
                                    },
                                    "type": {
                                      "const": "image_url"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "image_url"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "type": "array"
                          }
                        ]
                      },
                      "role": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "role",
                      "content"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "model": {
                  "enum": [
                    "sora-2"
                  ],
                  "type": "string"
                },
                "stream": {
                  "default": false,
                  "type": "boolean"
                }
              },
              "required": [
                "model",
                "messages"
              ],
              "type": "object"
            },
            "schema_template": {
              "messages": [
                {
                  "content": "hello",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "unsupported": [
              "Model-specific optional tools or structured-output controls are not part of this minimal profile.",
              "No image/audio/video request controls, dimensions or foreign model limits are inherited.",
              "No asynchronous media job route or manufacturer output capability is inferred."
            ]
          },
          "input": {
            "content_type": "application/json",
            "file_material": "実際のUTF-8素材は、リテラル文字列のcontentとして挿入できます。ファイル参照を意味するものではありません。",
            "material_types": [
              "text"
            ],
            "messages": "roleとリテラル文字列のcontentを含むメッセージ配列",
            "optional_controls": [
              "stream"
            ],
            "required": [
              "model",
              "messages"
            ]
          },
          "lifecycle": {
            "cancel": null,
            "create": {
              "http": "POST",
              "path": "/v1/chat/completions"
            },
            "job_read": null,
            "mode": "synchronous_json_or_sse",
            "status_poll": null,
            "unknown": "Preserve the original response and attempt identity; no new job polling or resubmission is inferred."
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/chat/completions"
          },
          "operation_modes": [
            "request_response",
            "response_stream"
          ],
          "output": {
            "all_results": "Retain the complete JSON or SSE bytes, response headers, returned usage and all supplied result fields. No model-specific output family is asserted.",
            "family": "protocol",
            "format": "JSON or text/event-stream",
            "manufacturer_output_family": null
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "トークンの基本単価",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\np=json.loads('{\"model\":\"sora-2\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":false}')\n\nPath(\"request.json\").write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.json\npython3 - <<'PY_RESULT'\nfrom pathlib import Path\nprint(Path(\"result.json\").read_text(encoding=\"utf-8\"))\nPY_RESULT\n",
            "label": "curl · complete JSON response",
            "language": "bash"
          },
          {
            "code": "from openai import OpenAI\nimport os\n\nif not os.environ.get(\"AILOOT_API_KEY\", \"\").strip(): raise SystemExit(\"Set AILOOT_API_KEY before making a request\")\nclient=OpenAI(base_url=\"https://api.ailoot.ai/v1\",api_key=os.environ[\"AILOOT_API_KEY\"],max_retries=0)\nresult=client.chat.completions.create(model=\"sora-2\", messages=[{\"role\":\"user\",\"content\":\"hello\"}], stream=False)\nimport json\nfrom pathlib import Path\n\ndata = result.to_dict(mode=\"json\")\nPath(\"result.json\").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding=\"utf-8\")\nprint(json.dumps(data, ensure_ascii=False, indent=2))\n",
            "label": "Python SDK · complete JSON response",
            "language": "python"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\np=json.loads('{\"model\":\"sora-2\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":true}')\n\nPath(\"request.json\").write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.sse\n",
            "label": "curl · preserve SSE stream",
            "language": "bash"
          }
        ],
        "family": "openai",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "chat_completions",
        "hints": [
          "Supply owned text as messages[].content.",
          "Use stream:false for JSON or stream:true for SSE; keep the complete response."
        ],
        "http": "POST",
        "in": 0,
        "input": [
          "text"
        ],
        "label": "Chat Completions",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "out": 200,
        "output": [
          "json",
          "sse"
        ],
        "path": "/v1/chat/completions",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "sora-2",
        "route_label": "Ultra",
        "status_reads": [],
        "tiers": [],
        "units": [
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.2000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0002",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      }
    },
    {
      "html": "<div class=\"sheet-head\"><span class=\"mav\" aria-hidden=\"true\">•</span><h2 id=\"sheet-title\">sora-2</h2><button class=\"icon-btn\" type=\"button\" data-close-sheet aria-label=\"閉じる\">×</button></div><div class=\"idline\"><span>その他 /</span><code>sora-2</code><button type=\"button\" id=\"copy-id\">IDをコピー</button></div><nav class=\"card-jump-nav\" aria-label=\"モデルカードのセクション\"><button type=\"button\" data-card-jump=\"overview\">はじめに</button><button type=\"button\" data-card-jump=\"methods\">入力とメソッド</button><button type=\"button\" data-card-jump=\"pricing\">料金</button><button type=\"button\" data-card-jump=\"examples\">例</button><button type=\"button\" data-card-jump=\"results\">結果</button><button type=\"button\" data-card-jump=\"aliases\">エイリアス</button></nav><div class=\"card-method-tabs\" role=\"tablist\" aria-label=\"APIメソッド\"><button type=\"button\" role=\"tab\" tabindex=\"0\" aria-controls=\"card-method-content\" aria-selected=\"true\" id=\"card-method-tab-0\" data-card-method=\"Ultra|messages|/v1/messages|sora-2\">Messages</button><button type=\"button\" role=\"tab\" tabindex=\"-1\" aria-controls=\"card-method-content\" aria-selected=\"false\" id=\"card-method-tab-1\" data-card-method=\"Ultra|chat_completions|/v1/chat/completions|sora-2\">Chat Completions</button></div><div id=\"card-method-content\" role=\"tabpanel\" aria-labelledby=\"card-method-tab-0\"><section class=\"card-section\" data-card-section=\"overview\"><h3 tabindex=\"-1\">はじめに</h3><p class=\"mdesc-full\">Sora 2 は、テキストや参照画像から、会話、効果音、背景音を同期させた動画を生成します。標準プロファイルは映像表現の探索やコンセプト映像に対応し、再利用可能な人間以外のキャラクター、延長、対象を絞った動画編集には、それぞれ開発元の専用ワークフローがあります。</p><dl class=\"card-io\" data-card-io><div><dt>対応する入力</dt><dd>テキスト</dd></div><div><dt>結果</dt><dd>json · sse</dd></div></dl><details class=\"card-about\"><summary>モデルについて</summary><p class=\"note-s\" data-model-method-boundary>この説明はモデルの機能を紹介するものです。Ailootで利用できる入力、出力、オプションは、選択したメソッドごとに以下に記載されています。</p><div class=\"mabout\" id=\"m-about\"><p>Sora 2 は、文章によるシーン説明や参照画像から動きのあるクリップを作る、OpenAI の動画・音声生成モデルです。映像の連続した動きとともに、同期した発話、効果音、背景音を生成します。標準の Sora 2 プロファイルは、映像表現の探索、コンセプト開発、試作、ラフ編集向けに位置付けられています。Sora 2 Pro は、より高い映像忠実度と高解像度での仕上げを目指す別の版です。</p><h4>見えて、聞こえるショットを描写する</h4><p>開発元のプロンプトガイドでは、構図、被写体、動作、場所、光を軸に依頼を組み立てています。シーン全体の映像スタイルを統一し、動きを明確な段階に分けて説明してください。独自の商品コンセプトなら、小さな機械が作業台の上で 1 回転し、カメラがゆっくり近づく場面を、柔らかな窓の光と控えめなモーター音とともに描けます。視聴者に注目してほしい点と、動作の終わり方を明示します。</p><p>各ショットのカメラの動きと被写体の動作を、理解しやすく保ってください。複雑なシーケンスは、構図、動作、照明をそれぞれ指定したショット単位に分けられます。複数のクリップを 1 つのシーケンスにする場合は、被写体の細部と色調を共通にします。ガイドでは、一般に短いショットのほうが指示に忠実になりやすく、同じプロンプトを繰り返し生成しても異なるテイクになると強調しています。</p><p>モデルの発表では、リアル、映画的、アニメの各スタイルを含め、物理的な挙動とショット間の連続性の改善が説明されています。これらは、指示して確かめるべき目標能力です。最初のフレームが自然に見えるだけでシーケンス全体も一貫すると考えず、動き、物体同士の接触、比率、連続性を確認してください。動作が不明瞭なら単純化し、目に見える始まりと終わりを設定します。</p><h4>会話と音を分けて指示する</h4><p>せりふは映像の説明と分けて指定し、話者のラベルを一貫させます。会話は、動作と予定するクリップの長さに収まる短さにしてください。2 人のキャラクターが登場するアニメーションなら、短いショットに長い演説を詰め込むより、短い質問と回答を交互にします。ガイドでは、複雑で長い会話はテンポと同期を乱すおそれがあると注意しています。</p><p>小さな動作の音、室内の環境音、周囲の現象が生むリズムなど、シーンに合った音の環境を説明してください。どの音を動作に合わせるかを明示します。生成された発話と効果音を映像と一緒に聞き、話者の割り当て、言葉、タイミングを確認します。同期した音声は生成クリップの一部であり、別のテキスト回答ではありません。</p><h4>サイズ、長さ、画像を使った冒頭</h4><p>標準モデルで文書化されている出力サイズは、縦向きの 720×1280 と横向きの 1280×720 です。Pro プロファイルの高解像度サイズを、標準 Sora 2 の仕様として扱わないでください。サイズと長さは明示的なリクエスト設定です。プロンプトに別のサイズを書いたり、より長い映像を求めたりしても、その設定は変わりません。生成リファレンスには 4 秒、8 秒、12 秒のクリップ設定が記載されているため、ショットの準備では短く明確な動きの単位を選びます。拡張された開発元のワークフローには、16 秒と 20 秒のクリップ設定も記載されています。</p><p>参照画像が最初のフレームの基準となり、テキストでその後の展開を説明します。開発元は JPEG、PNG、WebP の参照画像に対応し、画像を対象動画のサイズに合わせることを求めています。冒頭の画像で被写体、環境、構図を整え、その後の具体的な動きを指示してください。これは開始フレームの参照であり、クリップ全体のすべての細部が一致する保証ではありません。</p><h4>再利用可能な人間以外のキャラクター</h4><p>拡張された開発元のワークフローでは、動物、マスコット、物体の短い参照動画から、再利用可能なキャラクターアセットを作れます。準備ガイドは、長さがおよそ 2〜4 秒、解像度が 720p〜1080p、アスペクト比が 16:9 または 9:16 の MP4 クリップを求めています。元動画と出力のアスペクト比を合わせると、引き伸ばされた見た目を避けやすくなります。1 回の生成で参照できるキャラクターは最大 2 つです。</p><p>キャラクター識別子を保持し、プロンプトにその名前を記載してください。識別子を渡すだけでは、ガイドが示す準備を満たしません。画像を使った生成にはキャラクターアセットを併用できますが、動画の延長では使えません。開発元は標準で人間に似たキャラクターのアップロードをブロックし、文書化された API フローでは人間の顔を含む参照画像を拒否します。Sora アプリの個人キャラクター機能は、別の製品ワークフローです。</p><h4>完成したクリップを延長、編集する</h4><p>延長では、完成した元動画と続きのプロンプトを受け取り、元クリップ全体を、動き、カメラの方向、シーンの連続性に関するコンテキストとして使います。ガイドには、1 回の延長で最大 20 秒を追加できると説明されています。文書化されている延長の入力は元動画とテキストで、このモードでは追加のキャラクターや画像の参照を使えません。つながりなく無関係なシーンを導入するのではなく、既存の動作がどう続くかを説明してください。</p><p>動画編集は、既存のクリップへの明確な変更を対象とします。対象を絞った修正では、ショットの残りを保ちながら物体の色やシーンの色調を変えられます。開発元のガイドは、一度に 1 つの明確な変更を行うことを勧め、生成済み動画の編集と、別の利用条件がある任意の映像のアップロードを区別しています。完成した元動画を残し、次の編集の前に必要な修正を正確に指定してください。</p><h4>レンダリングジョブと完成動画</h4><p>文書化された開発元の動画フローは非同期です。送信されたジョブは、完了または失敗する前に、待機中や処理中の状態になる場合があります。完了したジョブからは MP4 動画が得られ、サムネイルとスプライトシートのアセットはプレビューや一覧表示に使えます。ジョブの識別情報を、プロンプト、参照素材、返されたアセットと関連付けて保持してください。最初のジョブ応答は、再生可能な完成動画ではありません。</p><p>通常のダウンロードワークフローでは、ダウンロード URL の有効期間は 1 時間と説明されています。拡張されたバッチワークフローでは、安定した項目識別子とアップロード済み参照素材を使って独立した JSON レンダリングリクエストを用意し、各ショットに結果を対応付けます。その完成アセットには最大 24 時間という別のダウンロード期間があります。完成したクリップを速やかに保存し、採用テイクとみなす前に実際の映像と音を確認してください。</p><p>開発元が文書化している API のコンテンツ制限では、18 歳未満の視聴者にも適した素材を求め、著作権で保護されたキャラクターや音楽、実在する人物の生成を拒否します。それに沿ってシーンと参照素材を用意してください。モデルが直接返す結果は音声付きの動画であり、生成した静止画、対話ツールの応答、長さ無制限の映画ではありません。映像コンセプトを発展させる際は、標準モデルの正確な識別情報と、採用した元クリップを保持します。</p></div></details></section><section class=\"card-section\" data-card-section=\"methods\"><h3 tabindex=\"-1\">Ailootで利用可能 · 入力とメソッド</h3><details class=\"card-method\" open><summary><b>Ailoot Ultra · Anthropic メッセージ</b> <code>POST /v1/messages</code></summary><dl class=\"method-capabilities\"><div><dt>入力の種類</dt><dd><code>text</code></dd></div><div><dt>出力の種類</dt><dd><code>json</code>, <code>sse</code></dd></div><div><dt>出力形式</dt><dd>JSONまたはSSE</dd></div></dl><div class=\"tw\" data-card-parameters data-typed-parameters><table><thead><tr><th>フィールド</th><th>種類</th><th>要件</th><th>値と制限</th><th>デフォルト</th></tr></thead><tbody><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>string</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span><div>sora-2</div></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">messages</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>message[]</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">messages[].role</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>string</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span><div>user, assistant</div></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">messages[].content</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>string</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">max_tokens</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>integer</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>必須</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"unspecified\"><span class=\"card-cell-label\">デフォルト</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">stream</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span><code>boolean</code></td><td data-cell-label=\"要件\"><span class=\"card-cell-label\">要件</span>任意</td><td data-cell-label=\"値と制限\"><span class=\"card-cell-label\">値と制限</span></td><td data-cell-label=\"デフォルト\" data-default=\"known\"><span class=\"card-cell-label\">デフォルト</span>false</td></tr></tbody></table></div><details class=\"card-about\" data-material-combinations><summary>入力素材の組み合わせ</summary><p class=\"note-s\"><b>テキスト</b> · UTF-8テキスト</p><p class=\"note-s\"><code>messages[].contentの文字列</code></p></details><details class=\"note-s\" data-method-contract><summary>メソッドのパラメータとライフサイクル</summary><div class=\"tw\" data-card-table=\"contract\"><table><thead><tr><th>パラメータ</th><th>仕様</th></tr></thead><tbody><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>content_type</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>application/json</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>required</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>model, messages, max_tokens</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>optional_controls</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>stream</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>material_types</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>text</td></tr><tr><th data-cell-label=\"パラメータ\" scope=\"row\"><span class=\"card-cell-label\">パラメータ</span><code>text_file_material</code></th><td data-cell-label=\"仕様\"><span class=\"card-cell-label\">仕様</span>実際のUTF-8文書を読み、その本文を指定された入力またはメッセージ内容の文字列に入れてください。</td></tr></tbody></table></div><p>ライフサイクル: <code>synchronous_or_streamed</code></p></details></details></section><section class=\"card-section\" data-card-section=\"pricing\"><h3 tabindex=\"-1\">料金</h3><div data-native-semantic-method=\"v1\" data-tariff-reference-only><p class=\"note-s\" data-rate-support-note>料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。</p><dl data-price-conditions><dt>高速モード</dt><dd>未指定 <span class=\"note-s\">高速モードが選択されている場合</span></dd><dt>Flex モード</dt><dd>未指定 <span class=\"note-s\">flex モードが選択されている場合</span></dd><dt>最大推論量</dt><dd>未指定 <span class=\"note-s\">推論量が最大で、調整に既定値（default）を使用する場合</span></dd></dl></div><div data-declared-tariff-pricing><h4>Ailootの料金</h4><h4>設定別の価格</h4><div class=\"tw\" data-pricing-profiles><table><thead><tr><th>設定</th><th>料金表</th><th>料金</th></tr></thead><tbody><tr><th data-cell-label=\"設定\" scope=\"row\"><span class=\"card-cell-label\">設定</span>トークンの基本単価</th><td data-cell-label=\"料金表\"><span class=\"card-cell-label\">料金表</span>基本料金</td><td data-cell-label=\"料金\"><span class=\"card-cell-label\">料金</span><div><span>入力 · 入力トークン</span> <b>$0</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>出力 · 出力トークン</span> <b>$0.2</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>入力 · キャッシュ読み取り</span> <b>$0</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>入力 · キャッシュ書き込み</span> <b>$0</b> <span class=\"price-unit\">/ 1K トークン</span></div><div><span>入力 · キャッシュ書き込み、1時間</span> <b>—</b> <span class=\"price-unit\">/ 1K トークン</span></div></td></tr></tbody></table></div></div><p class=\"note-s\">Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。<a href=\"/docs/ja/billing/reserve/\">金額の確保と精算の仕組み →</a></p></section><section class=\"card-section\" data-card-section=\"examples\"><h3 tabindex=\"-1\">リクエスト例</h3><h4>Ailoot Ultra · Anthropic メッセージ</h4><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"コードの種類\"><button class=\"cg-tab\" id=\"model-code-2606-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2606-panel-0\" aria-selected=\"true\" tabindex=\"0\">必要最小限の完全な JSON ボディ</button><button class=\"cg-tab\" id=\"model-code-2606-tab-1\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2606-panel-1\" aria-selected=\"false\" tabindex=\"-1\">curl · ご自身の UTF-8 ドキュメントを使用する</button><button class=\"cg-tab\" id=\"model-code-2606-tab-2\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2606-panel-2\" aria-selected=\"false\" tabindex=\"-1\">Python · 結果全体を保存する</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"コードをコピー\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-2606-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-2606-tab-0\"><pre data-lang=\"json\"><code>{\n  &quot;model&quot;: &quot;sora-2&quot;,\n  &quot;max_tokens&quot;: 128,\n  &quot;messages&quot;: [\n    {\n      &quot;role&quot;: &quot;user&quot;,\n      &quot;content&quot;: &quot;Summarize the incident report.&quot;\n    }\n  ],\n  &quot;stream&quot;: false\n}</code></pre></div><div class=\"cg-pane\" id=\"model-code-2606-panel-1\" role=\"tabpanel\" aria-labelledby=\"model-code-2606-tab-1\" hidden><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\n: &quot;${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}&quot;\nexport AILOOT_TEXT_FILE\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json, os\nfrom pathlib import Path\n\nsource_file = Path(os.environ[&#39;AILOOT_TEXT_FILE&#39;])\nif not source_file.is_file():\n    raise SystemExit(&#39;Set AILOOT_TEXT_FILE to your actual UTF-8 document&#39;)\ntext = source_file.read_text(encoding=&#39;utf-8&#39;)\nif not text.strip():\n    raise SystemExit(&#39;Choose a document containing text&#39;)\npayload = {&#39;model&#39;: &#39;sora-2&#39;, &#39;max_tokens&#39;: 128, &#39;messages&#39;: [{&#39;role&#39;: &#39;user&#39;, &#39;content&#39;: &#39;Summarize the incident report.&#39;}]}\npayload[&#39;messages&#39;][0][&#39;content&#39;] = &#39;Summarize this material and quote supporting source passages.\\n\\n&#39; + text\nPath(&#39;request.json&#39;).write_text(json.dumps(payload, ensure_ascii=False), encoding=&#39;utf-8&#39;)\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \\\n  -H &quot;x-api-key: $AILOOT_API_KEY&quot; -H &#39;anthropic-version: 2023-06-01&#39; -H &#39;Content-Type: application/json&#39; \\\n  --data-binary @request.json -D response-headers.txt -o result.json\npython3 - &lt;&lt;&#39;PY_RESULT&#39;\nimport json\nfrom pathlib import Path\n\nresult = json.loads(Path(&#39;result.json&#39;).read_text(encoding=&#39;utf-8&#39;))\nprint(json.dumps(result, ensure_ascii=False, indent=2))\nPY_RESULT\n</code></pre></div><div class=\"cg-pane\" id=\"model-code-2606-panel-2\" role=\"tabpanel\" aria-labelledby=\"model-code-2606-tab-2\" hidden><pre data-lang=\"python\"><code>import json, os\nfrom pathlib import Path\n\nsource_file = Path(os.environ[&#39;AILOOT_TEXT_FILE&#39;])\nif not source_file.is_file():\n    raise SystemExit(&#39;Set AILOOT_TEXT_FILE to your actual UTF-8 document&#39;)\ntext = source_file.read_text(encoding=&#39;utf-8&#39;)\nif not text.strip():\n    raise SystemExit(&#39;Choose a document containing text&#39;)\npayload = {&#39;model&#39;: &#39;sora-2&#39;, &#39;max_tokens&#39;: 128, &#39;messages&#39;: [{&#39;role&#39;: &#39;user&#39;, &#39;content&#39;: &#39;Summarize the incident report.&#39;}]}\npayload[&#39;messages&#39;][0][&#39;content&#39;] = &#39;Summarize this material and quote supporting source passages.\\n\\n&#39; + text\nfrom urllib.request import Request, urlopen\nfrom urllib.error import HTTPError\n\napi_key = os.environ[&#39;AILOOT_API_KEY&#39;]\nif not api_key.strip():\n    raise SystemExit(&#39;Set AILOOT_API_KEY before making a request&#39;)\nheaders = {&#39;x-api-key&#39;: &#39;PLACEHOLDER_KEY&#39;, &#39;anthropic-version&#39;: &#39;2023-06-01&#39;, &#39;Content-Type&#39;: &#39;application/json&#39;}\nheaders[&#39;x-api-key&#39;] = api_key\nrequest = Request(&#39;https://api.ailoot.ai/v1/messages&#39;, data=json.dumps(payload, ensure_ascii=False).encode(&#39;utf-8&#39;), headers=headers, method=&#39;POST&#39;)\ntry:\n    with urlopen(request, timeout=120) as response:\n        raw = response.read()\n        Path(&#39;response-headers.txt&#39;).write_text(str(response.headers), encoding=&#39;utf-8&#39;)\nexcept HTTPError as error:\n    Path(&#39;result.json&#39;).write_bytes(error.read())\n    Path(&#39;response-headers.txt&#39;).write_text(str(error.headers), encoding=&#39;utf-8&#39;)\n    raise\nPath(&#39;result.json&#39;).write_bytes(raw)\nimport json\nfrom pathlib import Path\n\nresult = json.loads(Path(&#39;result.json&#39;).read_text(encoding=&#39;utf-8&#39;))\nprint(json.dumps(result, ensure_ascii=False, indent=2))\n</code></pre></div></div></div></section><section class=\"card-section\" data-card-section=\"results\"><h3 tabindex=\"-1\">結果を受け取って保存</h3><h4>Ailoot Ultra · Anthropic メッセージ</h4><p class=\"note-s\">JSONまたはSSE</p><div class=\"card-result-process\" data-all-results><h5>完了した結果をすべて保存</h5><p class=\"note-s\">返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。</p><p class=\"note-s\">すべてのコンテンツブロック、思考署名、実際のツール利用IDを保持してください。SSEのすべてのブロック差分を組み立てます。最初のテキストブロックだけでは完全な出力になりません。</p></div><div class=\"card-result-process\" data-unknown-recovery><h5>元のレスポンスを確認する場合</h5><p class=\"note-s\">リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。</p></div><details class=\"card-about\" data-output-fields><summary>レスポンスのフィールド</summary><div class=\"tw\" data-card-table=\"output\"><table><thead><tr><th>フィールド</th><th>種類</th></tr></thead><tbody><tr><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">id</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span>string</td></tr><tr><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span>string</td></tr><tr><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">content[]</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span>text|thinking|tool_use|other content block</td></tr><tr><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">stop_reason</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span>string|null</td></tr><tr><th data-cell-label=\"フィールド\" scope=\"row\"><span class=\"card-cell-label\">フィールド</span><code class=\"card-field-name\">usage</code></th><td data-cell-label=\"種類\" data-field-type><span class=\"card-cell-label\">種類</span>object</td></tr></tbody></table></div></details><details class=\"card-about\" data-method-errors><summary>エラーと次の手順</summary><div class=\"tw\" data-card-table=\"errors\"><table><thead><tr><th>レスポンス</th><th>条件</th><th>次の手順</th></tr></thead><tbody><tr><th data-cell-label=\"レスポンス\" scope=\"row\"><span class=\"card-cell-label\">レスポンス</span>400 · <code>invalid_request_error</code></th><td data-cell-label=\"条件\"><span class=\"card-cell-label\">条件</span>必須フィールド、素材の表現形式、またはパラメーター値が不正です</td><td data-cell-label=\"次の手順\"><span class=\"card-cell-label\">次の手順</span>新しい生成リクエストを送る前に、指定されたフィールドを修正してください。</td></tr></tbody></table></div></details></section><section class=\"card-section\" data-card-section=\"aliases\"><h3 tabindex=\"-1\">エイリアス</h3><h4>モデルのエイリアス</h4><p class=\"note-s\"><span data-model-alias-route=\"Ultra\"><b>Ailoot Ultra</b> <a href=\"#m=sora-2&amp;route=Ultra&amp;caller=sora-2&amp;fmt=messages\"><code>sora-2</code></a></span></p><h4>メソッドパスのエイリアス</h4><p class=\"note-s\">上記に表示されたメソッドパスを使用してください。</p><h4>関連する呼び出し用ID</h4><p class=\"note-s\"><a href=\"#m=sora-2&amp;route=Ultra&amp;caller=sora-2&amp;fmt=messages\"><code>sora-2</code></a></p></section></div>",
      "method_identity": {
        "effective_request_model_id": "sora-2",
        "fmt": "messages",
        "http": "POST",
        "path": "/v1/messages",
        "request_model_id": "sora-2",
        "route_label": "Ultra"
      },
      "method_key": "Ultra|messages|/v1/messages|sora-2",
      "ordinal": 1,
      "rawMethod": {
        "available": null,
        "cache_read": 0,
        "cache_write": 0,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "headers": [
                "Authorization: Bearer",
                "x-api-key",
                "anthropic-version"
              ],
              "version_example": "2023-06-01"
            },
            "errors": [
              {
                "code": null,
                "condition": "必須フィールド、素材の表現形式、またはパラメーター値が不正です",
                "http_status": 400,
                "recovery": "新しい生成リクエストを送る前に、指定されたフィールドを修正してください。",
                "type": "invalid_request_error"
              }
            ],
            "example_body": {
              "max_tokens": 128,
              "messages": [
                {
                  "content": "Summarize the incident report.",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "lifecycle": {
              "create": {
                "http": "POST",
                "path": "/v1/messages"
              },
              "job_read": null,
              "mode": "synchronous_or_streamed",
              "unknown": "リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。"
            },
            "material_combinations": [
              {
                "mode": "text",
                "representation": "messages[].contentの文字列",
                "required_material": "UTF-8テキスト"
              }
            ],
            "operation_modes": [
              "synchronous_json",
              "streamed_SSE"
            ],
            "outputs": {
              "all_results": "すべてのコンテンツブロック、思考署名、実際のツール利用IDを保持してください。SSEのすべてのブロック差分を組み立てます。最初のテキストブロックだけでは完全な出力になりません。",
              "family": "protocol",
              "fields": [
                {
                  "description": null,
                  "name": "id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "model",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "content[]",
                  "type": "text|thinking|tool_use|other content block"
                },
                {
                  "description": null,
                  "name": "stop_reason",
                  "type": "string|null"
                },
                {
                  "description": null,
                  "name": "usage",
                  "type": "object"
                }
              ],
              "format": "JSONまたはSSE"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "sora-2"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "user",
                  "assistant"
                ],
                "enum_known": true,
                "name": "messages[].role",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages[].content",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "max_tokens",
                "required": true,
                "type": "integer"
              },
              {
                "availability": "source_interface",
                "default": false,
                "default_known": true,
                "enum": null,
                "enum_known": false,
                "name": "stream",
                "required": false,
                "type": "boolean"
              }
            ],
            "profile_binding": "Documented current stock Messages bridge; optional model capabilities are separate from this minimal text request.",
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "max_tokens": {
                  "minimum": 1,
                  "type": "integer"
                },
                "messages": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "content": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "items": {
                              "oneOf": [
                                {
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "text"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "properties": {
                                    "source": {
                                      "oneOf": [
                                        {
                                          "properties": {
                                            "type": {
                                              "const": "url"
                                            },
                                            "url": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "data": {
                                              "type": "string"
                                            },
                                            "media_type": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "base64"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "media_type",
                                            "data"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "type": {
                                      "const": "image"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "source"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "type": "array"
                          }
                        ]
                      },
                      "role": {
                        "enum": [
                          "user",
                          "assistant"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "role",
                      "content"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "model": {
                  "enum": [
                    "sora-2"
                  ],
                  "type": "string"
                },
                "stream": {
                  "default": false,
                  "type": "boolean"
                }
              },
              "required": [
                "model",
                "messages",
                "max_tokens"
              ],
              "type": "object"
            },
            "schema_template": {
              "max_tokens": 128,
              "messages": [
                {
                  "content": "Summarize the incident report.",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "unsupported": [
              "No query API key.",
              "Hosted/server-side tools and model-specific optional controls are not part of this minimal family example."
            ]
          },
          "input": {
            "content_type": "application/json",
            "material_types": [
              "text"
            ],
            "optional_controls": [
              "stream"
            ],
            "required": [
              "model",
              "messages",
              "max_tokens"
            ],
            "text_file_material": "実際のUTF-8文書を読み、その本文を指定された入力またはメッセージ内容の文字列に入れてください。"
          },
          "lifecycle": {
            "create": {
              "http": "POST",
              "path": "/v1/messages"
            },
            "job_read": null,
            "mode": "synchronous_or_streamed",
            "unknown": "Keep request/response IDs and headers. No generic text job retrieval URL is supplied."
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/messages"
          },
          "output": {
            "all_results": "Keep all content blocks, thinking signatures and actual tool-use IDs. Assemble all SSE block deltas; a first text block is not the complete output.",
            "family": "protocol",
            "format": "JSON or SSE"
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "トークンの基本単価",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "{\n  \"model\": \"sora-2\",\n  \"max_tokens\": 128,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the incident report.\"\n    }\n  ],\n  \"stream\": false\n}",
            "label": "Complete minimal JSON body",
            "language": "json"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\n: \"${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}\"\nexport AILOOT_TEXT_FILE\npython3 - <<'PY_REQUEST'\nimport json, os\nfrom pathlib import Path\n\nsource_file = Path(os.environ['AILOOT_TEXT_FILE'])\nif not source_file.is_file():\n    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')\ntext = source_file.read_text(encoding='utf-8')\nif not text.strip():\n    raise SystemExit('Choose a document containing text')\npayload = {'model': 'sora-2', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}\npayload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\\n\\n' + text\nPath('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \\\n  -H \"x-api-key: $AILOOT_API_KEY\" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.json\npython3 - <<'PY_RESULT'\nimport json\nfrom pathlib import Path\n\nresult = json.loads(Path('result.json').read_text(encoding='utf-8'))\nprint(json.dumps(result, ensure_ascii=False, indent=2))\nPY_RESULT\n",
            "label": "curl · use your UTF-8 document",
            "language": "bash"
          },
          {
            "code": "import json, os\nfrom pathlib import Path\n\nsource_file = Path(os.environ['AILOOT_TEXT_FILE'])\nif not source_file.is_file():\n    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')\ntext = source_file.read_text(encoding='utf-8')\nif not text.strip():\n    raise SystemExit('Choose a document containing text')\npayload = {'model': 'sora-2', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}\npayload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\\n\\n' + text\nfrom urllib.request import Request, urlopen\nfrom urllib.error import HTTPError\n\napi_key = os.environ['AILOOT_API_KEY']\nif not api_key.strip():\n    raise SystemExit('Set AILOOT_API_KEY before making a request')\nheaders = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}\nheaders['x-api-key'] = api_key\nrequest = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')\ntry:\n    with urlopen(request, timeout=120) as response:\n        raw = response.read()\n        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')\nexcept HTTPError as error:\n    Path('result.json').write_bytes(error.read())\n    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')\n    raise\nPath('result.json').write_bytes(raw)\nimport json\nfrom pathlib import Path\n\nresult = json.loads(Path('result.json').read_text(encoding='utf-8'))\nprint(json.dumps(result, ensure_ascii=False, indent=2))\n",
            "label": "Python · save the complete result",
            "language": "python"
          }
        ],
        "family": "anthropic",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "messages",
        "http": "POST",
        "in": 0,
        "input": [
          "text"
        ],
        "label": "Anthropic メッセージ",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "out": 200,
        "output": [
          "json",
          "sse"
        ],
        "path": "/v1/messages",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "sora-2",
        "route_label": "Ultra",
        "status_reads": [],
        "tiers": [],
        "units": [
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.2000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0002",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      }
    }
  ],
  "model_id": "sora-2",
  "nativeProvenance": {
    "input_facts_canonical_sha256": "10d7caca903f0a58d3ad9f7a73e0ac3dea7daad67ef46e5203e4bc2be2473b34",
    "input_html_sha256": "8b9b4ec93b08641b563a07923f0cd28719aa9b83b958873f74bd888f09c1b15a",
    "private_audit_sha256": "c3e75d7566eab44d6e633970316642040608d1ea901e30719c8c04e53dd362e6",
    "role": "historical-normalized-input-audit-hashes",
    "schema": "ailoot-native-model-provenance-v2"
  },
  "page": {
    "canonical": "https://ailoot.ai/models/ja/sora-2/",
    "description": "Sora 2 は、テキストや参照画像から、会話、効果音、背景音を同期させた動画を生成します。標準プロファイルは映像表現の探索やコンセプト映像に対応し、再利用可能な人間以外のキャラクター、延長、対象を絞った動画編集には、それぞれ開発元の専用ワークフローがあります。",
    "locale": "ja",
    "md_url": "https://ailoot.ai/models/ja/sora-2/index.md",
    "title": "sora-2 — Ailoot",
    "url": "https://ailoot.ai/models/ja/sora-2/"
  },
  "rawModel": {
    "about": "Sora 2 は、文章によるシーン説明や参照画像から動きのあるクリップを作る、OpenAI の動画・音声生成モデルです。映像の連続した動きとともに、同期した発話、効果音、背景音を生成します。標準の Sora 2 プロファイルは、映像表現の探索、コンセプト開発、試作、ラフ編集向けに位置付けられています。Sora 2 Pro は、より高い映像忠実度と高解像度での仕上げを目指す別の版です。\n\n### 見えて、聞こえるショットを描写する\n\n開発元のプロンプトガイドでは、構図、被写体、動作、場所、光を軸に依頼を組み立てています。シーン全体の映像スタイルを統一し、動きを明確な段階に分けて説明してください。独自の商品コンセプトなら、小さな機械が作業台の上で 1 回転し、カメラがゆっくり近づく場面を、柔らかな窓の光と控えめなモーター音とともに描けます。視聴者に注目してほしい点と、動作の終わり方を明示します。\n\n各ショットのカメラの動きと被写体の動作を、理解しやすく保ってください。複雑なシーケンスは、構図、動作、照明をそれぞれ指定したショット単位に分けられます。複数のクリップを 1 つのシーケンスにする場合は、被写体の細部と色調を共通にします。ガイドでは、一般に短いショットのほうが指示に忠実になりやすく、同じプロンプトを繰り返し生成しても異なるテイクになると強調しています。\n\nモデルの発表では、リアル、映画的、アニメの各スタイルを含め、物理的な挙動とショット間の連続性の改善が説明されています。これらは、指示して確かめるべき目標能力です。最初のフレームが自然に見えるだけでシーケンス全体も一貫すると考えず、動き、物体同士の接触、比率、連続性を確認してください。動作が不明瞭なら単純化し、目に見える始まりと終わりを設定します。\n\n### 会話と音を分けて指示する\n\nせりふは映像の説明と分けて指定し、話者のラベルを一貫させます。会話は、動作と予定するクリップの長さに収まる短さにしてください。2 人のキャラクターが登場するアニメーションなら、短いショットに長い演説を詰め込むより、短い質問と回答を交互にします。ガイドでは、複雑で長い会話はテンポと同期を乱すおそれがあると注意しています。\n\n小さな動作の音、室内の環境音、周囲の現象が生むリズムなど、シーンに合った音の環境を説明してください。どの音を動作に合わせるかを明示します。生成された発話と効果音を映像と一緒に聞き、話者の割り当て、言葉、タイミングを確認します。同期した音声は生成クリップの一部であり、別のテキスト回答ではありません。\n\n### サイズ、長さ、画像を使った冒頭\n\n標準モデルで文書化されている出力サイズは、縦向きの 720×1280 と横向きの 1280×720 です。Pro プロファイルの高解像度サイズを、標準 Sora 2 の仕様として扱わないでください。サイズと長さは明示的なリクエスト設定です。プロンプトに別のサイズを書いたり、より長い映像を求めたりしても、その設定は変わりません。生成リファレンスには 4 秒、8 秒、12 秒のクリップ設定が記載されているため、ショットの準備では短く明確な動きの単位を選びます。拡張された開発元のワークフローには、16 秒と 20 秒のクリップ設定も記載されています。\n\n参照画像が最初のフレームの基準となり、テキストでその後の展開を説明します。開発元は JPEG、PNG、WebP の参照画像に対応し、画像を対象動画のサイズに合わせることを求めています。冒頭の画像で被写体、環境、構図を整え、その後の具体的な動きを指示してください。これは開始フレームの参照であり、クリップ全体のすべての細部が一致する保証ではありません。\n\n### 再利用可能な人間以外のキャラクター\n\n拡張された開発元のワークフローでは、動物、マスコット、物体の短い参照動画から、再利用可能なキャラクターアセットを作れます。準備ガイドは、長さがおよそ 2〜4 秒、解像度が 720p〜1080p、アスペクト比が 16:9 または 9:16 の MP4 クリップを求めています。元動画と出力のアスペクト比を合わせると、引き伸ばされた見た目を避けやすくなります。1 回の生成で参照できるキャラクターは最大 2 つです。\n\nキャラクター識別子を保持し、プロンプトにその名前を記載してください。識別子を渡すだけでは、ガイドが示す準備を満たしません。画像を使った生成にはキャラクターアセットを併用できますが、動画の延長では使えません。開発元は標準で人間に似たキャラクターのアップロードをブロックし、文書化された API フローでは人間の顔を含む参照画像を拒否します。Sora アプリの個人キャラクター機能は、別の製品ワークフローです。\n\n### 完成したクリップを延長、編集する\n\n延長では、完成した元動画と続きのプロンプトを受け取り、元クリップ全体を、動き、カメラの方向、シーンの連続性に関するコンテキストとして使います。ガイドには、1 回の延長で最大 20 秒を追加できると説明されています。文書化されている延長の入力は元動画とテキストで、このモードでは追加のキャラクターや画像の参照を使えません。つながりなく無関係なシーンを導入するのではなく、既存の動作がどう続くかを説明してください。\n\n動画編集は、既存のクリップへの明確な変更を対象とします。対象を絞った修正では、ショットの残りを保ちながら物体の色やシーンの色調を変えられます。開発元のガイドは、一度に 1 つの明確な変更を行うことを勧め、生成済み動画の編集と、別の利用条件がある任意の映像のアップロードを区別しています。完成した元動画を残し、次の編集の前に必要な修正を正確に指定してください。\n\n### レンダリングジョブと完成動画\n\n文書化された開発元の動画フローは非同期です。送信されたジョブは、完了または失敗する前に、待機中や処理中の状態になる場合があります。完了したジョブからは MP4 動画が得られ、サムネイルとスプライトシートのアセットはプレビューや一覧表示に使えます。ジョブの識別情報を、プロンプト、参照素材、返されたアセットと関連付けて保持してください。最初のジョブ応答は、再生可能な完成動画ではありません。\n\n通常のダウンロードワークフローでは、ダウンロード URL の有効期間は 1 時間と説明されています。拡張されたバッチワークフローでは、安定した項目識別子とアップロード済み参照素材を使って独立した JSON レンダリングリクエストを用意し、各ショットに結果を対応付けます。その完成アセットには最大 24 時間という別のダウンロード期間があります。完成したクリップを速やかに保存し、採用テイクとみなす前に実際の映像と音を確認してください。\n\n開発元が文書化している API のコンテンツ制限では、18 歳未満の視聴者にも適した素材を求め、著作権で保護されたキャラクターや音楽、実在する人物の生成を拒否します。それに沿ってシーンと参照素材を用意してください。モデルが直接返す結果は音声付きの動画であり、生成した静止画、対話ツールの応答、長さ無制限の映画ではありません。映像コンセプトを発展させる際は、標準モデルの正確な識別情報と、採用した元クリップを保持します。",
    "alias_of": null,
    "aliases": [],
    "author": "Other",
    "capabilities": {
      "context_length": 60000,
      "manufacturer_input": [],
      "manufacturer_output": []
    },
    "card_routes": [
      {
        "label": "Ultra",
        "rates": [
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.2000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0002",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          }
        ],
        "summary": "構成の料金情報はすべて詳細で確認できます。"
      }
    ],
    "ctx": null,
    "formats": [
      "chat_completions",
      "messages"
    ],
    "id": "sora-2",
    "input": [
      "text"
    ],
    "kind": "text",
    "max_out": null,
    "methods": [
      {
        "available": null,
        "cache_read": 0,
        "cache_write": 0,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "example_body": {
              "messages": [
                {
                  "content": "hello",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "hints": [
              "Supply owned text as messages[].content.",
              "Use stream:false for JSON or stream:true for SSE; keep the complete response."
            ],
            "ignored_fields": [],
            "lifecycle": {
              "cancel": null,
              "create": {
                "http": "POST",
                "path": "/v1/chat/completions"
              },
              "job_read": null,
              "mode": "synchronous_json_or_sse",
              "status_poll": null,
              "unknown": "元のレスポンスと試行の識別情報を保持してください。新しいジョブのポーリングや再送信ができるとは判断しないでください。"
            },
            "material_combinations": [
              {
                "alternatives": [
                  "message[] with literal string content"
                ],
                "mode": "owned_text_messages"
              }
            ],
            "outputs": {
              "all_results": "JSONまたはSSEの完全なバイト列、レスポンスヘッダー、返された使用量、提供されたすべての結果フィールドを保持してください。モデル固有の出力種別は断定しません。",
              "family": "protocol",
              "fields": [
                {
                  "description": "モデル固有の結果種別を想定せず、返されたすべてのフィールドを保持してください。",
                  "name": "complete response JSON",
                  "type": "object"
                },
                {
                  "description": "返されたイベントと終端マーカーをすべて保持してください。テキストフィールドだけを抜き出さないでください。",
                  "name": "SSE data events",
                  "type": "stream"
                }
              ],
              "format": "JSONまたはtext/event-stream"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "sora-2"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages[].role",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages[].content",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": false,
                "default_known": true,
                "enum": null,
                "enum_known": false,
                "name": "stream",
                "required": false,
                "type": "boolean"
              }
            ],
            "profile_binding": "Current d09 shared client interface only; model-specific provider output and acceptance are not claimed.",
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "messages": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "content": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "items": {
                              "oneOf": [
                                {
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "text"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "properties": {
                                    "image_url": {
                                      "properties": {
                                        "detail": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ],
                                      "type": "object"
                                    },
                                    "type": {
                                      "const": "image_url"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "image_url"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "type": "array"
                          }
                        ]
                      },
                      "role": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "role",
                      "content"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "model": {
                  "enum": [
                    "sora-2"
                  ],
                  "type": "string"
                },
                "stream": {
                  "default": false,
                  "type": "boolean"
                }
              },
              "required": [
                "model",
                "messages"
              ],
              "type": "object"
            },
            "schema_template": {
              "messages": [
                {
                  "content": "hello",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "unsupported": [
              "Model-specific optional tools or structured-output controls are not part of this minimal profile.",
              "No image/audio/video request controls, dimensions or foreign model limits are inherited.",
              "No asynchronous media job route or manufacturer output capability is inferred."
            ]
          },
          "input": {
            "content_type": "application/json",
            "file_material": "実際のUTF-8素材は、リテラル文字列のcontentとして挿入できます。ファイル参照を意味するものではありません。",
            "material_types": [
              "text"
            ],
            "messages": "roleとリテラル文字列のcontentを含むメッセージ配列",
            "optional_controls": [
              "stream"
            ],
            "required": [
              "model",
              "messages"
            ]
          },
          "lifecycle": {
            "cancel": null,
            "create": {
              "http": "POST",
              "path": "/v1/chat/completions"
            },
            "job_read": null,
            "mode": "synchronous_json_or_sse",
            "status_poll": null,
            "unknown": "Preserve the original response and attempt identity; no new job polling or resubmission is inferred."
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/chat/completions"
          },
          "operation_modes": [
            "request_response",
            "response_stream"
          ],
          "output": {
            "all_results": "Retain the complete JSON or SSE bytes, response headers, returned usage and all supplied result fields. No model-specific output family is asserted.",
            "family": "protocol",
            "format": "JSON or text/event-stream",
            "manufacturer_output_family": null
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "トークンの基本単価",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\np=json.loads('{\"model\":\"sora-2\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":false}')\n\nPath(\"request.json\").write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.json\npython3 - <<'PY_RESULT'\nfrom pathlib import Path\nprint(Path(\"result.json\").read_text(encoding=\"utf-8\"))\nPY_RESULT\n",
            "label": "curl · complete JSON response",
            "language": "bash"
          },
          {
            "code": "from openai import OpenAI\nimport os\n\nif not os.environ.get(\"AILOOT_API_KEY\", \"\").strip(): raise SystemExit(\"Set AILOOT_API_KEY before making a request\")\nclient=OpenAI(base_url=\"https://api.ailoot.ai/v1\",api_key=os.environ[\"AILOOT_API_KEY\"],max_retries=0)\nresult=client.chat.completions.create(model=\"sora-2\", messages=[{\"role\":\"user\",\"content\":\"hello\"}], stream=False)\nimport json\nfrom pathlib import Path\n\ndata = result.to_dict(mode=\"json\")\nPath(\"result.json\").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding=\"utf-8\")\nprint(json.dumps(data, ensure_ascii=False, indent=2))\n",
            "label": "Python SDK · complete JSON response",
            "language": "python"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json,os\nfrom pathlib import Path\np=json.loads('{\"model\":\"sora-2\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}],\"stream\":true}')\n\nPath(\"request.json\").write_text(json.dumps(p,ensure_ascii=False))\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.sse\n",
            "label": "curl · preserve SSE stream",
            "language": "bash"
          }
        ],
        "family": "openai",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "chat_completions",
        "hints": [
          "Supply owned text as messages[].content.",
          "Use stream:false for JSON or stream:true for SSE; keep the complete response."
        ],
        "http": "POST",
        "in": 0,
        "input": [
          "text"
        ],
        "label": "Chat Completions",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "out": 200,
        "output": [
          "json",
          "sse"
        ],
        "path": "/v1/chat/completions",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "sora-2",
        "route_label": "Ultra",
        "status_reads": [],
        "tiers": [],
        "units": [
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.2000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0002",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      },
      {
        "available": null,
        "cache_read": 0,
        "cache_write": 0,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "headers": [
                "Authorization: Bearer",
                "x-api-key",
                "anthropic-version"
              ],
              "version_example": "2023-06-01"
            },
            "errors": [
              {
                "code": null,
                "condition": "必須フィールド、素材の表現形式、またはパラメーター値が不正です",
                "http_status": 400,
                "recovery": "新しい生成リクエストを送る前に、指定されたフィールドを修正してください。",
                "type": "invalid_request_error"
              }
            ],
            "example_body": {
              "max_tokens": 128,
              "messages": [
                {
                  "content": "Summarize the incident report.",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "lifecycle": {
              "create": {
                "http": "POST",
                "path": "/v1/messages"
              },
              "job_read": null,
              "mode": "synchronous_or_streamed",
              "unknown": "リクエスト／応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。"
            },
            "material_combinations": [
              {
                "mode": "text",
                "representation": "messages[].contentの文字列",
                "required_material": "UTF-8テキスト"
              }
            ],
            "operation_modes": [
              "synchronous_json",
              "streamed_SSE"
            ],
            "outputs": {
              "all_results": "すべてのコンテンツブロック、思考署名、実際のツール利用IDを保持してください。SSEのすべてのブロック差分を組み立てます。最初のテキストブロックだけでは完全な出力になりません。",
              "family": "protocol",
              "fields": [
                {
                  "description": null,
                  "name": "id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "model",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "content[]",
                  "type": "text|thinking|tool_use|other content block"
                },
                {
                  "description": null,
                  "name": "stop_reason",
                  "type": "string|null"
                },
                {
                  "description": null,
                  "name": "usage",
                  "type": "object"
                }
              ],
              "format": "JSONまたはSSE"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "sora-2"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "user",
                  "assistant"
                ],
                "enum_known": true,
                "name": "messages[].role",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "messages[].content",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "max_tokens",
                "required": true,
                "type": "integer"
              },
              {
                "availability": "source_interface",
                "default": false,
                "default_known": true,
                "enum": null,
                "enum_known": false,
                "name": "stream",
                "required": false,
                "type": "boolean"
              }
            ],
            "profile_binding": "Documented current stock Messages bridge; optional model capabilities are separate from this minimal text request.",
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "max_tokens": {
                  "minimum": 1,
                  "type": "integer"
                },
                "messages": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "content": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "items": {
                              "oneOf": [
                                {
                                  "properties": {
                                    "text": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "text"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "text"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "properties": {
                                    "source": {
                                      "oneOf": [
                                        {
                                          "properties": {
                                            "type": {
                                              "const": "url"
                                            },
                                            "url": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "url"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "data": {
                                              "type": "string"
                                            },
                                            "media_type": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "base64"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "media_type",
                                            "data"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "type": {
                                      "const": "image"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "source"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "type": "array"
                          }
                        ]
                      },
                      "role": {
                        "enum": [
                          "user",
                          "assistant"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "role",
                      "content"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                },
                "model": {
                  "enum": [
                    "sora-2"
                  ],
                  "type": "string"
                },
                "stream": {
                  "default": false,
                  "type": "boolean"
                }
              },
              "required": [
                "model",
                "messages",
                "max_tokens"
              ],
              "type": "object"
            },
            "schema_template": {
              "max_tokens": 128,
              "messages": [
                {
                  "content": "Summarize the incident report.",
                  "role": "user"
                }
              ],
              "model": "sora-2",
              "stream": false
            },
            "unsupported": [
              "No query API key.",
              "Hosted/server-side tools and model-specific optional controls are not part of this minimal family example."
            ]
          },
          "input": {
            "content_type": "application/json",
            "material_types": [
              "text"
            ],
            "optional_controls": [
              "stream"
            ],
            "required": [
              "model",
              "messages",
              "max_tokens"
            ],
            "text_file_material": "実際のUTF-8文書を読み、その本文を指定された入力またはメッセージ内容の文字列に入れてください。"
          },
          "lifecycle": {
            "create": {
              "http": "POST",
              "path": "/v1/messages"
            },
            "job_read": null,
            "mode": "synchronous_or_streamed",
            "unknown": "Keep request/response IDs and headers. No generic text job retrieval URL is supplied."
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/messages"
          },
          "output": {
            "all_results": "Keep all content blocks, thinking signatures and actual tool-use IDs. Assemble all SSE block deltas; a first text block is not the complete output.",
            "family": "protocol",
            "format": "JSON or SSE"
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "トークンの基本単価",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "{\n  \"model\": \"sora-2\",\n  \"max_tokens\": 128,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the incident report.\"\n    }\n  ],\n  \"stream\": false\n}",
            "label": "Complete minimal JSON body",
            "language": "json"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\n: \"${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}\"\nexport AILOOT_TEXT_FILE\npython3 - <<'PY_REQUEST'\nimport json, os\nfrom pathlib import Path\n\nsource_file = Path(os.environ['AILOOT_TEXT_FILE'])\nif not source_file.is_file():\n    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')\ntext = source_file.read_text(encoding='utf-8')\nif not text.strip():\n    raise SystemExit('Choose a document containing text')\npayload = {'model': 'sora-2', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}\npayload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\\n\\n' + text\nPath('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \\\n  -H \"x-api-key: $AILOOT_API_KEY\" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \\\n  --data-binary @request.json -D response-headers.txt -o result.json\npython3 - <<'PY_RESULT'\nimport json\nfrom pathlib import Path\n\nresult = json.loads(Path('result.json').read_text(encoding='utf-8'))\nprint(json.dumps(result, ensure_ascii=False, indent=2))\nPY_RESULT\n",
            "label": "curl · use your UTF-8 document",
            "language": "bash"
          },
          {
            "code": "import json, os\nfrom pathlib import Path\n\nsource_file = Path(os.environ['AILOOT_TEXT_FILE'])\nif not source_file.is_file():\n    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')\ntext = source_file.read_text(encoding='utf-8')\nif not text.strip():\n    raise SystemExit('Choose a document containing text')\npayload = {'model': 'sora-2', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}\npayload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\\n\\n' + text\nfrom urllib.request import Request, urlopen\nfrom urllib.error import HTTPError\n\napi_key = os.environ['AILOOT_API_KEY']\nif not api_key.strip():\n    raise SystemExit('Set AILOOT_API_KEY before making a request')\nheaders = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}\nheaders['x-api-key'] = api_key\nrequest = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')\ntry:\n    with urlopen(request, timeout=120) as response:\n        raw = response.read()\n        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')\nexcept HTTPError as error:\n    Path('result.json').write_bytes(error.read())\n    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')\n    raise\nPath('result.json').write_bytes(raw)\nimport json\nfrom pathlib import Path\n\nresult = json.loads(Path('result.json').read_text(encoding='utf-8'))\nprint(json.dumps(result, ensure_ascii=False, indent=2))\n",
            "label": "Python · save the complete result",
            "language": "python"
          }
        ],
        "family": "anthropic",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "messages",
        "http": "POST",
        "in": 0,
        "input": [
          "text"
        ],
        "label": "Anthropic メッセージ",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "method_aliases": [],
        "out": 200,
        "output": [
          "json",
          "sse"
        ],
        "path": "/v1/messages",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.2000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.0002",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "sora-2",
        "route_label": "Ultra",
        "status_reads": [],
        "tiers": [],
        "units": [
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.2000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.0002",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": "0",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": "0",
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      }
    ],
    "model_aliases": [
      {
        "canonical_model_id": "sora-2",
        "request_model_id": "sora-2",
        "route_label": "Ultra"
      }
    ],
    "name": "sora-2",
    "price": {
      "in": 0,
      "in_label": null,
      "out": 200,
      "out_label": null,
      "scope_label": "Token rates",
      "sort_in": 0,
      "sort_out": 200,
      "varies": false
    },
    "short": "Sora 2 は、テキストや参照画像から、会話、効果音、背景音を同期させた動画を生成します。標準プロファイルは映像表現の探索やコンセプト映像に対応し、再利用可能な人間以外のキャラクター、延長、対象を絞った動画編集には、それぞれ開発元の専用ワークフローがあります。"
  },
  "renderer_schema": {
    "method_order": "Original DTO methods order; every exact route/format/path/caller survives.",
    "prices": "Original public DTO fields and original native display HTML; no flattened or normalized offers."
  },
  "representation": "exact-public-dto-and-native-renderer-html",
  "representationNotes": {
    "current_reference": {
      "about_json_pointer": "/aboutHtml",
      "methods": [
        {
          "contract_json_pointer": "/methods/0/rawMethod/contract",
          "html_json_pointer": "/methods/0/html",
          "method_ordinal": 0
        },
        {
          "contract_json_pointer": "/methods/1/rawMethod/contract",
          "html_json_pointer": "/methods/1/html",
          "method_ordinal": 1
        }
      ],
      "role": "current-semantic-reference"
    },
    "raw_input": {
      "examples_role": "historical-input-not-current-ready-examples",
      "json_pointers": [
        "/rawModel",
        "/methods/0/rawMethod",
        "/methods/1/rawMethod"
      ],
      "role": "historical-owner-input"
    },
    "schema": "ailoot-native-model-representations-v1"
  },
  "schema": "ailoot-static-model-facts-v1",
  "schema_version": 1,
  "shortText": "Sora 2 は、テキストや参照画像から、会話、効果音、背景音を同期させた動画を生成します。標準プロファイルは映像表現の探索やコンセプト映像に対応し、再利用可能な人間以外のキャラクター、延長、対象を絞った動画編集には、それぞれ開発元の専用ワークフローがあります。",
  "source": {
    "audit_sha256": "2e00086bcbfc28e64d0cebe97aa47c17d8d5618963027f8ffb9dc6123d7d25b1",
    "bridge_map_sha256": "1125275768b9636fc8461bc7da5061239a81ddfe508e2557843ca42c58ab0036",
    "raw_model_json_sha256": "37b020dec3956b087c94dca77403172b4263070f64cb01a2136017f0fef41945",
    "renderer_sha256": "b06e5309d3e585ab5fe0535c1a8bd6320bdc357ea8509c2389320e8fa40c36e5"
  },
  "sourceRevision": "a6e0c80e07730bc81bc7efbc5dc34824db5706d04f35a80a1f3b653302e23150"
}
