imagestring必須
The URL of the image to edit. Provide one http(s) or data: URL.
デフォルト: ""
microsoft/mai-image-2.5-pro/editMai Image 2.5 Pro Edit by Microsoft - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.
モデルを試す
PNG、JPEG、WebP、GIF · 最大 20 MiB
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
人の選好
同じ条件での左右比較投票に基づく Elo レーティングを、他の画像・動画モデルと比較しています。
ランキングの出典: Artificial Analysis Arena
画像編集の arena です。同じ画像と指示に対する 2 つの編集を、モデル名を見ずに比較して、より良いほうを選びます。
MAI Image 2.5 Pro edit: Microsoft's top image model for photoreal edits from an instruction.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 5,000 characters. |
image | image URL, required | — | Image to edit. JPEG, PNG, or WebP URL. |
output_format | jpeg / png | png | Output file format. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output shape. |
$0.29 per output image.
| Request | Price |
|---|---|
| One image | $0.29 |
Failed runs are not charged.
Related: microsoft/mai-image-2.5/edit.
開発を始める
このモデルをSandBase Unified Run API経由で送信します。
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "microsoft/mai-image-2.5-pro/edit",
"image": "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png",
"prompt": "Turn this into a clean, futuristic product shot with soft studio lighting.",
"output_format": "png"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"SandBaseのAPIキーを作成し、サーバー環境に設定してください。すべてのリクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
imagestring必須The URL of the image to edit. Provide one http(s) or data: URL.
デフォルト: ""
promptstring必須The instruction describing how to edit the input image(s).
aspect_ratiostringThe aspect ratio of the generated image.
指定可能な値: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
output_formatstringThe format of the generated image.
デフォルト: "png"
指定可能な値: "jpeg", "png"
{
"model": "microsoft/mai-image-2.5-pro/edit",
"image": "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png",
"prompt": "Turn this into a clean, futuristic product shot with soft studio lighting.",
"output_format": "png"
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
まだ例の出力は公開されていません。完了したrunのレスポンスを確認するには、Playground → Result → JSON を使用してください。