imagesarray필수
The URLs of the images to use for image-to-image generation or image editing.
openai/gpt-image-2/editGPT Image 2 Editing supports image editing and multi-image synthesis with high-quality results.
모델 사용해 보기
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/a7f81ef8-3f1e-4f19-bc04-fd6d801c7bcb/input/d0f4c379-791c-4bbe-a195-d89e5c9ff18a.png"
],
"prompt": "Create a realistic billboard mockup of the shampoo on a highway scene during sunset.\nBillboard text (EXACT, verbatim, no extra characters):\n\"Fresh and clean\"\nTypography: bold sans-serif, high contrast, centered, clean kerning.\nEnsure text appears once and is perfectly legible.\nNo watermarks, no logos."
}{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/4c2d16cb-54bf-4bf3-9c61-3b5d4fbe8d0d/input/4b819c0a-61ba-426a-953c-6d2f05f122e2.png"
],
"prompt": "Turn this drawing into a photorealistic image.\nPreserve the exact layout, proportions, and perspective.\nChoose realistic materials and lighting consistent with the sketch intent.\nDo not add new elements or text."
}{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/e29ae6ba-e594-4f4a-a45a-11ba1b56f555/input/efb2db77-9821-44ff-a0ad-9125c1117e08.jpeg"
],
"prompt": "In this room photo, replace ONLY white with chairs made of wood.\nPreserve camera angle, room lighting, floor shadows, and surrounding objects.\nKeep all other aspects of the image unchanged.\nPhotorealistic contact shadows and fabric texture."
}{
"aspect_ratio": "1:1",
"images": [
"https://static.sandbase.ai/examples/31748971-bd20-487b-8a14-e6907f9337e6/input/fe056e64-026f-4a50-b828-ed2093dd648f.jpg"
],
"output_format": "png",
"prompt": "图片精修后用于电商主图,放大原有商品,该品标题是‘【新婚礼物】故宫百喜毯结婚实用高级手工定制新娘订婚闺蜜朋友(手工针织百喜毯+礼盒礼袋)’,结合标题精修图片并将关键词卖点信息放在图片上,图片精修风格凸显送礼场景,高端上档次。增强图片的商品质感、材质纹理、清晰度和光影层次,提高对比度。保留商品原始结构、颜色和比例,适度提升高级感与商业摄影效果,避免过度锐化、塑料感、颜色偏移或新增不存在的结构。只替换图片背景,保留商品主体不变。新背景需要符合商品定位和电商展示需求,干净、有层次、不过度抢占主体;商品边缘、阴影、反射和透视要与新背景自然融合。\n\n[输出尺寸比例: 1:1]\n\n输出尺寸比例:1:1。请严格按照该比例构图与出图,禁止回退默认 1:1。",
"quality": "medium",
"resolution": "1k"
}인간 선호
블라인드 양자 대결 투표의 Elo 점수로, 다른 이미지 및 비디오 모델과 비교합니다.
순위는 Artificial Analysis Arena에서 가져왔습니다
이미지 편집 Arena: 모델 이름을 보지 않고, 같은 이미지와 지시문으로 편집한 두 결과 중 더 나은 것을 선택합니다.
GPT Image 2 edit: fine-grained edits and multi-image synthesis. Send images with an instruction to retouch, restyle, or combine them.
| Field | Type | Default | Notes |
|---|---|---|---|
images | image URL[], required | — | Images to edit or combine, Image 1, Image 2, … |
prompt | string, required | — | Up to 50,000 characters. |
quality | low / medium / high | high | Higher quality costs more; high is the default. |
resolution | 1k / 2k / 4k | — | Output size tier; omit for 1K. |
aspect_ratio | 1:1 / 1:2 / 2:1 / 1:3 / 3:1 / 2:3 / 3:2 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 9:21 / 21:9 | — | Omit to follow the first input image. |
output_format | jpeg / png / webp | png | Output file format. |
Price depends on quality and resolution, per output image, plus $0.012 for each input image after the first:
| Quality, 1 input | 1k | 2k | 4k |
|---|---|---|---|
| low | $0.02 | $0.03 | $0.04 |
| medium | $0.07 | $0.11 | $0.19 |
| high (default) | $0.23 | $0.41 | $0.73 |
Failed runs are not charged.
Other GPT Image endpoints: openai/gpt-image-2.5-sunburst, openai/gpt-image-2.5-sunburst/edit, openai/gpt-image-2.5-flare, openai/gpt-image-2.5-flare/edit, openai/gpt-image-2.
빌드를 시작하세요
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": "openai/gpt-image-2/edit",
"images": [
"https://cdn.openai.com/API/docs/images/body-lotion.png",
"https://cdn.openai.com/API/docs/images/soap.png",
"https://cdn.openai.com/API/docs/images/incense-kit.png",
"https://cdn.openai.com/API/docs/images/bath-bomb.png"
],
"prompt": "Generate a photorealistic image of a gift basket on a white background labeled 'Relax & Unwind' with a ribbon and handwriting-like font, containing all the items in the reference pictures.",
"quality": "high",
"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하세요. 위의 요청 예시에는 제출과 폴링이 포함되어 있습니다.
반환된 실행 ID를 사용해 상태가 completed, failed 또는 timeout이 될 때까지 폴링하세요. completed 이후에만 출력을 읽으세요.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"모델의 이미지, 비디오 또는 오디오 필드에 공개적으로 접근 가능한 파일 URL을 전달하세요. 지원 형식과 제한은 각 Playground 입력 옆에 표시됩니다.
Playground의 지원되는 이미지 필드에서 업로드 또는 교체 컨트롤을 사용하세요. 비디오 URL 필드는 호스팅된 driving video를 받으며, 비디오 업로드 지원을 의미하지는 않습니다.
imagesarray필수The URLs of the images to use for image-to-image generation or image editing.
promptstring필수The text prompt to generate an image from.
기본값: "Generate a photorealistic image of a gift basket on a white background labeled 'Relax & Unwind' with a ribbon and handwriting-like font, containing all the items in the reference pictures."
qualitystringQuality for the generated image
기본값: "high"
가능한 값: "low", "medium", "high"
resolutionstringThe resolution of the generated image. Leave unset to preserve the provider's standard dimensions.
가능한 값: "1k", "2k", "4k"
aspect_ratiostringThe aspect ratio of the generated image.
가능한 값: "1:1", "1:2", "2:1", "1:3", "3:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "9:21", "21:9"
output_formatstringThe format of the generated image.
기본값: "png"
가능한 값: "jpeg", "png", "webp"
{
"model": "openai/gpt-image-2/edit",
"images": [
"https://cdn.openai.com/API/docs/images/body-lotion.png",
"https://cdn.openai.com/API/docs/images/soap.png",
"https://cdn.openai.com/API/docs/images/incense-kit.png",
"https://cdn.openai.com/API/docs/images/bath-bomb.png"
],
"prompt": "Generate a photorealistic image of a gift basket on a white background labeled 'Relax & Unwind' with a ribbon and handwriting-like font, containing all the items in the reference pictures.",
"quality": "high",
"output_format": "png"
}완료된 실행의 결과는 출력에 표시됩니다. 아래 내용은 새 생성 결과가 아니라 모델에 저장된 예시입니다.
[
{
"source": "OpenAI Cookbook prompt (MIT)",
"source_url": "https://developers.openai.com/cookbook/examples/multimodal/image-gen-models-prompting-guide",
"url": "https://static.sandbase.ai/examples/a7f81ef8-3f1e-4f19-bc04-fd6d801c7bcb/output/0c2961f3-02c4-46db-a0e6-cc9456998ed1.png"
}
]