본문으로 건너뛰기
Cheapest Imagen
가이드

이미지 편집 가이드

Cheapest Imagen API로 이미지를 이미지로 바꿉니다. GPT Image 또는 Nano Banana로 참조 이미지를 파일이나 링크로 /v1/images/edits에 보내고 원하는 변경을 설명합니다.

프롬프트와 참조 이미지를 하나 이상 POST /v1/images/edits로 보냅니다. 모든 모델이 참조 이미지를 받으며, 편집의 크레딧은 새 이미지를 만들 때와 같습니다.

파일 업로드

요청을 폼으로 보냅니다. 참조 이미지마다 image[]를 반복하세요.

curl https://api.cheapestimagen.com/v1/images/edits \
  -H "Authorization: Bearer $YOUR_KEY" \
  -F model=nano-banana-2.1 \
  -F prompt="put the product on a marble table, soft daylight" \
  -F "image[]=@product-front.png" \
  -F "image[]=@product-side.png" \
  -F size=2048x2048 \
  -F response_format=url

OpenAI SDK를 사용하는 경우:

from openai import OpenAI

client = OpenAI(base_url="https://api.cheapestimagen.com/v1", api_key="YOUR_KEY")
result = client.images.edit(
    model="gpt-image-2.6",
    image=[open("portrait.png", "rb")],
    prompt="change the jacket to dark green, keep the face and the background",
    response_format="url",
)
print(result.data[0].url)

파일 대신 링크 보내기

images 배열이 있는 JSON을 보냅니다. 각 항목에는 https: 링크 또는 base64 data: URL인 image_url이 들어갑니다.

curl https://api.cheapestimagen.com/v1/images/edits \
  -H "Authorization: Bearer $YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-pro",
    "prompt": "turn this sketch into a watercolour illustration",
    "images": [{ "image_url": "https://example.com/sketch.png" }]
  }'

file_id는 지원하지 않으므로 image_url을 전달하세요.

제한

요청당 참조 이미지 수1~16
이미지 한 장의 크기최대 20 MB
요청 전체의 크기최대 50 MB
파일 형식PNG, JPEG, WebP

이 제한을 넘는 요청은 413을 반환합니다.

옵션

텍스트로 이미지 생성의 모든 옵션이 편집에서도 동작합니다. n, size, quality, output_format, response_format입니다. 편집에만 있는 옵션이 하나 더 있습니다.

필드설명값
input_fidelity결과가 참조 이미지의 디테일을 얼마나 충실히 유지하는지low(기본값), high. GPT Image 2.5와 2.6 및 그 flare, sunburst 버전에서 동작하며, 다른 모델은 400을 반환합니다

지원하지 않는 기능

  • 마스크. 한 영역만 다시 그릴 수 없습니다. 그대로 유지해야 할 부분은 프롬프트에 설명하세요.
  • 투명 배경. background: transparent는 모든 모델에서 400을 반환합니다.

팁

  • 피사체가 그대로 유지되어야 한다면 여러 각도의 이미지를 보내세요.
  • 바뀌면 안 되는 부분을 말해 주세요. “라벨은 그대로 유지”, “같은 얼굴과 헤어스타일”처럼요.
  • 2K와 4K 출력에는 Nano Banana, gpt-image-2-adobe, 또는 flare나 sunburst 버전을 사용하세요. 비율과 크기를 참고하세요.

이 페이지의 내용