> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evolink.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Wan2.7 비디오 편집

> - WAN2.7 (wan2.7-video-edit) 모델은 **지시 기반 편집** 및 **동영상 트랜스퍼** 작업을 지원합니다
- **필수:** 정확히 1개의 동영상(`video_urls`) 업로드. 선택적으로 최대 4장의 참조 이미지(`image_urls`)
- 두 가지 사용 패턴:
  - **지시 전용 편집:** `video_urls` + `prompt` 전송(예: 스타일 변경, 의상 교체)
  - **지시 + 참조 이미지:** `video_urls` + `image_urls` + `prompt` 전송(예: 참조 이미지 요소로 부분 교체)
- 오디오 처리: `keep_original_sound`로 제어(`true` 원음 유지, `false` 모델이 오디오 자동 처리)
- 비동기 처리 모드, 반환된 작업 ID로 [상태 조회](/ko/api-manual/task-management/get-task-detail)
- 생성된 동영상 링크는 24시간 유효합니다. 가능한 한 빨리 저장하세요
- **청구:** "입력 동영상 길이 + 출력 동영상 길이" 기준으로 청구. 생성 성공 시에만 청구되며 실패는 무료



## OpenAPI

````yaml ko/api-manual/video-series/wan2.7/wan2.7-video-edit.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: wan2.7-video-edit API
  description: WAN2.7 모델로 동영상을 편집합니다. 동영상 업로드와 참조 이미지를 결합한 편집을 지원합니다
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 프로덕션 환경
security:
  - bearerAuth: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - 동영상 생성
      summary: wan2.7-video-edit API
      description: >-
        - WAN2.7 (wan2.7-video-edit) 모델은 **지시 기반 편집** 및 **동영상 트랜스퍼** 작업을 지원합니다

        - **필수:** 정확히 1개의 동영상(`video_urls`) 업로드. 선택적으로 최대 4장의 참조
        이미지(`image_urls`)

        - 두 가지 사용 패턴:
          - **지시 전용 편집:** `video_urls` + `prompt` 전송(예: 스타일 변경, 의상 교체)
          - **지시 + 참조 이미지:** `video_urls` + `image_urls` + `prompt` 전송(예: 참조 이미지 요소로 부분 교체)
        - 오디오 처리: `keep_original_sound`로 제어(`true` 원음 유지, `false` 모델이 오디오 자동 처리)

        - 비동기 처리 모드, 반환된 작업 ID로 [상태
        조회](/ko/api-manual/task-management/get-task-detail)

        - 생성된 동영상 링크는 24시간 유효합니다. 가능한 한 빨리 저장하세요

        - **청구:** "입력 동영상 길이 + 출력 동영상 길이" 기준으로 청구. 생성 성공 시에만 청구되며 실패는 무료
      operationId: createWan27VideoEditGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan27VideoEditRequest'
            examples:
              instruction_edit:
                summary: 지시 전용 편집(스타일 변경)
                value:
                  model: wan2.7-video-edit
                  prompt: 전체 화면을 클레이 스타일로 변환
                  video_urls:
                    - https://example.com/source.mp4
              instruction_with_reference:
                summary: 지시 + 참조 이미지(부분 교체)
                value:
                  model: wan2.7-video-edit
                  prompt: 동영상 속 소녀의 옷을 참조 이미지의 옷으로 교체
                  video_urls:
                    - https://example.com/source.mp4
                  image_urls:
                    - https://example.com/clothes.png
      responses:
        '200':
          description: 동영상 작업 생성 성공
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
        '400':
          description: 요청 파라미터 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 인증되지 않음, 토큰이 유효하지 않거나 만료됨
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 할당량 부족, 충전 필요
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: 접근 권한 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: wan2.7-video-edit'
                  type: invalid_request_error
        '429':
          description: 요청 빈도 한도 초과
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: 서버 내부 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    Wan27VideoEditRequest:
      required:
        - model
        - video_urls
      type: object
      properties:
        model:
          type: string
          description: 모델명, `wan2.7-video-edit` 고정
          enum:
            - wan2.7-video-edit
          example: wan2.7-video-edit
        prompt:
          type: string
          description: >-
            원하는 편집 효과를 기술하는 텍스트 프롬프트. 중국어와 영어 지원, 각 글자/문자를 1자로 카운트하며 초과분은 자동으로
            잘립니다. 최대 5000자
          maxLength: 5000
          example: 캐릭터에게 화려한 의상을 입히고 참조 이미지의 모자를 씌우기
        negative_prompt:
          type: string
          description: >-
            동영상에 나타나지 않기를 원하는 내용을 기술하는 네거티브 프롬프트. 중국어와 영어 지원, 최대 500자, 초과분은 자동으로
            잘립니다
          maxLength: 500
          example: 흐림, 저품질
        video_urls:
          type: array
          items:
            type: string
            format: uri
          description: |-
            원본 동영상 URL 배열. **정확히 1개의 동영상 필수**

            **동영상 제한:**
            - 포맷: mp4, mov
            - 길이: `2 ~ 10`초
            - 해상도: 가로/세로가 `[240, 4096]` 픽셀
            - 종횡비: 1:8 ~ 8:1
            - 파일 크기: `100MB` 이하
          minItems: 1
          maxItems: 1
          example:
            - https://example.com/source.mp4
        image_urls:
          type: array
          items:
            type: string
            format: uri
          description: >-
            참조 이미지 URL 배열, 최대 4장. "지시 + 참조 이미지" 시나리오에서 활용 가능. 예: 동영상 속 의상이나 소품을
            참조 이미지 요소로 교체


            **이미지 제한:**

            - 포맷: JPEG, JPG, PNG(투명도 미지원), BMP, WEBP

            - 해상도: 가로/세로가 `[240, 8000]` 픽셀

            - 종횡비: 1:8 ~ 8:1

            - 파일 크기: `20MB` 이하
          maxItems: 4
          example:
            - https://example.com/ref.jpg
        keep_original_sound:
          type: boolean
          description: >-
            편집된 동영상의 오디오 처리 방식. 기본값: `false`


            - `false`: 스마트 모드. 모델이 `prompt` 내용에 따라 판단 — 프롬프트가 음향 요소를 언급하면 오디오를
            재생성할 수 있고, 그렇지 않으면 입력 동영상의 원음을 유지할 수 있음

            - `true`: 입력 동영상의 원음을 강제 유지, 재생성하지 않음
          default: false
          example: true
        quality:
          type: string
          description: |-
            동영상 품질, 기본값 `720p`

            **옵션:**
            - `720p`: 표준 화질, 표준 가격(기본)
            - `1080p`: 고화질, 가격 상승
          enum:
            - 720p
            - 1080p
          default: 720p
          example: 720p
        aspect_ratio:
          type: string
          description: >-
            동영상 종횡비(선택)


            **동작:**

            - 미전달: 입력 동영상의 종횡비에 가까운 비율로 생성

            - 전달: 지정한 `aspect_ratio`로 동영상 생성


            **품질 등급별 출력 해상도:**


            | 품질 | 16:9 | 9:16 | 1:1 | 4:3 | 3:4 |

            | --- | --- | --- | --- | --- | --- |

            | 720p | 1280×720 | 720×1280 | 960×960 | 1104×832 | 832×1104 |

            | 1080p | 1920×1080 | 1080×1920 | 1440×1440 | 1648×1248 | 1248×1648
            |
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
          example: '16:9'
        duration:
          type: number
          description: |-
            동영상 길이(초)

            **규칙:**
            - 기본값 `0`: 입력 동영상 길이를 유지하며 **잘라내지 않음**(입력 동영상을 잘라내고자 할 때만 본 필드 설정)
            - 명시 지정 시 범위 `2 ~ 10`: 시스템이 입력 동영상을 0초부터 지정한 `duration`까지 잘라냄
          minimum: 0
          maximum: 10
          default: 0
          example: 0
        seed:
          type: integer
          description: |-
            랜덤 시드, 기본값은 랜덤

            **설명:**
            - 범위: `1` ~ `2147483647`
            - 시드를 고정하면 프롬프트 반복 시 변동을 줄이고 재현성을 높입니다
          minimum: 1
          maximum: 2147483647
          example: 42
        prompt_extend:
          type: boolean
          description: >-
            프롬프트 지능 재작성 활성화 여부. 활성화 시 대형 모델이 프롬프트를 최적화하여 단순하거나 설명이 부족한 프롬프트의 결과를
            크게 개선합니다.


            **참고:** 기본값은 `false`입니다. 필드를 생략하거나 `false`를 보내면 재작성이 발생하지 않습니다.
            활성화하려면 명시적으로 `true`를 보내세요.
          default: false
          example: false
        callback_url:
          type: string
          description: >-
            작업 완료 시의 HTTPS 콜백 URL


            **콜백 시점:**

            - 작업 완료(completed), 실패(failed), 취소(cancelled) 시 트리거

            - 청구 확정 후 전송


            **보안 제약:**

            - HTTPS만 지원

            - 내부 IP 주소(127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x 등)로의 콜백
            금지

            - URL 길이는 `2048`자 이하


            **콜백 메커니즘:**

            - 타임아웃: `10`초

            - 실패 시 최대 `3`회 재시도(실패 후 `1`/`2`/`4`초 시점)

            - 콜백 응답 형식은 작업 조회 API와 동일

            - 2xx 상태 코드는 성공으로 간주, 그 외는 재시도 트리거
          format: uri
          example: https://your-domain.com/webhooks/video-task-completed
    VideoGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: 작업 생성 타임스탬프
          example: 1757169743
        id:
          type: string
          description: 작업 ID
          example: task-unified-1757169743-7cvnl5zw
        model:
          type: string
          description: 실제로 사용한 모델명
          example: wan2.7-video-edit
        object:
          type: string
          enum:
            - video.generation.task
          description: 작업의 구체적인 종류
        progress:
          type: integer
          description: 작업 진행률 (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: 작업 상태
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/VideoTaskInfo'
          description: 동영상 작업 상세 정보
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: 작업 출력 유형
          example: video
        usage:
          $ref: '#/components/schemas/Usage'
          description: 사용량 및 청구 정보
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: 오류 코드 식별자
            message:
              type: string
              description: 오류 설명
            type:
              type: string
              description: 오류 유형
    VideoTaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: 작업 취소 가능 여부
          example: true
        estimated_time:
          type: integer
          description: 예상 완료 시간(초)
          minimum: 0
          example: 120
    Usage:
      type: object
      description: 사용량 및 청구 정보
      properties:
        billing_rule:
          type: string
          description: 청구 규칙
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: 예상 소비 크레딧
          minimum: 0
          example: 5
        user_group:
          type: string
          description: 사용자 그룹 카테고리
          enum:
            - default
            - vip
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ## 모든 API는 Bearer Token 인증이 필요합니다 ##

        **API Key 받기:**

        [API Key 관리 페이지](https://evolink.ai/dashboard/keys)에서 API Key를 받으세요

        **요청 헤더에 추가:**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````