被写体、構図、照明、画像に含める文字を記述してください。
透明な背景には PNG または WebP 形式が必要です。
参照画像
公開 HTTP(S) URL またはローカルの PNG、JPEG、WebP ファイルを最大 16 枚追加できます。1 枚あたり 10 MB まで。
生成された画像がここに表示されます
APIMart 共通の非同期画像タスク形式を使った例です。モデル設定値と選択項目を確認し、タスク ID と結果取得の構造を参照してください。
APIMart キーを APIMART_API_KEY に保存し、送信と照会に Authorization: Bearer <key> を使用します。
POST /v1/images/generations に model: gpt-image-2.6、prompt、出力設定を指定します。編集では image_urls を追加します。共通レスポンスの data[0].task_id がタスク ID です。
GET /v1/tasks/{task_id} を使用します。完了時は data.result.images[0].url[0]、失敗時は data.error.message を確認します。
APIMart の認証と一般的な API の使い方はAPIMart ドキュメントを参照してください。
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.6",
"prompt": "淡い木のテーブルに置かれた陶器のコーヒーカップ。柔らかな窓の光、右側に広い余白、雑誌の商品写真。",
"size": "1:1",
"resolution": "1k",
"quality": "auto",
"n": 1,
"output_format": "png",
"background": "auto"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "gpt-image-2.6",
"prompt": "淡い木のテーブルに置かれた陶器のコーヒーカップ。柔らかな窓の光、右側に広い余白、雑誌の商品写真。",
"size": "1:1",
"resolution": "1k",
"quality": "auto",
"n": 1,
"output_format": "png",
"background": "auto"
}
resp = requests.post(f"{API_BASE}/v1/images/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["images"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(3)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.6",
"prompt": "参照画像の商品を淡い石のカウンターに配置し、形状、色、ラベルは保持する。",
"size": "auto",
"resolution": "1k",
"quality": "auto",
"n": 1,
"output_format": "png",
"background": "auto",
"image_urls": [
"https://example.com/product.png"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| パラメータ | 型 | 必須 | 初期値 | 説明 |
|---|---|---|---|---|
model | string | 必須 | 初期値: gpt-image-2.6 | このワークスペースと例のモデル設定値は gpt-image-2.6 です。 |
prompt | string | 必須 | 初期値: — | 作成する画像、または変更内容と参照画像で残す細部を記述します。 |
size | string | 任意 | 初期値: auto | 選択肢:auto、1:1、3:2、2:3、16:9、9:16、4:3、3:4、4:5、5:4。 |
resolution | string | 任意 | 初期値: 1k | 解像度の設定は 1k、2k、4k。リクエスト用の設定であり、ネイティブの出力画素数を示すものではありません。 |
quality | string | 任意 | 初期値: auto | 品質の選択肢:auto、low、medium、high。 |
n | integer | 任意 | 初期値: 1 | このワークスペースでは 1〜4 の整数を指定します。 |
output_format | string | 任意 | 初期値: png | 形式は png、jpeg、webp。透明背景には png または webp を使用します。 |
background | string | 任意 | 初期値: auto | 背景は auto、opaque、transparent。transparent と jpeg は併用できません。 |
image_urls | array | 任意 | 初期値: — | 任意の HTTP/HTTPS 参照画像 URL 配列。このワークスペースでは最大 16 件です。ローカルファイルはプレビュー用で、リクエスト例にはアクセス可能な URL を指定します。 |
画像リクエストに必要な内容を整理します。
画像の目的と、確認すべき細部を説明します。
3 ステップで画像の指示を整理。
被写体と構図を説明します。編集では、変更する内容と残す内容を明記してください。
必要に応じて参照画像を追加し、縦横比、解像度、品質、背景、形式を設定します。
Form または JSON の下書きを、以下の API 例やパラメータ表と照合します。
プロンプト、表記の違い、参照画像、設定について。
画像生成や参照画像の編集指示、出力設定を整理し、Form と JSON で下書きを確認できます。APIMart 共通の非同期リクエスト例も掲載しています。
被写体と場面を先に記述し、構図と光を補足します。文字は正確な文言と位置を指定し、変更する内容と残す内容を分けてください。
ワークスペースでは最大 16 枚を選べます。公開 HTTP/HTTPS URL を追加するか、ローカル画像をプレビューし、それぞれの役割を説明します。
ローカルファイルは端末内のプレビュー用です。image_urls にはアクセス可能な HTTP/HTTPS URL を使います。ファイル選択だけではアップロードされません。
ワークスペースには auto、1:1、3:2、2:3、16:9、9:16、4:3、3:4、4:5、5:4 があり、掲載先に合わせて選べます。
1k、2k、4k のリクエスト設定があり、初期値は 1k です。これらはワークスペースの選択肢で、ネイティブ画素数や性能を示すものではありません。
auto、low、medium、high から選びます。初期値は auto で、選択内容は設定に保存されます。
背景を transparent にして、png または webp を選びます。JPEG はアルファチャンネルを保存しないため、この組み合わせには使えません。
n は 1〜4 の整数で、初期値は 1 です。これは本ページのフォームが提供する範囲です。
用途に応じて png、jpeg、webp を選びます。初期値は png です。透明背景の設定には PNG または WebP を使用します。
両方が同じ下書きを表します。有効な対応値を入力するとフォームが更新されます。無効な JSON は編集内容を残したままエラーを表示します。
POST /v1/images/generations の data[0].task_id を取得し、GET /v1/tasks/{task_id} で照会します。完了した画像は data.result.images[0].url[0] にあります。
共通タスクレスポンスの状態が failed の場合、data.error.message を確認します。原因を確認してから、入力の修正や再試行を判断してください。
GPT Image 2.6 API、GPT-Image-2.6、gpt-image-2-6、gpt-image-2-6-api、OpenAI GPT Image 2.6 は本ページの名称や検索表記です。別々のリクエスト対象ではありません。設定値は gpt-image-2.6 です。
本ページは設定と例を説明します。予算の検討前に、APIMart の料金情報と関連 API ドキュメントで課金や利用できる識別子を確認してください。
ログイン後、「API キーを取得」から APIMart のキー管理へ進めます。キーはサーバーや環境変数に保存し、公開クライアントコードに含めないでください。
同じカテゴリの他のモデルを探す。

Muse Image Ext
Muse Image turns inspiration into compelling visuals. From a spark of an idea to a fully imagined scene, it helps bring your creative vision to life with images that express your style and tell your story. Explore new possibilities and give every idea a visual voice.

Hy Image V3.5 Preview
HY Image 3.5 Preview is an image generation and editing model developed by Tencent Hunyuan. It supports text-to-image creation, reference-based generation, and multi-turn editing, allowing users to refine images through conversational instructions. With support for up to 4K output and flexible image dimensions, it offers a versatile tool for creating and refining visual content.

Flux 3 Image Klein
FLUX 3 Image Klein is a compact, open-weight image generation and editing model developed by Black Forest Labs. It combines text-to-image creation, image editing, and composition using up to 10 reference images in a single model. With support for up to 4K resolution and bounding-box layout control, it gives creators flexible tools to bring their ideas to life.

Mai Image 2.6
MAI-Image-2.6 is Microsoft's image model for text-to-image, single-image editing and composition with up to 5 reference images. It is available in high-quality and Flash versions, with 1K and 2K output and sharp text rendering.