이미지 편집. 공식 OpenAI SDK 의 multipart/form-data 업로드와
JSON 본문(base64 문자열) 양쪽 모두 받습니다.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | 편집을 지원하는 모델 ID |
prompt | string | Yes | 1~4000자 |
image | string | file | Yes | 원본 이미지 — JSON 이면 base64 문자열, multipart 면 파일 파트 |
mask | string | file | No | 편집 영역 마스크 |
n | integer | No | 생성할 이미지 수 1~4 (기본 1) |
size | string | No | 256x256 · 512x512 · 1024x1024(기본) |
response_format | string | No | url(기본) · b64_json |
user | string | No | 최종 사용자 식별자 |
요청 본문이 5MB 를 넘으면 413 을 반환합니다. 이미지를 1024px 이하로 리사이즈해서 보내세요.
Request (JSON)
{
"model": "<편집 지원 모델 ID>",
"prompt": "change the sky to sunset",
"image": "<base64-encoded-image>",
"n": 1
}Response
{
"created": 1709884800,
"data": [
{ "url": "https://..." }
]
}