이미지 편집
CometAPI에서 POST /v1/images/edits를 사용해 multipart 업로드, 마스크, GPT 이미지 모델, 인코딩된 이미지 출력 제어로 이미지를 편집합니다.
CometAPI에서 OpenAI 호환 multipart 업로드로 기존 이미지를 편집할 때 이 경로를 사용하세요.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
이 경로를 사용하는 경우
- 이미 소스 이미지가 있고 프롬프트 기반 편집을 원할 때
- 특정 부분만 변경하기 위해 마스크가 필요할 수 있을 때
- 일반 JSON 요청 대신 multipart 파일 업로드를 처리할 수 있을 때
안전한 첫 요청
- PNG 또는 JPG 파일 1개로 시작하세요
- 기본 편집 흐름이 동작할 때까지 마스크는 건너뛰세요
- 이 경로에서 GPT 이미지 편집 요청에는
model: "gpt-image-2"를 사용하세요 - 눈에 보이는 변경 1가지만 요청하는 짧은 지시문 1개를 사용하세요
- 편집된 결과는
data[0].b64_json에서 읽으세요 - JPEG payload가 필요하면
output_format: "jpeg"를 설정하세요 - 일반 이미지 생성보다 지연 시간이 더 길 수 있습니다
모델 동작 방식
- 이 경로의 GPT 이미지 편집 모델은 인라인 base64 이미지 데이터를 반환합니다
output_format은b64_json내부의 인코딩된 이미지 형식을 제어합니다response_format은 모델이 URL 출력을 지원할 때만 중요합니다qwen-image-edit는 동일한 CometAPI 경로 뒤에서 provider별 편집 동작을 따릅니다
인증
Bearer token authentication. Use your CometAPI key.
본문
Source image file. Start with one PNG or JPG input for the simplest flow.
Edit instruction describing the change you want.
"Add a small red ribbon to the paper boat."
The image editing model to use. Choose a supported model from the Models page.
Optional PNG mask. Transparent areas indicate regions that should be edited.
Number of edited images to return.
Quality setting for models that support it.
high, medium, low Requested response container when supported by the selected model. GPT image edit models return data[].b64_json; use output_format to choose the encoded image type.
url, b64_json Encoded image type for GPT image edit results returned in data[].b64_json. For example, use jpeg for a JPEG payload.
"jpeg"
Requested output size when supported by the selected model.