RunComfy API로 qwen/qwen-image-2.1/edit을(를) 실행합니다. 허용되는 입력·출력은 모델 스키마.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/qwen/qwen-image-2.1/edit \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"image_urls": [
"https://playgrounds-storage-public.runcomfy.net/tools/7461/media-files/output-example1-4.webp"
],
"prompt": "Change the background to a warm golden-hour studio and add soft rim lighting, keep the subject and clothing unchanged."
}'환경 변수 YOUR_API_TOKEN 에 API 키를 설정하세요( 프로필에서 키 관리). 모든 요청에 Authorization 헤더로 Bearer 토큰을 포함: Authorization: Bearer $YOUR_API_TOKEN.
비동기 생성 작업을 제출하면 즉시 request_id와 상태 확인·결과 조회·취소용 URL을 받습니다.
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/qwen/qwen-image-2.1/edit \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"image_urls": [
"https://playgrounds-storage-public.runcomfy.net/tools/7461/media-files/output-example1-4.webp"
],
"prompt": "Change the background to a warm golden-hour studio and add soft rim lighting, keep the subject and clothing unchanged."
}'request_id의 현재 상태를 가져옵니다("in_queue", "in_progress", "completed", "cancelled").
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"지정한 request_id의 최종 출력과 메타데이터를 가져옵니다. 작업이 완료되지 않았으면 현재 상태가 반환되어 폴링을 계속할 수 있습니다.
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"request_id로 대기 중인 작업을 취소합니다. 진행 중인 작업은 취소할 수 없습니다.
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"공개적으로 접근 가능한 HTTPS URL을 제공하세요. 서버 측 페치가 가능하고(로그인/쿠키 불필요) 속도 제한이나 봇 차단이 없어야 합니다. 권장: 이미지 ≤ 50MB(약 4K), 동영상 ≤ 100MB(720p 기준 약 2–5분). 비공개 자산은 안정적이거나 사전 서명 URL을 권장합니다.
{
"type": "object",
"title": "입력 스키마",
"required": [
"image_urls",
"prompt"
],
"properties": {
"image_urls": {
"title": "입력 이미지",
"description": "참조 이미지 1~10개. 순서는 프롬프트와 일치합니다(첫 번째 이미지, 두 번째 이미지). JPEG, PNG, 또는 WebP; 각 파일은 최대 30MB, 25MP까지 가능합니다. 신원이 선명하게 유지되어야 할 때는 4개 이하로 제한하세요.",
"type": "array",
"items": {
"type": "string",
"format": "image_uri"
},
"minItems": 1,
"maxItems": 10,
"validations": [
{
"validation_rule": "file_size_mb<",
"validation_value": 30,
"validation_error": "File size must be less than 30 MB."
}
],
"default": [
"https://playgrounds-storage-public.runcomfy.net/tools/7461/media-files/output-example1-4.webp"
]
},
"prompt": {
"title": "편집 지시",
"description": "변경 사항을 알기 쉽게 설명하세요: 추가할 것, 제거할 것, 스타일을 바꿀 것, 또는 교체할 것. 어떤 텍스트든 그대로 인용하세요. 마스크가 있을 경우, 흰색 영역에 나타나야 할 것을 설명하세요.",
"type": "string",
"default": "Change the background to a warm golden-hour studio and add soft rim lighting, keep the subject and clothing unchanged."
},
"mask_url": {
"title": "마스크 이미지",
"description": "선택적 흑백 지역 편집 마스크. 흰색은 변경할 영역을 표시하고, 검은색은 그대로 둡니다. 정확히 하나의 참조 이미지가 필요하며, 투명 배경과 함께 사용할 수 없고, 가로세로 비율과 프롬프트 재작성은 무시합니다.",
"type": "string"
},
"aspect_ratio": {
"title": "화면비(가로:세로)",
"description": "출력 종횡비. auto는 첫 번째 참조를 사용합니다. 마스크 모드에서는 무시됩니다.",
"type": "string",
"enum": [
"auto",
"1:1",
"4:3",
"3:4",
"3:2",
"2:3",
"16:9",
"9:16",
"21:9",
"9:21"
],
"default": "auto"
},
"resolution": {
"title": "해상도",
"description": "출력 상세 수준. 1K이 더 빠르고, 2K은 픽셀이 약 네 배이고 비용이 더 많이 듭니다.",
"type": "string",
"enum": [
"1K",
"2K"
],
"default": "1K"
},
"background": {
"title": "배경",
"description": "일반 사진에는 불투명합니다. 투명은 실제 알파 채널을 작성합니다 — 피사체만 설명하고 JPEG를 사용하지 마세요. 마스크와 결합할 수 없습니다.",
"type": "string",
"enum": [
"opaque",
"transparent"
],
"default": "opaque"
},
"output_format": {
"title": "출력 형식",
"description": "PNG와 WebP는 알파 채널을 가질 수 있습니다. JPEG는 그렇지 않아서, 투명한 배경과 결합할 수 없습니다.",
"type": "string",
"enum": [
"png",
"webp",
"jpeg"
],
"default": "png"
},
"enhance_prompt": {
"title": "프롬프트 개선",
"description": "편집하기 전에 짧은 지시를 더 완전한 장면으로 다시 작성하세요. 지시가 이미 정확하면 끄세요. 마스크 모드에서는 무시됩니다.",
"type": "boolean",
"default": true
},
"seed": {
"title": "시드",
"description": "재현성을 위한 랜덤 시드. 실행할 때마다 랜덤 시드를 원하면 -1을 사용하세요.",
"type": "integer",
"default": -1
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "단일 이미지 URL"
},
"video": {
"type": "string",
"format": "uri",
"description": "단일 동영상 URL"
},
"images": {
"type": "array",
"description": "여러 이미지 URL",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "여러 동영상 URL",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfy는 최고의 ComfyUI 플랫폼으로서 ComfyUI 온라인 환경과 서비스를 제공하며 ComfyUI 워크플로우 멋진 비주얼을 제공합니다. RunComfy는 또한 제공합니다 AI Models, 예술가들이 최신 AI 도구를 활용하여 놀라운 예술을 창조할 수 있도록 지원합니다.