OpenAI: GPT-5 Image Mini
GPT-5 Image Miniは、OpenAIのGPT-5 Miniの言語機能とGPT Image 1 Miniを組み合わせ、画像生成や参照資料に基づく編集を行います。テキスト、画像、文書を受け取り、テキストと画像を返します。文章による回答と視覚素材の両方を必要とするワークフローに対応します。
- Ailoot Ultra · OpenAI チャット
POST /v1/chat/completionsopenai/gpt-5-image-mini - Ailoot Ultra · 画像
POST /v1/images/generationsopenai/gpt-5-image-mini - Ailoot Ultra · Anthropic メッセージ
POST /v1/messagesopenai/gpt-5-image-mini
モデルについて
この説明はモデルの機能を紹介するものです。Ailootで利用できる入力、出力、オプションは、選択したメソッドごとに以下に記載されています。
GPT-5 Image Miniは、OpenAIのGPT-5 MiniとGPT Image 1 Miniを中心に構成された、言語と画像を組み合わせるプロファイルです。言語コンポーネントが文章のタスクと元の資料を解釈し、画像コンポーネントが視覚コンテンツを作成または修正します。公開されたプロファイルでは、指示への追従、画像内の文字の描画、細かな画像編集が重視されています。文章の解釈、説明、補足文も必要とする、対象を絞った画像制作の依頼に役立ちます。
文章のタスクと画像の結果を結び付ける
目的とする素材、被写体、構図、必要な文字を含む依頼書を用意してください。商品コンセプト、短い説明に添えるイラスト、ページの画像案など、画像の使い道を説明します。文章と画像の成果物を明示的に求め、コンセプトの説明と画像そのものを区別しやすくします。
例えば、繰り返し使えるウォーターボトルの説明を提供し、短いキャプションを添えたシンプルな商品シーンのコンセプトを求めます。見えるボトルの形、背景、光の方向、画像内に入れる正確な言葉を指定してください。キャプションに使う事実と、シーンの装飾的な細部は分けます。返された画像と文章を、依頼書のこの二つの部分に照らして確認します。
文書化された複合プロファイルは、テキスト、画像、PDFなどのファイルを受け取ります。文書は、画像を作成する前に解釈すべき要件や事実を提供できます。画像は、外観、レイアウト、編集元を提供できます。すべての添付ファイルが結果のすべての部分に影響するはずだと考えず、各資料の役割を示してください。複数の入力を提供する場合は、資料の名前と順序を明確に保ちます。
参照資料を使って生成し、修正する
新しい画像では、何を表示するか、各部分がどのような関係にあるかを指定してください。参照資料に基づく編集では、変更内容と保持する細部を明示します。商品シーンでは、識別できる商品の形や見えるラベルを維持しながら、新しい背景設定を求められます。図では、残す文字と要素を指定しながら、関係の修正を求められます。
このプロファイル自体の公開カードでは、編集に最大16枚の参照画像を使えます。タスクに役立つ参照資料を選び、商品、キャラクター、背景、視覚的な表現方法など、その目的を説明してください。複数の参照資料で照明や構図が食い違う場合があるため、意図する結果を明確に示します。実際に返された画像で、被写体の細部、文字、依頼した変更の範囲を確認します。
画像内の文字の描画は文書化された機能ですが、画像案は一語ずつ確認する必要があります。正確な文言、句読点、配置を提供し、重要なラベルや数字を、想定する表示サイズで依頼書と比較してください。繰り返し作るシリーズでは、各結果とともに参照資料と画像の要件を保存し、完成した画像を並べて比較します。
作業コンテキストと制御
複合プロファイルは、400,000トークンのコンテキストウィンドウと、最大128,000の生成トークンを公表しています。これらは作業コンテキストと生成の上限であり、画像のピクセル寸法や、返される画像成果物の数とは別です。長い原資料は、必要な解釈に沿って整理し、回答の余地を残してください。関連する参照資料を添えた簡潔な依頼書は、役割を説明していない無関係な文書より役立ちます。
公開されているテキスト出力の仕様は、JSONスキーマに沿った構造化結果に対応します。アプリケーションが文章の結果を処理する必要がある場合は、フィールドと型を定義し、提供された根拠に照らして値を検証してください。複合プロファイルは、アプリケーションの関数呼び出しを提供しません。言語コンポーネントと画像生成の組み合わせは、この名前のプロファイルの機能です。単独のGPT-5 Miniインターフェースのすべての機能が、このワークフローに含まれることを意味しません。
画像設定は、実際に使う正確なプロファイルとインターフェースに従ってください。修正を比較するときは、選んだ設定をプロンプトとともに保存します。直接使うGPT Image 1 Miniコンポーネントと、複合チャットプロファイルではリクエストの構成が異なります。そのため、コンポーネント固有のサイズ、マスク、出力の制御を、この複合プロファイルの設定として扱うには、明示的な対応付けが必要です。
テキストと画像の成果物を保存する
文書化されたチャットのリクエストスキーマでは、出力モダリティとしてtextとimageを選択できます。返されたテキストと、生成結果に伴う実際の画像成果物をすべて処理してください。結果が示す形式で画像を保存し、文章の回答をプロンプト、元の参照資料、設定とともに保持します。説明文だけを含む生成結果と、完成した画像成果物は異なるため、レイアウトに使う前に、結果に実際に何が含まれているかを確認します。
GPT-5 Image Miniは、GPT-5とGPT Image 1を組み合わせる完全版のGPT-5 Imageプロファイルとは区別されます。Miniプロファイルは、依頼書と確認基準が明確で、範囲を限定した言語と画像のタスクに使ってください。構図、物体の同一性、画像内の文字、補足の文章を確認し、必要な修正を具体的に求めます。成功した要素と関連する参照資料を次の依頼書でも保持し、修正の目標を具体的にします。
実用タスク
実用タスク
英語の技術例
Create a labelled refill-bottle scene
Create a product-scene image of a plain cylindrical blue reusable water bottle with a silver screw cap, standing upright on pale stone. Soft daylight enters from the left. Place the exact word REFILL clearly on the bottle, with no other text, logos, accessories or unsupported product claims. Keep the full bottle visible.期待される結果
One image artifact showing the full specified bottle, left-side daylight and the exact single-word label.結果の確認
Inspect the actual image for bottle shape, cap, complete framing and letter-by-letter spelling of REFILL.Ailoot Ultra · OpenAI チャット POST /v1/chat/completions openai/gpt-5-image-mini
openai/gpt-5-image-miniはじめに
GPT-5 Image Miniは、OpenAIのGPT-5 Miniの言語機能とGPT Image 1 Miniを組み合わせ、画像生成や参照資料に基づく編集を行います。テキスト、画像、文書を受け取り、テキストと画像を返します。文章による回答と視覚素材の両方を必要とするワークフローに対応します。
- 対応する入力
- テキスト
- 結果
- テキスト
Ailootで利用可能 · 入力とメソッド
Ailoot Ultra · OpenAI チャット POST /v1/chat/completions
- 入力の種類
text- 出力の種類
text- 出力形式
- jsonまたはSSE
| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
|---|---|---|---|---|
フィールドmodel | 種類string | 要件必須 | 値と制限 openai/gpt-5-image-mini | デフォルト— |
フィールドmessages | 種類message[] | 要件必須 | 値と制限 最小項目数: 1 | デフォルト— |
フィールドmessages[].role | 種類string | 要件必須 | 値と制限 例:system, user, assistant, tool, function 条件: これらのロールはソースコードの互換型で明示されています。正確なロールの集合はモデルごとに異なります。 モデルによる | デフォルト— |
フィールドmessages[].content | 種類string|content_part[]|null | 要件任意 | 値と制限 | デフォルト— |
フィールドmessages[].tool_calls | 種類tool_call[] | 要件任意 | 値と制限 | デフォルト— |
フィールドmessages[].tool_call_id | 種類string | 要件任意 | 値と制限 適用条件: role=tool。実際に返されたIDを使ってください | デフォルト— |
フィールドmessages[].name | 種類string | 要件任意 | 値と制限 | デフォルト— |
フィールドmessages[].reasoning_content | 種類string | 要件任意 | 値と制限 適用条件: このモデルが使用する場合は、実際に返された推論をそのまま次のリクエストへ戻してください | デフォルト— |
フィールドmessages[].reasoning_details | 種類object|array | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドmax_tokens | 種類integer | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
フィールドmax_completion_tokens | 種類integer | 要件任意 | 値と制限 最小値: 1 モデルによる | デフォルト— |
フィールドstream | 種類boolean | 要件任意 | 値と制限 | デフォルトfalse |
フィールドstream_options.include_usage | 種類boolean | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドtemperature | 種類number | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドtop_p | 種類number | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドstop | 種類string|string[] | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドtools | 種類function_tool[] | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドtools[].type | 種類string | 要件任意 | 値と制限 function モデルによる | デフォルト— |
フィールドtools[].function.name | 種類string | 要件必須 | 値と制限 適用条件: 関数ツールの指定あり | デフォルト— |
フィールドtools[].function.description | 種類string | 要件任意 | 値と制限 | デフォルト— |
フィールドtools[].function.parameters | 種類JSON_schema | 要件任意 | 値と制限 | デフォルト— |
フィールドtool_choice | 種類string|object | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドparallel_tool_calls | 種類boolean | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドresponse_format | 種類object | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドreasoning_effort | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドreasoning | 種類object | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドservice_tier | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドinstructions | 種類string | 要件任意 | 値と制限 互換性用のフィールド | デフォルト— |
フィールドfunctions | 種類function[] | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドfunction_call | 種類string|object | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドprompt_cache_options | 種類object | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドmodalities | 種類string[] | 要件任意 | 値と制限 text | デフォルト— |
フィールドprovider | 種類object | 要件任意 | 値と制限 条件: このUltraテキストルートではprovider.optionsは拒否されます | デフォルト— |
フィールドcache_control.ttl | 種類string | 要件任意 | 値と制限 条件: 実際のプロンプトキャッシュの指定箇所では1hは拒否されます | デフォルト— |
入力素材の組み合わせ
テキスト · UTF8テキスト
messages[].content
メソッドのパラメータとライフサイクル
| パラメータ | 仕様 |
|---|---|
パラメータcontent_type | 仕様application/json |
パラメータrequired | 仕様model, messages |
パラメータmaterial_types | 仕様text |
パラメータmessages | 仕様role/content形式のメッセージ配列 |
パラメータfile_material | 仕様実際のUTF-8文書をテキストとしてそのまま挿入します。ファイルIDは推定しません |
パラメータoptional_controls | 仕様stream, temperature, top_p, stop, max_tokens, max_completion_tokens, reasoning, response_format, tools, tool_choice |
パラメータcontrol_scope | 仕様モデル固有。ユーザーの関数ツールとホスト側のツールは異なります |
パラメータoutput_modalities | 仕様text |
パラメータhosted_operations | 仕様false |
パラメータmultimodal_input_binding | 仕様null |
ライフサイクル: synchronous_or_streamed
正確なモデルIDをmessagesとともに送ってください。
コンテキスト長は出力上限ではありません。
テキストファイルはテキストをそのまま提供できます。画像/音声/ファイルオブジェクトの入力には正確なバインディングが必要です。
料金
料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。
- 高速モード
- 標準料金 高速モードが選択されている場合
- Flex モード
- 標準料金 flex モードが選択されている場合
- 最大推論量
- 標準料金 推論量が最大で、調整に既定値(default)を使用する場合
Ailootの料金
設定別の価格
各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。
| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
|---|---|---|---|---|
| 設定トークンの基本単価 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン $0.005 / 1K トークン 出力 · 出力トークン $0.004 / 1K トークン 入力 · キャッシュ読み取り $0.0005 / 1K トークン 入力 · キャッシュ書き込み — / 1K トークン 入力 · キャッシュ書き込み、1時間 — / 1K トークン 出力 · 出力画像トークン $0.016 / 1K 画像トークン |
| 設定リクエスト長に応じた料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン $0.005 / 1K トークン 出力 · 出力トークン $0.004 / 1K トークン 入力 · キャッシュ読み取り $0.0005 / 1K トークン 入力 · キャッシュ書き込み — / 1K トークン 入力 · キャッシュ書き込み、1時間 — / 1K トークン |
参考料金の詳細
モデル単位の参照料金表は、メソッド選択、見積もり、課金を変更しません。実際の課金には、選択したAilootメソッドの料金を適用します。
OpenAI: GPT-5 Image Mini
設定別の価格
| 設定 | 課金条件 | 料金 |
|---|---|---|
| 設定OpenAI: GPT-5 Image Mini · 標準設定 | 課金条件デフォルト設定 | 料金 入力 · 入力トークン $0.005 / 1K トークン 出力 · 出力トークン $0.004 / 1K トークン 出力 · 出力画像 $0.016 / 1K トークン 出力 · ウェブ検索 $0.02 検索ごと 入力 · キャッシュ読み取り $0.0005 / 1K トークン |
Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。金額の確保と精算の仕組み →
リクエスト例
Ailoot Ultra · OpenAI チャット
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "openai/gpt-5-image-mini", "messages": [{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}]}')
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model='openai/gpt-5-image-mini',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}])
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(result.to_dict(mode="json"))
from openai import OpenAI
import os
from pathlib import Path
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
with client.chat.completions.stream(model='openai/gpt-5-image-mini',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_completion()
save_result(final.to_dict(mode="json"),"stream-result")
結果を受け取って保存
Ailoot Ultra · OpenAI チャット
jsonまたはSSE
完了した結果をすべて保存
返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。
すべての選択肢と、その内容・ツール呼び出し・推論を保持してください。SSEでは選択肢/ツールのインデックスごとに差分を組み立て、最終的な終了理由と使用量を残します。
元のレスポンスを確認する場合
リクエスト/応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。
レスポンスのフィールド
| フィールド | 種類 |
|---|---|
フィールドchoices[].index | 種類integer |
フィールドchoices[].message.content | 種類string|null |
フィールドchoices[].message.tool_calls | 種類tool_call[] |
フィールドchoices[].message.reasoning_content | 種類string |
フィールドchoices[].message.reasoning_details | 種類object|array |
フィールドchoices[].finish_reason | 種類string|null |
フィールドusage | 種類object |
エラーと次の手順
| レスポンス | 条件 | 次の手順 |
|---|---|---|
レスポンス400 · invalid_request_error | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |
エイリアス
モデルのエイリアス
Ailoot Ultra openai/gpt-5-image-mini
メソッドパスのエイリアス
/v1/images
関連する呼び出し用ID
Ailoot Ultra · 画像 POST /v1/images/generations openai/gpt-5-image-mini
openai/gpt-5-image-miniはじめに
GPT-5 Image Miniは、OpenAIのGPT-5 Miniの言語機能とGPT Image 1 Miniを組み合わせ、画像生成や参照資料に基づく編集を行います。テキスト、画像、文書を受け取り、テキストと画像を返します。文章による回答と視覚素材の両方を必要とするワークフローに対応します。
- 対応する入力
- テキスト · 画像
- 結果
- 画像
Ailootで利用可能 · 入力とメソッド
Ailoot Ultra · 画像 POST /v1/images/generations
- 入力の種類
text,image- 出力の種類
image
| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
|---|---|---|---|---|
フィールドmodel | 種類string | 要件必須 | 値と制限 openai/gpt-5-image-mini | デフォルト— |
フィールドprompt | 種類string | 要件必須 | 値と制限 最小の長さ: 1 | デフォルト— |
フィールドaspect_ratio | 種類string | 要件任意 | 値と制限 1:1, 3:2, 2:3, auto | デフォルト— |
フィールドquality | 種類string | 要件任意 | 値と制限 auto, low, medium, high | デフォルト— |
フィールドbackground | 種類string | 要件任意 | 値と制限 auto, transparent, opaque | デフォルト— |
フィールドn | 種類integer | 要件任意 | 値と制限 最小値: 1 最大値: 10 | デフォルト— |
フィールドinput_references | 種類array | 要件任意 | 値と制限 最小項目数: 0 最大項目数: 16 | デフォルト— |
フィールドoutput_compression | 種類integer | 要件任意 | 値と制限 最小値: 0 最大値: 100 | デフォルト— |
フィールドprovider | 種類object | 要件任意 | 値と制限 | デフォルト— |
メソッドのパラメータとライフサイクル
| パラメータ | 仕様 |
|---|---|
パラメータcontent_type | 仕様application/json |
パラメータrequired | 仕様model, prompt |
パラメータmaterial_types | 仕様text, image |
ライフサイクル: synchronous_result_then_owned_library
GET /v1/media/tasks/{task_id} · 実際に返された task_id またはメディアライブラリのレコード
GET /v1/media/assets/{asset_id}/content
GET /v1/media/assets
GET /v1/media/assets/{asset_id}
料金
最終料金の計算方法
表示料金は生成前の費用の見積もりです。最終請求額は、元の生成処理に記録された費用から計算されます。実測された出力時間や予測数量が、そのまま最終的な課金数量になるわけではありません。
料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。
- 高速モード
- 未指定 高速モードが選択されている場合
- Flex モード
- 未指定 flex モードが選択されている場合
- 最大推論量
- 未指定 推論量が最大で、調整に既定値(default)を使用する場合
比較用の推定料金
設定別の価格
各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。
| 設定 | 料金表 | 予測数量 | 料金 |
|---|---|---|---|
| 設定基本トークン料金 | 料金表基本料金 | 予測数量— | 料金 入力 · 入力トークン · 比較専用の見積もり — / 1K トークン 出力 · 出力トークン · 比較専用の見積もり — / 1K トークン 入力 · キャッシュ読み取り · 比較専用の見積もり — / 1K トークン 入力 · キャッシュ書き込み · 比較専用の見積もり — / 1K トークン 入力 · キャッシュ書き込み、1時間 · 比較専用の見積もり — / 1K トークン |
| 設定生成費用の見積もり | 料金表— | 予測数量生成1回分の概算 | 料金 出力 · 推定生成コスト · 比較専用の見積もり $0.065536 生成前の見積もり この見積もりは追加料金ではなく、完了した生成処理に対する固定料金でもありません。 |
Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。金額の確保と精算の仕組み →
リクエスト例
Ailoot Ultra · 画像
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p={'model': 'openai/gpt-5-image-mini', 'prompt': 'a red panda astronaut floating in space, studio lighting'}
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin
def save_images(items):
if not items: raise SystemExit("No completed images; retain the full response")
for index, item in enumerate(items):
encoded=item.get("b64_json")
uri=item.get("url", "")
if not encoded and uri.startswith("data:image/"):
header, separator, encoded=uri.partition(",")
if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
if encoded:
raw=base64.b64decode(encoded,validate=True)
elif uri:
uri=urljoin("https://api.ailoot.ai",uri)
parsed=urlsplit(uri)
if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
raise SystemExit("Invalid returned image URL")
owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
args=["curl","--fail-with-body","--silent","--show-error",uri]
if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
temporary=Path(f"image-{index}.bin")
subprocess.run(args+["-o",str(temporary)],check=True)
raw=temporary.read_bytes()
temporary.unlink()
else: raise SystemExit("Image has neither bytes nor URL")
if not raw: raise SystemExit("Empty image result")
ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
Path(f"image-{index}.{ext}").write_bytes(raw)
print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
結果を受け取って保存
Ailoot Ultra · 画像
返された画像をすべてダウンロードするか、Base64の内容を保存
GET /v1/media/tasks/{task_id}GET /v1/media/assets/{asset_id}/contentGET /v1/media/assetsGET /v1/media/assets/{asset_id}
その他のコンテンツ取得
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/media/assets \
-H "Authorization: Bearer $AILOOT_API_KEY" -o owned-assets.json
# Preserve every returned asset and follow its exact signed content URL. Do not construct a signed token.
完了した結果をすべて保存
完了した画像をすべて保存してください。返された各URLから取得するか、Base64の内容をデコードしてください。
レスポンスとヘッダーの全体、実際の出力すべて、最初に返された識別子、使用量フィールドすべてを保存してください。作成リクエストを再送せずに、元の操作を復旧してください。
元のレスポンスを確認する場合
照合のため、返された X-Client-Request-ID を保存してください。実際に返された task_id/asset_id の値、または自分が所有するメディアライブラリだけを使って読み取ってください。操作 ID からタスクの URL を組み立てたり、作成リクエストを再送したりしないでください。
レスポンスのフィールド
| フィールド | 種類 |
|---|---|
フィールドcreated | 種類 |
フィールドdata[].url | 種類 |
フィールドdata[].b64_json | 種類 |
フィールドusage | 種類 |
エイリアス
モデルのエイリアス
Ailoot Ultra openai/gpt-5-image-mini
メソッドパスのエイリアス
/v1/images
関連する呼び出し用ID
Ailoot Ultra · Anthropic メッセージ POST /v1/messages openai/gpt-5-image-mini
openai/gpt-5-image-miniはじめに
GPT-5 Image Miniは、OpenAIのGPT-5 Miniの言語機能とGPT Image 1 Miniを組み合わせ、画像生成や参照資料に基づく編集を行います。テキスト、画像、文書を受け取り、テキストと画像を返します。文章による回答と視覚素材の両方を必要とするワークフローに対応します。
- 対応する入力
- テキスト
- 結果
- json · sse
Ailootで利用可能 · 入力とメソッド
Ailoot Ultra · Anthropic メッセージ POST /v1/messages
- 入力の種類
text- 出力の種類
json,sse- 出力形式
- JSONまたはSSE
| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
|---|---|---|---|---|
フィールドmodel | 種類string | 要件必須 | 値と制限 openai/gpt-5-image-mini | デフォルト— |
フィールドmessages | 種類message[] | 要件必須 | 値と制限 | デフォルト— |
フィールドmessages[].role | 種類string | 要件必須 | 値と制限 user, assistant | デフォルト— |
フィールドmessages[].content | 種類string | 要件必須 | 値と制限 | デフォルト— |
フィールドmax_tokens | 種類integer | 要件必須 | 値と制限 | デフォルト— |
フィールドstream | 種類boolean | 要件任意 | 値と制限 | デフォルトfalse |
入力素材の組み合わせ
テキスト · UTF-8テキスト
messages[].contentの文字列
メソッドのパラメータとライフサイクル
| パラメータ | 仕様 |
|---|---|
パラメータcontent_type | 仕様application/json |
パラメータrequired | 仕様model, messages, max_tokens |
パラメータoptional_controls | 仕様stream |
パラメータmaterial_types | 仕様text |
パラメータtext_file_material | 仕様実際のUTF-8文書を読み、その本文を指定された入力またはメッセージ内容の文字列に入れてください。 |
ライフサイクル: synchronous_or_streamed
料金
料金情報はリクエストの機能を追加しません。対応するパラメーターは選択したメソッドに記載されています。
- 高速モード
- 標準料金 高速モードが選択されている場合
- Flex モード
- 標準料金 flex モードが選択されている場合
- 最大推論量
- 標準料金 推論量が最大で、調整に既定値(default)を使用する場合
Ailootの料金
設定別の価格
各料金を表示された条件と照合してください。選択肢となる設定の各組には、いずれか1つの料金を適用します。
| 設定 | 料金表 | コンテキストトークン数が次の値を超える場合 | コンテキストトークン数が次の値以下の場合 | 料金 |
|---|---|---|---|---|
| 設定トークンの基本単価 | 料金表基本料金 | コンテキストトークン数が次の値を超える場合— | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン $0.005 / 1K トークン 出力 · 出力トークン $0.004 / 1K トークン 入力 · キャッシュ読み取り $0.0005 / 1K トークン 入力 · キャッシュ書き込み — / 1K トークン 入力 · キャッシュ書き込み、1時間 — / 1K トークン 出力 · 出力画像トークン $0.016 / 1K 画像トークン |
| 設定リクエスト長に応じた料金区分 1 | 料金表— | コンテキストトークン数が次の値を超える場合0 | コンテキストトークン数が次の値以下の場合上限なし | 料金 入力 · 入力トークン $0.005 / 1K トークン 出力 · 出力トークン $0.004 / 1K トークン 入力 · キャッシュ読み取り $0.0005 / 1K トークン 入力 · キャッシュ書き込み — / 1K トークン 入力 · キャッシュ書き込み、1時間 — / 1K トークン |
Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。金額の確保と精算の仕組み →
リクエスト例
Ailoot Ultra · Anthropic メッセージ
{
"model": "openai/gpt-5-image-mini",
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Summarize the incident report."
}
],
"stream": false
}set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'openai/gpt-5-image-mini', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'openai/gpt-5-image-mini', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError
api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
with urlopen(request, timeout=120) as response:
raw = response.read()
Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
Path('result.json').write_bytes(error.read())
Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
結果を受け取って保存
Ailoot Ultra · Anthropic メッセージ
JSONまたはSSE
完了した結果をすべて保存
返された完全なレスポンス、ファイル、コンテンツ部分をすべて保存してください。
すべてのコンテンツブロック、思考署名、実際のツール利用IDを保持してください。SSEのすべてのブロック差分を組み立てます。最初のテキストブロックだけでは完全な出力になりません。
元のレスポンスを確認する場合
リクエスト/応答IDとヘッダーを保持してください。テキストジョブを取得する汎用URLは提供されません。
レスポンスのフィールド
| フィールド | 種類 |
|---|---|
フィールドid | 種類string |
フィールドmodel | 種類string |
フィールドcontent[] | 種類text|thinking|tool_use|other content block |
フィールドstop_reason | 種類string|null |
フィールドusage | 種類object |
エラーと次の手順
| レスポンス | 条件 | 次の手順 |
|---|---|---|
レスポンス400 · invalid_request_error | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |
エイリアス
モデルのエイリアス
Ailoot Ultra openai/gpt-5-image-mini
メソッドパスのエイリアス
/v1/images
関連する呼び出し用ID
FAQ · OpenAI: GPT-5 Image Mini
- 利用できる入力と結果は何ですか?
POST /v1/chat/completions·openai/gpt-5-image-mini:text→textPOST /v1/images/generations·openai/gpt-5-image-mini:text,image→imagePOST /v1/messages·openai/gpt-5-image-mini:text→json,sse- リクエストはどの項目を使用しますか?
POST /v1/chat/completions·openai/gpt-5-image-mini:model,messages,stream,modalities,providerPOST /v1/images/generations·openai/gpt-5-image-mini:model,prompt,aspect_ratio,quality,background,n,input_references,output_compression,providerPOST /v1/messages·openai/gpt-5-image-mini:model,messages,max_tokens,stream- どの制限が適用されますか?
POST /v1/chat/completions·openai/gpt-5-image-mini:messages.min_items:1POST /v1/images/generations·openai/gpt-5-image-mini:n.minimum:1;n.maximum:10;output_compression.minimum:0;output_compression.maximum:100