OpenAI: GPT Image 2.5 Flare
GPT Image 2.5 Flareは、日常的なビジュアル制作の速さを重視し、テキストと参照から画像を生成・編集します。下書き、イラスト、キャンペーン素材向けに、独自サイズ、透明背景、マスク、maxまでの品質レベルに対応します。
- Ailoot · 画像
POST /v1/images/generationsgpt-image-2.5-flare - Ailoot Ultra · 画像
POST /v1/images/generationsgpt-image-2.5-flare - Ailoot Ultra · 画像
POST /v1/images/generationsopenai/gpt-image-2.5-flare
モデルについて
この説明はモデルの機能を紹介するものです。Ailootで利用できる入力、出力、オプションは、選択したメソッドごとに以下に記載されています。
GPT Image 2.5 Flareは、速く高品質な日常制作を重視するOpenAIの画像生成・編集エディションです。テキストと画像を受け取り、画像結果を返します。制作指示から速やかに使える画像を得たい、下書き、イラスト、商品コンセプト、繰り返し行う制作に使えます。Flareは、編集の精密さを重視するSunburstとは別です。日常的な画像制作にはFlare、精密な編集を優先する場合はSunburstを選びます。
主役、動作、環境、構図、視覚表現から記述を始めます。キャンペーンイラストなら、温かな夕方の光の中で小さな橋を渡る自転車の人、大胆なシルエット、後から文字を置く空の余白を依頼します。探索用の簡潔な指示なら美的な判断を開いておけますが、制作指示では重要な細部と配置を指定します。直接の生成・編集ワークフローは最大32,000文字のプロンプトと1~10件の結果を認め、同じ目的で少数の案を比較できます。
編集では最大16枚の参照画像を提供できます。被写体の特徴、景色、スタイルのどれを示す画像かをモデル任せにせず、各参照に明確な役割を割り当てます。マスクは領域の変更を誘導でき、複数画像では最初の画像に適用されます。画像とマスクは同じ形式と寸法が必要で、マスクにはアルファチャンネルを含めます。ガイドは原画像とマスクを50 MB未満としています。マスクは厳密な境界維持の約束ではなく誘導なので、変更内容と、認識可能に維持するものの両方を指定します。
Flareはlow、medium、high、xhigh、max、自動の品質設定に対応し、標準はautoです。低い品質は素早い下書きに、高い設定の比較は完成素材の細部の検討に使えます。品質はサイズと出力圧縮から独立しています。標準サイズは1024 × 1024、1536 × 1024、1024 × 1536で、自動サイズや独自寸法も使えます。最終の掲載先とシーン内の有用な余白を基準に向きを選びます。
独自の幅と高さは16の倍数で、両辺とも3840ピクセル以下が条件です。許される比率は1:3~3:1、総面積は655,360ピクセル以上、8,294,400ピクセル以下です。四つの条件はすべて同時に適用されます。ガイドは2560 × 1440を超える解像度を実験的としています。構図に合う有効なフレームを使い、解像度が大きければ自動的にレイアウトが良くなると考えず、切り取りで失いたくない細部を指示に含めます。
結果の標準形式はPNGで、JPEGとWebPも選べます。JPEGとWebPでは0~100の圧縮値を指定できます。透明背景ではPNGまたはWebPを選びます。不透明と自動の背景にも対応します。透明素材は後のレイアウトへ配置でき、不透明画像は自身の背景を含みます。実際の納品用途に応じて形式、背景、圧縮を選び、完成ファイルを制作指示と設定とともに保存します。
開発元は、直接の画像生成・編集と、選んだ結果を保持して追加変更できる会話型画像ツールを記載しています。そのワークフローでは、画像が文脈にある場合、動作を自動、生成の強制、編集の強制にできます。ストリーミングは最終結果の前に最大3枚の部分画像を表示できます。これらのプレビューは進捗を示すもので、追加の完成成果物ではありません。反復制作では選んだ画像を起点にし、一つの物体の移動や色表現の調整など、目に見える変更を記述します。開発元のインターフェースはバッチ処理にも対応します。
想定サイズで、画像の文字、物体配置、被写体の細部、構図を確認します。GPT Imageは厳密な文字配置、構造化されたレイアウト、複数回の生成で同じ視覚的特徴を保つことが難しい場合があります。採用した案を次の参照に残し、追加編集を重要な問題に絞ります。Flareの日常生成向けの役割は、制作指示、複数案、選定、仕上げという明確な流れに役立ちます。最終素材は実際の制作目的に照らして評価します。
Ailoot · 画像 POST /v1/images/generations gpt-image-2.5-flare
gpt-image-2.5-flareはじめに
GPT Image 2.5 Flareは、日常的なビジュアル制作の速さを重視し、テキストと参照から画像を生成・編集します。下書き、イラスト、キャンペーン素材向けに、独自サイズ、透明背景、マスク、maxまでの品質レベルに対応します。
- 対応する入力
- テキスト
- 結果
- 画像
Ailootで利用可能 · 入力とメソッド
Ailoot · 画像 POST /v1/images/generations
- 入力の種類
text- 出力の種類
image- 出力形式
- 画像ファイル
| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
|---|---|---|---|---|
フィールドmodel | 種類string | 要件必須 | 値と制限 gpt-image-2.5-flare | デフォルト— |
フィールドprompt | 種類string | 要件必須 | 値と制限 最小の長さ: 1 | デフォルト— |
フィールドn | 種類integer | 要件任意 | 値と制限 最小値: 1 | デフォルト1 |
フィールドresponse_format | 種類string | 要件任意 | 値と制限 url, b64_json | デフォルト— |
フィールドstream | 種類boolean | 要件任意 | 値と制限 | デフォルトfalse |
フィールドsize | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドquality | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドbackground | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドoutput_format | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドoutput_compression | 種類integer | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドmoderation | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドinput_fidelity | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドstyle | 種類string | 要件任意 | 値と制限 モデルによる | デフォルト— |
フィールドpartial_images | 種類integer | 要件任意 | 値と制限 モデルによる | デフォルト— |
入力素材の組み合わせ
テキストから画像へ · 必須: prompt
メソッドのパラメータとライフサイクル
| パラメータ | 仕様 |
|---|---|
パラメータmaterial_types | 仕様text |
パラメータrequired | 仕様model, prompt |
パラメータoptional_controls | 仕様null |
パラメータcontent_type | 仕様application/json |
ライフサイクル: 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}
メソッドの形式とIDは正確に記載しています。供給元の対応能力とリクエストの受け入れは別です。
料金
Ailootのメソッド料金
POST /v1/images/generations- テキスト入力
- $0.005 / 1K
- 入力、画像
- $0.008 / 1K tokens
- 出力、画像
- $0.03 / 1K tokens
Ailootはリクエスト前に見積額を確保します。結果の取得後、実測使用量に基づいて最終料金を精算します。ストリーミング時の精算には最終の使用量記録を使用します。金額の確保と精算の仕組み →
リクエスト例
Ailoot · 画像
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
export AILOOT_API_KEY
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 image brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "gpt-image-2.5-flare", "prompt": ""}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/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
from openai import OpenAI
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")
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Set your actual UTF-8 image brief file")
request={'model': 'gpt-image-2.5-flare', 'prompt': ''}
request["prompt"]=f.read_text(encoding="utf-8")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.images.generate(**request)
Path("sdk-result.txt").write_text(str(result),encoding="utf-8")
save_images([{"b64_json":getattr(item,"b64_json",None),"url":getattr(item,"url",None)} for item in result.data])
import OpenAI from "openai";
import { readFileSync, writeFileSync } from "node:fs";
const key=process.env.AILOOT_API_KEY;
if(!key) throw new Error("Set your actual Ailoot API key");
const client=new OpenAI({baseURL:"https://api.ailoot.ai/v1",apiKey:key,maxRetries:0});
const request={"model": "gpt-image-2.5-flare", "prompt": ""};
if(!process.env.AILOOT_PROMPT_FILE)throw new Error("Set your actual UTF-8 image brief file");
request.prompt=readFileSync(process.env.AILOOT_PROMPT_FILE,"utf8");
const result=await client.images.generate(request);
writeFileSync("sdk-result.json",JSON.stringify(result,null,2));
if(!result.data?.length) throw new Error("No completed images");
for(let index=0;index<result.data.length;index++) {
const item=result.data[index];let encoded=item.b64_json,uri=item.url||"",raw;
if(!encoded && uri.startsWith("data:image/")) {
const comma=uri.indexOf(",");if(comma<0 || !uri.slice(0,comma).includes(";base64")) throw new Error("Unsupported image data URI");
encoded=uri.slice(comma+1);
}
if(encoded) {
if(encoded.length%4!==0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(encoded)) throw new Error("Invalid Base64");
raw=Buffer.from(encoded,"base64");
} else if(uri) {
const u=new URL(uri,"https://api.ailoot.ai");
if(u.protocol!=="https:" || u.username || u.password) throw new Error("Invalid returned URL");
const owned=u.origin==="https://api.ailoot.ai" && u.pathname.startsWith("/v1/media/assets/") && u.pathname.endsWith("/content");
const response=await fetch(u,{headers:owned?{Authorization:"Bearer "+key}:{},redirect:"manual"});
if(!response.ok) throw new Error("Image content download failed: "+response.status);
raw=Buffer.from(await response.arrayBuffer());
} else throw new Error("Image has neither bytes nor URL");
if(!raw.length) throw new Error("Empty image result");
const ext=raw.subarray(0,4).equals(Buffer.from([137,80,78,71]))?"png":raw[0]===255&&raw[1]===216?"jpg":raw.toString("ascii",0,4)==="RIFF"&&raw.toString("ascii",8,12)==="WEBP"?"webp":raw.toString("utf8").trimStart().startsWith("<svg")||raw.toString("utf8").trimStart().startsWith("<?xml")?"svg":"bin";
writeFileSync(`image-${index}.${ext}`,raw);
}
console.log("Every returned image saved; sdk-result.json retains complete metadata");
結果を受け取って保存
Ailoot · 画像
返された画像をすべてダウンロードするか、Base64の内容を保存
GET /v1/media/tasks/{task_id}GET /v1/media/assets/{asset_id}/contentGET /v1/media/assetsGET /v1/media/assets/{asset_id}
完了した結果をすべて保存
完了した画像をすべて保存してください。返された各URLから取得するか、Base64の内容をデコードしてください。
すべてのデータ項目を保存してください。各 b64_json をデコードするか、返された署名付き URL すべてから取得してください。実際の MIME タイプ/バイト列に応じてファイル名の拡張子を選んでください。
元のレスポンスを確認する場合
画像の生成または編集の結果に確認が必要な場合は、元の operation_id/X-Client-Request-ID と、返された結果情報を保存してください。実際の task_id または asset_id の値を使い、メディアライブラリから自分が所有する既存の結果を取得してください。生成/編集リクエストを再送したり、operation_id からポーリング URL を組み立てたりしないでください。
レスポンスのフィールド
| フィールド | 種類 |
|---|---|
フィールドcreated | 種類integer |
フィールドdata[].url | 種類string |
フィールドdata[].b64_json | 種類base64 string |
フィールドusage | 種類object |
エラーと次の手順
| レスポンス | 条件 | 次の手順 |
|---|---|---|
レスポンス400 · invalid_request_error | 条件必須フィールド、素材の表現形式、またはパラメーター値が不正です | 次の手順新しい生成リクエストを送る前に、指定されたフィールドを修正してください。 |
レスポンスserver_error | 条件返されたレスポンスは、操作または結果の確認が必要であることを示しています | 次の手順最初に返された操作/タスク ID、リクエストヘッダー、レスポンスを保存し、その元の操作に対してサポートされている読み取りを継続してください。作成リクエストを再送しないでください。 |
エイリアス
モデルのエイリアス
Ailoot gpt-image-2.5-flare
Ailoot Ultra gpt-image-2.5-flare, openai/gpt-image-2.5-flare
メソッドパスのエイリアス
/v1/images
関連する呼び出し用ID
openai/gpt-image-2.5-flare, gpt-image-2.5-flare, gpt-image-2.5-flare
Ailoot Ultra · 画像 POST /v1/images/generations gpt-image-2.5-flare
gpt-image-2.5-flaregpt-image-2.5-flareopenai/gpt-image-2.5-flare
はじめに
GPT Image 2.5 Flareは、日常的なビジュアル制作の速さを重視し、テキストと参照から画像を生成・編集します。下書き、イラスト、キャンペーン素材向けに、独自サイズ、透明背景、マスク、maxまでの品質レベルに対応します。
- 対応する入力
- テキスト
- 結果
- 画像
Ailootで利用可能 · 入力とメソッド
Ailoot Ultra · 画像 POST /v1/images/generations
- 入力の種類
text- 出力の種類
image
| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
|---|---|---|---|---|
フィールドmodel | 種類string | 要件必須 | 値と制限 gpt-image-2.5-flare | デフォルト— |
フィールドprompt | 種類string | 要件必須 | 値と制限 最大の長さ: 32,000 | デフォルト— |
フィールドsize | 種類string | 要件任意 | 値と制限 条件: autoまたはWIDTHxHEIGHTを使用し、幅と高さの両方を16で割り切れる値にしてください。長辺は最大3,840ピクセル、総画素数は最大8,300,000ピクセルです。 | デフォルトauto |
フィールドbackground | 種類string | 要件任意 | 値と制限 transparent, opaque, auto | デフォルトauto |
フィールドmoderation | 種類string | 要件任意 | 値と制限 low, auto 条件: 標準のコンテンツモデレーションにはautoを使用してください。 | デフォルト— |
フィールドn | 種類integer | 要件任意 | 値と制限 最小値: 1 最大値: 10 | デフォルト1 |
フィールドquality | 種類string | 要件任意 | 値と制限 auto, high, medium, low | デフォルトauto |
フィールドoutput_compression | 種類integer | 要件任意 | 値と制限 最小値: 0 最大値: 100 条件: JPEGとWebPの出力に適用されます。文書に記載された整数値を送信してください。 | デフォルト100 |
フィールドoutput_format | 種類string | 要件任意 | 値と制限 webp, png, jpeg | デフォルトpng |
フィールドstream | 種類boolean | 要件任意 | 値と制限 false 条件: このルートは、完了したJSONレスポンスを一件返します。 | デフォルトfalse |
メソッドのパラメータとライフサイクル
| パラメータ | 仕様 |
|---|---|
パラメータcontent_type | 仕様application/json |
パラメータrequired | 仕様prompt, model |
パラメータmaterial_types | 仕様text |
パラメータoptional | 仕様size, background, moderation, n, quality, output_compression, output_format, stream |
パラメータconditions | 仕様透過背景にはPNGまたはWebPが必要です。, 出力圧縮はJPEGまたはWebPに適用されます。, 選択したメソッドはテキストから生成します。メーカーの説明に記載されている編集およびストリーミングの制御は、別の機能です。 |
ライフサイクル: 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.24576 生成前の見積もり この見積もりは追加料金ではなく、完了した生成処理に対する固定料金でもありません。 |
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={'prompt': 'A cute baby sea otter', 'model': 'gpt-image-2.5-flare', 'size': '1024x1024', 'n': 1, 'background': 'auto', 'moderation': 'auto', 'output_format': 'png'}
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 gpt-image-2.5-flare
Ailoot Ultra gpt-image-2.5-flare, openai/gpt-image-2.5-flare
メソッドパスのエイリアス
/v1/images
関連する呼び出し用ID
openai/gpt-image-2.5-flare, gpt-image-2.5-flare, gpt-image-2.5-flare
Ailoot Ultra · 画像 POST /v1/images/generations openai/gpt-image-2.5-flare
openai/gpt-image-2.5-flaregpt-image-2.5-flareopenai/gpt-image-2.5-flare
はじめに
GPT Image 2.5 Flareは、日常的なビジュアル制作の速さを重視し、テキストと参照から画像を生成・編集します。下書き、イラスト、キャンペーン素材向けに、独自サイズ、透明背景、マスク、maxまでの品質レベルに対応します。
- 対応する入力
- テキスト · 画像
- 結果
- 画像
Ailootで利用可能 · 入力とメソッド
Ailoot Ultra · 画像 POST /v1/images/generations
- 入力の種類
text,image- 出力の種類
image
| フィールド | 種類 | 要件 | 値と制限 | デフォルト |
|---|---|---|---|---|
フィールドmodel | 種類string | 要件必須 | 値と制限 openai/gpt-image-2.5-flare | デフォルト— |
フィールドprompt | 種類string | 要件必須 | 値と制限 最小の長さ: 1 | デフォルト— |
フィールドaspect_ratio | 種類string | 要件任意 | 値と制限 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9, auto | デフォルト— |
フィールドquality | 種類string | 要件任意 | 値と制限 auto, low, medium, high, xhigh, max | デフォルト— |
フィールド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.24576 生成前の見積もり この見積もりは追加料金ではなく、完了した生成処理に対する固定料金でもありません。 |
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-image-2.5-flare', '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 gpt-image-2.5-flare
Ailoot Ultra gpt-image-2.5-flare, openai/gpt-image-2.5-flare
メソッドパスのエイリアス
/v1/images
関連する呼び出し用ID
openai/gpt-image-2.5-flare, gpt-image-2.5-flare, gpt-image-2.5-flare
FAQ · OpenAI: GPT Image 2.5 Flare
- 利用できる入力と結果は何ですか?
POST /v1/images/generations·gpt-image-2.5-flare:text→imagePOST /v1/images/generations·gpt-image-2.5-flare:text→imagePOST /v1/images/generations·openai/gpt-image-2.5-flare:text,image→image- リクエストはどの項目を使用しますか?
POST /v1/images/generations·gpt-image-2.5-flare:model,prompt,n,response_format,streamPOST /v1/images/generations·gpt-image-2.5-flare:model,prompt,size,background,moderation,n,quality,output_compression,output_format,streamPOST /v1/images/generations·openai/gpt-image-2.5-flare:model,prompt,aspect_ratio,quality,background,n,input_references,output_compression,provider- どの制限が適用されますか?
POST /v1/images/generations·gpt-image-2.5-flare:n.minimum:1POST /v1/images/generations·gpt-image-2.5-flare:prompt.maximum_length:32000;n.minimum:1;n.maximum:10;output_compression.minimum:0;output_compression.maximum:100POST /v1/images/generations·openai/gpt-image-2.5-flare:n.minimum:1;n.maximum:10;output_compression.minimum:0;output_compression.maximum:100