> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-matt-router-pricing-pika-and-guard.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Comfy Router로 Wan 2.7 I2V 사용하기

> Comfy Router를 통해 HTTP로 wan/wan2.7-i2v를 호출하는 Python, TypeScript, cURL 스니펫과 요청 필드 및 결과 형태

Wan 2.7 I2V API 레퍼런스입니다. Wan 2.7 이미지 기반 비디오 생성은 media 목록을 통해 제공되는 첫 프레임에 애니메이션을 적용하며, 이 목록은 마지막 프레임, 구동 오디오 트랙, 오프닝 클립도 받을 수 있습니다.

**입력:** 이미지, 비디오, 오디오, 텍스트 · **출력:** 비디오 + 오디오

## 빠른 시작

[Comfy 워크스페이스](https://platform.comfy.org/profile/api-keys?onboarding=router)에서 키를 생성하고 `COMFY_API_KEY`로 내보내세요. Python 및 TypeScript 스니펫은 Comfy SDK(`pip install comfy-sdk` 및 `npm install @comfyorg/sdk`)를 사용하며, cURL 스니펫은 동일한 호출을 raw HTTP로 수행합니다.

**모델 ID:** `wan/wan2.7-i2v`

**엔드포인트:** `POST https://api.comfy.org/v2/models/wan/wan2.7-i2v`

<Tabs defaultTabIndex={1}>
  <Tab title="결과 기다리기">
    <CodeGroup>
      ```python Python theme={null}
      import asyncio
      from comfy_sdk import AsyncComfy

      # 환경 변수에서 COMFY_API_KEY를 읽습니다.
      # SDK는 자동으로 멱등성 키를 생성하고 자동 재시도에 재사용합니다.
      async def main():
          async with AsyncComfy() as client:
              result = await client.models.run(
                  "wan/wan2.7-i2v",
                  {
                      "input": {
                          "prompt": "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
                          "media": [
                              {
                                  "type": "first_frame",
                                  "url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
                              },
                          ],
                      },
                      "parameters": {
                          "resolution": "720P",
                          "duration": 5,
                      },
                  },
              )

          print("video:", result["output"]["video_url"])

      asyncio.run(main())
      ```

      ```typescript TypeScript theme={null}
      import { comfy } from "@comfyorg/sdk";

      // 환경 변수에서 COMFY_API_KEY를 읽습니다.
      // SDK는 자동으로 멱등성 키를 생성하고 자동 재시도에 재사용합니다.
      type Result = { output: { video_url: string } };
      const result = await comfy.models.run<Result>("wan/wan2.7-i2v", {
        input: {
          prompt: "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
          media: [
            {
              type: "first_frame",
              url: "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
            },
          ],
        },
        parameters: {
          resolution: "720P",
          duration: 5,
        },
      });
      if (result.kind !== "json") throw new Error("expected a JSON result");

      console.log("video:", result.data.output.video_url);
      ```

      ```bash cURL theme={null}
      curl https://api.comfy.org/v2/models/wan/wan2.7-i2v \
        -H "X-API-Key: $COMFY_API_KEY" \
        -H "Idempotency-Key: $(uuidgen)" \
        -H "Content-Type: application/json" \
        -d "{\"input\": {\"prompt\":\"the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady\",\"media\":[{\"type\":\"first_frame\",\"url\":\"https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png\"}]}, \"parameters\": {\"resolution\":\"720P\",\"duration\":5}}"
      ```
    </CodeGroup>
  </Tab>

  <Tab title="대기열에 넣고 나중에 수집">
    동일한 body를 `POST https://api.comfy.org/v2/models/wan/wan2.7-i2v/requests`로 전송합니다. Router는 실행이 접수되는 즉시 `request_id`와 함께 `201`을 응답하며, 결과는 준비가 되면 이 프로세스 또는 다른 프로세스에서 수집합니다. [대기열 전송](/ko/development/comfy-router/queue)에서 상태, 취소, 수집 과정을 자세히 다룹니다.

    <CodeGroup>
      ```python Python theme={null}
      import asyncio
      from comfy_sdk import AsyncComfy

      # 환경에서 COMFY_API_KEY를 읽습니다.
      # 각 submit() 호출은 자체 Idempotency-Key를 생성하고 자동 재시도 시 재사용합니다.
      async def main():
          async with AsyncComfy() as client:
              handle = await client.models.submit(
                  "wan/wan2.7-i2v",
                  {
                      "input": {
                          "prompt": "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
                          "media": [
                              {
                                  "type": "first_frame",
                                  "url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
                              },
                          ],
                      },
                      "parameters": {
                          "resolution": "720P",
                          "duration": 5,
                      },
                  },
              )
              print("request_id:", handle.request_id)  # 모델 ID와 함께라면 다른 프로세스에 필요한 전부입니다

              # 요청이 완료될 때까지 폴링하며, 서버가 지정한 Retry-After만큼 대기합니다.
              async for update in handle.iter_events():
                  print(update.status, update.queue_position)

              # 공급자 자체의 페이로드이며, models.run()이 반환하는 것과 동일한 값입니다.
              # 실패했거나 취소된 요청은 여기서 타입이 지정된 Router 오류를 발생시킵니다.
              result = await handle.get()

          print("video:", result["output"]["video_url"])

      asyncio.run(main())
      ```

      ```typescript TypeScript theme={null}
      import { comfy } from "@comfyorg/sdk";

      // 환경에서 COMFY_API_KEY를 읽습니다.
      // 각 submit() 호출은 자체 Idempotency-Key를 생성하고 자동 재시도 시 재사용합니다.
      type Result = { output: { video_url: string } };
      const handle = await comfy.models.submit<Result>("wan/wan2.7-i2v", {
        input: {
          prompt: "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
          media: [
            {
              type: "first_frame",
              url: "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png",
            },
          ],
        },
        parameters: {
          resolution: "720P",
          duration: 5,
        },
      });
      console.log("requestId:", handle.requestId); // 모델 ID와 함께라면 다른 프로세스에 필요한 전부입니다

      // 요청이 완료될 때까지 폴링하며, 서버가 지정한 Retry-After만큼 대기합니다.
      for await (const update of handle.events()) {
        console.log(update.status, update.queuePosition);
      }

      // models.run()이 반환하는 것과 동일한 결과입니다. 실패했거나 취소된 요청은 여기서 거부됩니다.
      const result = await handle.get();
      if (result.kind !== "json") throw new Error("expected a JSON result");

      console.log("video:", result.data.output.video_url);
      ```

      ```bash cURL theme={null}
      # 1. 제출. Router는 request_id, status_url, response_url, cancel_url과 함께 201을 응답합니다.
      curl https://api.comfy.org/v2/models/wan/wan2.7-i2v/requests \
        -H "X-API-Key: $COMFY_API_KEY" \
        -H "Idempotency-Key: $(uuidgen)" \
        -H "Content-Type: application/json" \
        -d "{\"input\": {\"prompt\":\"the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady\",\"media\":[{\"type\":\"first_frame\",\"url\":\"https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png\"}]}, \"parameters\": {\"resolution\":\"720P\",\"duration\":5}}"

      # 2. 상태가 COMPLETED가 될 때까지 폴링하며, 각 응답이 지정한 Retry-After 초만큼 대기합니다.
      REQUEST_ID="<request_id from the 201 body>"
      curl -i https://api.comfy.org/v2/models/wan/wan2.7-i2v/requests/$REQUEST_ID/status \
        -H "X-API-Key: $COMFY_API_KEY"

      # 3. 수집. 모델의 네이티브 출력과 함께 200, 아직 실행 중이면 상태 body와 함께 202를 반환합니다.
      curl https://api.comfy.org/v2/models/wan/wan2.7-i2v/requests/$REQUEST_ID \
        -H "X-API-Key: $COMFY_API_KEY"
      ```
    </CodeGroup>
  </Tab>
</Tabs>

## 스키마

### 입력

<ParamField body="input" type="object" required>
  프롬프트 단어 등의 기본 정보를 입력합니다.
</ParamField>

<ParamField body="input.audio_url" type="string">
  오디오 파일 다운로드 URL입니다. 지원 형식: mp3 및 wav. reference\_video\_urls와 함께
  사용할 수 없습니다.
</ParamField>

<ParamField body="input.img_url" type="string">
  첫 프레임 이미지 URL 또는 Base64로 인코딩된 데이터입니다. wan2.5-i2v-preview 및
  wan2.6-i2v 모델에서는 필수입니다. happyhorse-1.x i2v 표기법은 첫 프레임을 여기에서
  받지 않습니다. 첫 프레임은 first\_frame 유형의 미디어 요소로 받으며(아래 media 참조),
  wan2.6-i2v에서 성공하는 img\_url 본문은 happyhorse-1.0-i2v 및 happyhorse-1.1-i2v에서는
  공급자가 거부합니다. 또한 wan2.7/wan3.0 표기법도 참조 에셋을 media에서 받습니다.
  이미지 형식: JPEG, JPG, PNG, BMP, WEBP.
  해상도: 360-2000 픽셀. 파일 크기: 최대 10MB.
</ParamField>

<ParamField body="input.media" type="object[]">
  미디어 에셋 목록입니다. 비디오 생성을 위한 참조 자료(이미지, 오디오, 비디오)를
  지정합니다. 각 요소는 type과 url 필드를 포함합니다. 이 필드는 이 컴포넌트에서 제공하는
  모든 모델이 공유하며, 특정 모델이 어떤 type 값을 허용하는지(그리고 이미지나 비디오
  입력을 img\_url이나 reference\_video\_urls가 아니라 여기에서 받는지)는 모델마다 다릅니다.
  모델별로 지원되는 type 값은 다음과 같습니다:

  * wan2.7-i2v: first\_frame, last\_frame, driving\_audio, first\_clip. first\_frame 및
    last\_frame: JPEG/JPG/PNG/BMP/WEBP, 변당 240-8000 픽셀, 가로세로 비율 1:8에서 8:1
    사이, 최대 20MB, 공개 URL 또는 data:\{MIME\_type};base64,... URL.
    driving\_audio(WAV/MP3, 2-30초, 최대 15MB) 및 first\_clip(MP4/MOV, 2-10초, 변당
    240-4096 픽셀, 최대 100MB): 공개 HTTP/HTTPS URL이며 인라인 data: URL은 허용되지
    않습니다.
  * wan2.7-r2v: first\_frame(선택 사항, 최대 1개), reference\_image, reference\_video.
    최소 하나의 reference\_image 또는 reference\_video가 필요하며, reference 이미지와
    reference 비디오는 합계 최대 5개입니다. first\_frame 및 reference\_image:
    JPEG/JPG/PNG/BMP/WEBP(알파 채널 없음), 변당 240-8000 픽셀, 가로세로 비율 1:8에서
    8:1 사이, 최대 20MB, 공개 URL 또는 data:\{MIME\_type};base64,... URL.
    reference\_video: 공개 HTTP/HTTPS URL이며 인라인 data: URL은 허용되지 않습니다.
  * wan2.7-videoedit: video(정확히 1개, 편집 대상 클립: MP4/MOV, 2-10초, 변당 240-4096
    픽셀, 최대 100MB, 공개 HTTP/HTTPS URL이며 인라인 data: URL은 허용되지 않습니다)와
    선택 사항인 0\~4개의 reference\_image(JPEG/JPG/PNG/BMP/WEBP, 변당 240-8000 픽셀,
    가로세로 비율 1:8에서 8:1 사이, 최대 20MB, 공개 URL 또는
    data:\{MIME\_type};base64,... URL).
  * wan3.0-video, wan3.0-video-prime: first\_frame(최대 1개), last\_frame(최대 1개),
    reference\_image(최대 10개), reference\_video(최대 5개 클립, 총 재생 시간 \<= 15초),
    reference\_audio(최대 5개 클립, 총 재생 시간 \<= 15초), file(최대 1개, link와 함께
    사용할 수 없음), link(최대 1개, file과 함께 사용할 수 없음). reference\_\*/file/link
    유형과 first\_frame/last\_frame 유형은 같은 요청 내에서 상호 배타적입니다. 배열
    순서가 프롬프트에서 에셋의 참조 순서(Image 1, Video 1, Audio 1, ...)를 정의합니다.
    first\_frame, last\_frame 및 reference\_image: JPEG/JPG/PNG/BMP/WEBP, 변당 240-8000
    픽셀, 가로세로 비율 최대 8:1, 최대 20MB, 공개 URL 또는
    data:\{MIME\_type};base64,... URL. reference\_video, reference\_audio, file 및 link:
    공개 HTTP/HTTPS URL이며 인라인 data: URL은 허용되지 않습니다.
  * happyhorse-1.0-i2v, happyhorse-1.1-i2v: first\_frame만 해당하며 정확히 1개입니다.
    이 표기법은 첫 프레임을 img\_url이 아니라 여기에서 받습니다. 최소 300x300 픽셀,
    가로세로 비율 1:2.5에서 2.5:1 사이, JPEG/JPG/PNG/WEBP, 최대 20MB, 공개 URL 또는
    data:\{MIME\_type};base64,... URL.
  * happyhorse-1.0-r2v, happyhorse-1.1-r2v: reference\_image만 해당하며 1\~9개입니다.
    이것이 이 모델의 유일한 참조 입력입니다. 최단 변 최소 400 픽셀,
    JPEG/JPG/PNG/WEBP, 최대 20MB, 공개 URL 또는 data:\{MIME\_type};base64,... URL.
    reference\_video는 이 연산의 입력 유형이 아닙니다.
  * happyhorse-1.0-video-edit: video(정확히 1개, 편집 대상 클립: MP4/MOV, 3-60초, 긴 변
    최대 4096 픽셀, 짧은 변 최소 360 픽셀, 가로세로 비율 1:2.5에서 2.5:1 사이, 최대
    100MB, 공개 HTTP/HTTPS URL이며 인라인 data: URL은 허용되지 않습니다)와 선택
    사항인 0\~5개의 reference\_image(JPEG/JPG/PNG/BMP/WEBP, 최소 300x300 픽셀, 가로세로
    비율 1:2.5에서 2.5:1 사이, 최대 20MB, 공개 URL 또는
    data:\{MIME\_type};base64,... URL).
  * happyhorse-1.0-t2v, happyhorse-1.1-t2v, wan2.7-t2v, wan2.6-t2v, wan2.5-t2v-preview:
    텍스트 기반 비디오 생성 연산입니다. 이들의 파트너 참조 문서에는 미디어 입력이
    명시되어 있지 않으므로 이 필드를 설정하지 마십시오.
  * wan2.5-i2v-preview, wan2.6-i2v, wan2.6-r2v: 이 컴포넌트는 이 표기법들에 대해 미디어
    어휘를 열거하지 않습니다. wan2.5-i2v-preview와 wan2.6-i2v는 첫 프레임을
    img\_url에서 받고, wan2.6-r2v는 참조 클립을 reference\_video\_urls에서 받습니다.
    위의 모델별 개수는 이 스키마가 아니라 파트너의 제약입니다: 허용되는 유형과 그 상한이
    모델마다 다르므로 media에는 minItems/maxItems가 선언되어 있지 않습니다. 스키마가
    허용한다고 해서 공급자가 허용한다는 뜻은 아니며, 반대 방향으로 위의 에셋별 "최대 20MB"
    수치는(인라인으로 전송될 수 있는 유일한 입력인 이미지 입력의 상한) 파트너가 최종적으로
    갖게 되는 에셋에 대한 파트너의 상한이며, 에셋이 공개 URL일 때는 그 바이트가 Comfy를
    거치지 않으므로 적힌 그대로 적용됩니다. 인라인 data:\{MIME\_type};base64,... URL은
    Comfy를 거치므로 전송 상한도 적용됩니다: Comfy Router POST 본문은 총 100 MiB로
    제한되며 이를 초과하면 413으로 응답하고, base64는 페이로드를 약 4/3로 부풀리므로 약
    75 MB를 초과하는 단일 인라인 에셋은 여기의 파트너 규칙에 도달하기도 전에 거부됩니다.
    그 크기에서 파트너 자체의 단일 에셋은20MB 상한은 인라인으로 충분히 들어가므로, 에셋 하나에 대해서는 파트너 규칙이 실제로 제약이 됩니다.
    여러 에셋에 걸치면 전송 상한이 제약이 되는데, 100 MiB Router 상한은 각 요소가 아니라
    요청 전체를 제한하기 때문입니다. 이러한 상한에 근접하는 값은 공개 URL로 전송하세요.
</ParamField>

<ParamField body="input.media[].type" type="string" required>
  미디어 에셋 유형

  가능한 값: `first_frame`, `last_frame`, `driving_audio`, `first_clip`, `reference_image`, `reference_video`, `reference_audio`, `video`, `file`, `link`
</ParamField>

<ParamField body="input.media[].url" type="string" required>
  미디어 파일의 URL: 공개 HTTP/HTTPS URL, 또는 위의 `media` 설명이 각 모델별로 나열한 IMAGE 입력에 한해(wan2.7-i2v의 first\_frame과 last\_frame, wan2.7-r2v의 first\_frame과 reference\_image, wan2.7-videoedit의 reference\_image, wan3.0-video와 wan3.0-video-prime의 first\_frame, last\_frame 및 reference\_image, happyhorse-1.0-i2v와 happyhorse-1.1-i2v의 first\_frame, happyhorse-1.0-r2v와 happyhorse-1.1-r2v의 reference\_image, happyhorse-1.0-video-edit의 reference\_image) 인라인 `data:{MIME_type};base64,...` URL입니다. 이 모델들 중 어느 것도 비디오, 오디오, 파일 또는 링크 입력에 인라인 data: URL을 받지 않습니다. 파트너 자체 업로드 서비스에서 발급한 oss\://dashscope-instant 임시 URL 또는 (wan2.7-videoedit의 경우) Asset Center asset\_id는 이를 업로드한 Alibaba Cloud 계정에 대해서만 해석됩니다. Comfy는 자체 키로 모델을 호출하며 업로드 경로를 노출하지 않으므로, 호출자 자신의 oss\:// URL이나 asset\_id는 지원되는 입력이 아닙니다. 이 필드는 URL 스킴을 검증하지 않으므로, 그러한 값은 여기서 거부되지 않고 그대로 파트너에게 전달됩니다. 모델별 크기 및 픽셀 제한과 인라인 페이로드를 총합으로 제한하는 100 MiB Router 요청 본문 상한에 대해서는 `media` 설명을 참조하세요.
</ParamField>

<ParamField body="input.negative_prompt" type="string">
  역방향 프롬프트 단어는 비디오 화면에서 보고 싶지 않은 콘텐츠를 설명하는 데 사용됩니다
</ParamField>

<ParamField body="input.prompt" type="string">
  텍스트 프롬프트 단어. 중국어와 영어를 지원하며, 길이는 800자를 초과할 수 없습니다
  (wan3.0-video의 경우 최대 20,000자, 제한을 초과하는 콘텐츠는 잘립니다).
  여러 참조 비디오를 사용하는 wan2.6-r2v의 경우 'character1', 'character2' 등을 사용하여 참조 비디오 순서대로
  대상을 지칭합니다. 예: "Character1 sings on the roadside, Character2 dances beside it"
  wan3.0-video 참조 모드의 경우 'Image 1', 'Video 1', 'Audio 1' 등을 사용하여 media 배열 내의
  해당 순서에 따라 미디어 에셋을 지칭합니다.
</ParamField>

<ParamField body="input.reference_video_urls" type="string[]">
  wan2.6-r2v 모델 전용 참조 비디오 URL입니다. 1-3개의 비디오 URL 배열입니다.
  입력 제한 사항:

  * 형식: mp4, mov
  * 개수: 비디오 1-3개
  * 단일 비디오 길이: 2-30초
  * 단일 파일 크기: 최대 30MB
  * audio\_url과 함께 사용할 수 없음
    참조 재생 시간: 단일 비디오 최대 5초, 비디오 두 개는 각각 최대 2.5초, 비디오 세 개는 그보다 비례적으로 적습니다.
    과금: 실제 사용된 참조 재생 시간을 기준으로 합니다.
</ParamField>

<ParamField body="input.template" type="string">
  비디오 효과 템플릿 이름입니다. 선택 사항입니다. 현재 지원: squish, flying, carousel. 사용 시 prompt 파라미터는 무시됩니다.
</ParamField>

<ParamField body="model" type="string">
  호출할 모델의 ID입니다. 이 컴포넌트에서는 제한되지 않습니다. Comfy Router가 `POST /v2/models/wan/{model}`의 `{model}` 경로 세그먼트에서 이 값을 채우므로, Router 호출자는 이를 생략합니다. `POST /proxy/wan/api/v1/services/aigc/video-generation/video-synthesis`에 대한 직접 v1 호출은 반드시 이를 제공해야 하며, 허용되는 표기법의 enum은 해당 오퍼레이션 자체의 컴포넌트인 `WanVideoGenerationRequest`에 있습니다.
</ParamField>

<ParamField body="parameters" type="object">
  비디오 처리 파라미터
</ParamField>

<ParamField body="parameters.audio" type="boolean" default="true">
  비디오에 오디오를 추가할지 여부입니다. wan3.0-video와 wan3.0-video-prime에서만 지원됩니다. 공급자는 다른 wan 모델에 대해서는 이러한 전환을 문서화하지 않습니다.
</ParamField>

<ParamField body="parameters.audio_setting" type="string" default="&#x22;auto&#x22;">
  wan2.7-videoedit 모델의 비디오 오디오 설정입니다.

  * auto (기본값): 모델이 프롬프트 콘텐츠를 기반으로 지능적으로 판단합니다
  * origin: 입력 비디오의 원본 오디오를 강제로 보존합니다

    가능한 값: `auto`, `origin`
</ParamField>

<ParamField body="parameters.duration" type="integer" default="5">
  생성되는 비디오의 재생 시간(초)입니다:

  * wan2.5 모델: 5 또는 10초
  * wan2.6-t2v, wan2.6-i2v: 5, 10 또는 15초
  * wan2.6-r2v: 5 또는 10초만 지원(15초 미지원)
  * wan2.7-i2v, wan2.7-t2v: \[2, 15] 범위의 정수
  * wan2.7-r2v, wan2.7-videoedit: \[2, 10] 범위의 정수
  * wan3.0-video: 비디오 입력이 없으면 \[2, 30] 범위의 정수이고, 비디오 입력이 있으면 총
    입력 비디오 재생 시간 + 출력 비디오 재생 시간이 30초를 초과할 수 없습니다. -1은
    모델이 적절한 재생 시간을 선택하는 스마트 재생 시간 모드를 활성화합니다
    이 프록시는 \[-1, 30] 범위를 벗어난 재생 시간에 대해 400을 반환합니다.

    범위: `-1` \~ `30`
</ParamField>

<ParamField body="parameters.prompt_extend" type="boolean" default="true">
  프롬프트 지능적 재작성 활성화 여부입니다. 기본값은 true입니다
</ParamField>

<ParamField body="parameters.ratio" type="string">
  생성된 비디오의 비율입니다. wan2.7 및 wan3.0 모델에만 해당됩니다.
  wan2.7 모델의 경우 제공되지 않으면 해상도 등급을 기준으로 기본값이 정해집니다.
  wan3.0-video의 경우 adaptive(기본값)가 입력 미디어 비율과 의도를 기반으로 적절한
  비율을 자동으로 권장합니다.

  가능한 값: `adaptive`, `16:9`, `9:16`, `1:1`, `4:3`, `3:4`
</ParamField>

<ParamField body="parameters.resolution" type="string">
  해상도 수준입니다. 지원되는 값은 모델에 따라 다릅니다:

  * wan2.5-i2v-preview: 480P, 720P, 1080P
  * wan2.6 모델(t2v, i2v, r2v): 720P, 1080P만 지원(480P 미지원)
  * wan2.7 모델(i2v, t2v, r2v, videoedit): 720P, 1080P(기본값 1080P)
  * wan3.0-video, wan3.0-video-prime: 480P, 720P, 1080P (업스트림 기본값 1080P)
  * happyhorse-1.0-\* (t2v, i2v, r2v, video-edit): 720P, 1080P
  * happyhorse-1.1-\* (t2v, i2v, r2v): 480P, 720P, 1080P
    이 프록시는 resolution과 size를 모두 제공하지 않은 비디오 생성 요청을 거부합니다. 해상도 등급이 청구 요금을 결정하기 때문입니다. 이 프록시는 resolution을 확인하기 전에 대문자로 변환하고 대문자로 변환된 값을 전달하며, 이 enum에 없는 값에 대해서는 400을 반환하고, 위에 480P가 없다고 나열된 wan2.6, wan2.7, happyhorse-1.0 모델에서는 480P(해상도로 보내든 480P size로 보내든)에 대해 400을 반환합니다.

    가능한 값: `480P`, `720P`, `1080P`
</ParamField>

<ParamField body="parameters.seed" type="integer">
  모델이 생성한 콘텐츠의 무작위성을 제어하는 데 사용되는 난수 시드

  범위: `0` \~ `2147483647`
</ParamField>

<ParamField body="parameters.shot_type" type="string" default="&#x22;single&#x22;">
  지능형 멀티 렌즈 제어. prompt\_extend가 활성화된 경우에만 동작합니다.
  wan2.6 및 wan2.7-r2v 모델용입니다.

  * single: 단일 샷 비디오 (기본값)
  * multi: 멀티 샷 비디오

    가능한 값: `multi`, `single`
</ParamField>

<ParamField body="parameters.size" type="string">
  width*height 형식의 비디오 해상도. 지원되는 해상도는 모델마다 다릅니다:
  wan2.5 T2V: 480P (480*832, 832*480, 624*624), 720P, 1080P 크기
  wan2.6 T2V/R2V (480P 없음):
  720P: 1280*720, 720*1280, 960*960, 1088*832, 832*1088
  1080P: 1920*1080, 1080*1920, 1440*1440, 1632*1248, 1248*1632
  size와 resolution을 모두 보내면 size가 청구 등급을 선택하며, resolution은 여전히 이 프록시가 해당 모델에 대해 허용하는 값이어야 합니다. 480P size는 resolution 설명에서 480P가 없다고 나열한 모든 모델에서 400을 반환합니다.
</ParamField>

<ParamField body="parameters.watermark" type="boolean" default="false">
  워터마크 로고를 추가할지 여부이며, 워터마크는 오른쪽 아래 모서리에 위치합니다
</ParamField>

Router가 `GET /v2/models/wan/wan2.7-i2v/openapi.json`에서 제공하는 스키마, 즉 요청이 공급자에 도달하기 전에 호출을 검증하는 기준이 되는 동일한 문서에서 생성되었습니다.

### 출력

<ResponseField name="output" type="object" required />

<ResponseField name="output.actual_prompt" type="string">
  지능형 재작성 이후의 실제 프롬프트 (비디오 작업)
</ResponseField>

<ResponseField name="output.check_audio" type="string">
  오디오 생성이 포함된 I2V 작업의 오디오 URL
</ResponseField>

<ResponseField name="output.code" type="string">
  실패한 요청의 오류 코드 (요청이 성공하면 반환되지 않음)
</ResponseField>

<ResponseField name="output.end_time" type="string">
  작업 완료 시간
</ResponseField>

<ResponseField name="output.message" type="string">
  실패한 요청에 대한 상세 정보 (요청이 성공하면 반환되지 않음)
</ResponseField>

<ResponseField name="output.orig_prompt" type="string">
  원본 입력 프롬프트 (비디오 작업)
</ResponseField>

<ResponseField name="output.results" type="object[]">
  이미지 생성 작업의 작업 결과 목록
</ResponseField>

<ResponseField name="output.results[].actual_prompt" type="string">
  지능형 재작성 이후의 실제 프롬프트 (활성화된 경우)
</ResponseField>

<ResponseField name="output.results[].code" type="string">
  이미지 오류 코드 (일부 작업이 실패할 때 반환됨)
</ResponseField>

<ResponseField name="output.results[].message" type="string">
  이미지 오류 정보 (일부 작업이 실패할 때 반환됨)
</ResponseField>

<ResponseField name="output.results[].orig_prompt" type="string">
  원본 입력 프롬프트
</ResponseField>

<ResponseField name="output.results[].url" type="string">
  생성된 이미지 URL 주소
</ResponseField>

<ResponseField name="output.scheduled_time" type="string">
  작업 실행 시간
</ResponseField>

<ResponseField name="output.submit_time" type="string">
  작업 제출 시간
</ResponseField>

<ResponseField name="output.task_id" type="string" required>
  작업 ID
</ResponseField>

<ResponseField name="output.task_metrics" type="object">
  이미지 생성 작업의 작업 결과 통계
</ResponseField>

<ResponseField name="output.task_metrics.FAILED" type="integer">
  실패한 작업 수
</ResponseField>

<ResponseField name="output.task_metrics.SUCCEEDED" type="integer">
  성공한 작업 수
</ResponseField>

<ResponseField name="output.task_metrics.TOTAL" type="integer">
  전체 작업 수
</ResponseField>

<ResponseField name="output.task_status" type="string" required>
  작업 상태

  가능한 값: `PENDING`, `RUNNING`, `SUCCEEDED`, `FAILED`, `CANCELED`, `UNKNOWN`
</ResponseField>

<ResponseField name="output.video_url" type="string">
  완료된 비디오 생성 작업의 비디오 URL. 링크 유효 기간 24시간
</ResponseField>

<ResponseField name="request_id" type="string" required>
  고유 요청 식별자
</ResponseField>

<ResponseField name="usage" type="object">
  출력 정보 통계. 성공한 결과만 집계됩니다
</ResponseField>

<ResponseField name="usage.SR" type="integer">
  비디오 해상도 등급 (I2V 및 wan3.0-video 작업)
</ResponseField>

<ResponseField name="usage.duration" type="number">
  생성된 비디오의 재생 시간(초) (I2V 및 wan3.0-video 작업)
</ResponseField>

<ResponseField name="usage.fps" type="integer">
  생성된 비디오의 프레임 레이트 (wan3.0-video 작업)
</ResponseField>

<ResponseField name="usage.image_count" type="integer">
  생성된 이미지 수 (T2I 및 I2I 작업)
</ResponseField>

<ResponseField name="usage.input_video_duration" type="number">
  입력 비디오의 재생 시간(초), 비디오 입력이 없으면 0.0 (wan3.0-video 작업)
</ResponseField>

<ResponseField name="usage.output_video_duration" type="number">
  출력 비디오의 재생 시간(초) (wan3.0-video 작업)
</ResponseField>

<ResponseField name="usage.ratio" type="string">
  생성된 비디오의 화면 비율, 예: 16:9 (wan3.0-video 작업)
</ResponseField>

<ResponseField name="usage.size" type="string">
  이미지 해상도 (T2I 및 I2I 작업)
</ResponseField>

<ResponseField name="usage.video_count" type="integer">
  생성된 비디오 수 (T2V 작업)
</ResponseField>

<ResponseField name="usage.video_duration" type="number">
  생성된 비디오의 재생 시간(초) (T2V 작업)
</ResponseField>

<ResponseField name="usage.video_ratio" type="string">
  비디오 해상도 비율 (T2V 작업)
</ResponseField>

<ResponseField name="code" type="string">
  실패한 요청의 오류 코드로, `output` 아래가 아니라 응답 envelope의 ROOT에 보고됩니다 (요청이 성공하면 반환되지 않음).
</ResponseField>

<ResponseField name="message" type="string">
  실패한 요청에 대한 상세 정보로, `output` 아래가 아니라 응답 envelope의 ROOT에 보고됩니다 (요청이 성공하면 반환되지 않음). `output.message`로 대체하기 전에 이 값을 먼저 확인하세요.
</ResponseField>

## 예시

### 입력

```json theme={null}
{
  "input": {
    "prompt": "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
    "media": [
      {
        "type": "first_frame",
        "url": "https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/pink_robot_front.png"
      }
    ]
  },
  "parameters": {
    "resolution": "720P",
    "duration": 5
  }
}
```

### 출력

```json theme={null}
{
  "output": {
    "task_id": "0385dc79-5ff8-4d82-bcb6-7c1a9f2e4d60",
    "task_status": "SUCCEEDED",
    "submit_time": "2027-01-01T00:00:00.000Z",
    "scheduled_time": "2027-01-01T00:00:01.000Z",
    "end_time": "2027-01-01T00:01:04.000Z",
    "orig_prompt": "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady",
    "actual_prompt": "the robot lowers its raised arm and steps toward the camera, the flat orange backdrop holds steady, smooth studio lighting, subtle camera push in",
    "video_url": "https://.../generated.mp4"
  },
  "request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51",
  "usage": {
    "SR": 720,
    "duration": 5
  }
}
```

비디오 URL은 24시간 동안 유효합니다. 비디오를 보관해야 한다면 즉시 다운로드하세요.

## 배포 전 확인

SDK는 `Idempotency-Key`를 생성하고 자동 재시도에 재사용합니다. 수동으로 재시도할 때는 원본 키를 재사용하세요. Router는 연결을 최대 10분간 유지할 수 있습니다.

요청이 실패하면 Router는 그 이유를 설명하는 `X-Comfy-Error-Type` 응답 헤더를 보냅니다. `422`는 Router가 공급자를 호출하기 전에 입력을 거부했음을 의미하고, `413`은 요청 본문이 Router가 허용하는 크기보다 컸음을 의미합니다. [결과 URL이 만료](/ko/development/comfy-router/reference#결과-에셋)될 수 있으므로 생성된 에셋은 즉시 다운로드하세요.

위의 필드 설명에 명시된 크기 제한은 해당 필드에 대한 공급자 자체의 한도이며, 공급자 사양에서 인용한 것입니다. Router는 전체 요청 본문에 별도의 상한을 적용하며, base64로 인코딩된 미디어도 여기에 포함됩니다. [요청 본문 크기](/ko/development/comfy-router/limitations)를 참고하세요.

이 페이지는 Comfy Router를 통해 호출하는 하나의 파트너 모델을 설명합니다. 동일한 `comfy-sdk` / `@comfyorg/sdk` 패키지에는 Comfy Cloud에서 전체 ComfyUI 워크플로 그래프를 실행하기 위한 두 번째 클라이언트도 포함되어 있습니다: `Comfy(api_key=...)` / `new Comfy({ apiKey })`, 그리고 `client.workflows`, `client.assets`, `client.jobs`가 있습니다. [Comfy SDKs](/ko/development/api-development/sdks)를 참조하세요.

<CardGroup cols={3}>
  <Card title="헤더" icon="list" href="/ko/development/comfy-router/headers">
    인증, 멱등성, 요청 ID, 오류 분류, 재시도 간격, 지출 한도.
  </Card>

  <Card title="Router API 사용" icon="code" href="/ko/development/comfy-router/api">
    모델 검색, 검증 오류, 재시도, 과금.
  </Card>

  <Card title="제한 사항" icon="triangle-exclamation" href="/ko/development/comfy-router/limitations">
    Router가 현재 지원하지 않는 기능과 대신 사용할 방법.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.