Communitygithub.com

Kling AI 이미지-투-비디오

Kling AI를 사용하여 정적 이미지를 동영상으로 애니메이션화합니다. 이미지를 동영상으로 변환하거나, 정지 이미지에 움직임을 추가하거나, I2V 파이프라인을 구축할 때 사용하세요. 'klingai image to video', 'kling ai animate image', 'klingai img2vid', 'animate picture klingai' 등의 구문으로 트리거할 수 있습니다.

Kling AI 이미지-투-비디오란 무엇인가요?

이 스킬은 Kling AI의 `/v1/videos/image2video` 엔드포인트를 활용하여 정적 이미지를 동영상으로 변환하는 방법을 제공합니다. 사용자는 모션 프롬프트, 카메라 제어, 동적 마스크(모션 브러시), 정적 마스크, 시작-끝 전환을 위한 이미지 테일 등 다양한 기능을 통해 애니메이션을 세밀하게 제어할 수 있습니다. 주요 플랫폼은 Kling AI API이며, Python 스크립트를 통해 직접 호출합니다. 이 스킬은 `kling-v1-5`, `kling-v2-1`, `kling-v2-master` 등 다양한 모델을 지원하며, 표준 및 프로페셔널 모드에서 5초 또는 10초 길이의 동영상을 생성할 수 있습니다. 또한, 상호 배타적인 기능(이미지 테일, 동적 마스크, 카메라 제어 등)을 조합할 때 발생할 수 있는 오류를 방지하기 위한 규칙과 이미지 요구 사항(형식, 최대 크기, 해상도 등)을 명확히 제시합니다. 개발자는 이 스킬을 통해 복잡한 애니메이션 파이프라인을 구축하고, 안전하고 승인된 워크플로우를 유지하며, 콘텐츠 정책 및 품질 승인 절차를 준수할 수 있습니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/plugins/saas-packs/klingai-pack/skills/klingai-image-to-video

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Kling AI 이미지-투-비디오은(는) 무엇을 하나요?

개요

/v1/videos/image2video 엔드포인트를 사용하여 정적 이미지를 애니메이션화합니다. 모션 프롬프트, 카메라 제어, 동적 마스크(모션 브러시), 정적 마스크, 시작-끝 전환을 위한 이미지 테일을 지원합니다.

엔드포인트: POST https://api.klingai.com/v1/videos/image2video

요청 매개변수

매개변수유형필수설명
model_namestring예kling-v1-5, kling-v2-1, kling-v2-master 등
imagestring예소스 이미지의 URL (JPG, PNG, WebP)
promptstring아니요애니메이션의 움직임 설명
negative_promptstring아니요제외할 내용
durationstring예"5" 또는 "10" 초
aspect_ratiostring아니요"16:9" 기본값
modestring아니요"standard" 또는 "professional"
cfg_scalefloat아니요프롬프트 준수 정도 (0.0-1.0)
image_tailstring아니요마지막 프레임 이미지 URL (마스크/카메라와 상호 배타적)
camera_controlobject아니요카메라 움직임 (마스크/image_tail과 상호 배타적)
static_maskstring아니요고정 영역을 위한 마스크 이미지 URL
dynamic_masksarray아니요모션 브러시 궤적
callback_urlstring아니요완료 알림을 위한 웹훅

기본 이미지-투-비디오

import jwt, time, os, requests

BASE = "https://api.klingai.com/v1"

def get_headers():
    ak, sk = os.environ["KLING_ACCESS_KEY"], os.environ["KLING_SECRET_KEY"]
    token = jwt.encode(
        {"iss": ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5},
        sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"}
    )
    return {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}

# 풍경 사진을 애니메이션화
response = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={
    "model_name": "kling-v2-1",
    "image": "https://example.com/landscape.jpg",
    "prompt": "구름이 하늘에 천천히 떠다니고, 부드러운 바람이 나무를 흔들다",
    "negative_prompt": "정적, 움직임 없음, 흐릿함",
    "duration": "5",
    "mode": "standard",
})

task_id = response.json()["data"]["task_id"]

# 결과 폴링
while True:
    time.sleep(15)
    result = requests.get(
        f"{BASE}/videos/image2video/{task_id}", headers=get_headers()
    ).json()
    if result["data"]["task_status"] == "succeed":
        print(f"비디오: {result['data']['task_result']['videos'][0]['url']}")
        break
    elif result["data"]["task_status"] == "failed":
        raise RuntimeError(result["data"]["task_status_msg"])

시작-끝 전환 (image_tail)

image_tail을 사용하여 첫 번째 프레임과 마지막 프레임을 모두 지정합니다. Kling이 그 사이의 움직임을 보간합니다.

response = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={
    "model_name": "kling-v2-master",
    "image": "https://example.com/sunrise.jpg",        # 첫 번째 프레임
    "image_tail": "https://example.com/sunset.jpg",    # 마지막 프레임
    "prompt": "태양이 하늘을 가로지르는 타임랩스",
    "duration": "5",
    "mode": "professional",
})

모션 브러시 (dynamic_masks)

이미지의 특정 요소에 대한 움직임 경로를 그립니다. v2.6에서는 이미지당 최대 6개의 움직임 경로를 지원합니다.

response = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={
    "model_name": "kling-v2-6",
    "image": "https://example.com/person-standing.jpg",
    "prompt": "사람이 자연스럽게 앞으로 걸어가는 모습",
    "duration": "5",
    "dynamic_masks": [
        {
            "mask": "https://example.com/person-mask.png",  # 흰색 = 선택된 영역
            "trajectories": [
                {"x": 0.5, "y": 0.7, "t": 0.0},   # 시작 위치 (정규화 0-1)
                {"x": 0.5, "y": 0.5, "t": 0.5},   # 중간점
                {"x": 0.5, "y": 0.3, "t": 1.0},   # 끝 위치
            ]
        }
    ],
})

정적 마스크 (영역 고정)

이미지의 특정 영역을 정적으로 유지하면서 나머지 부분을 애니메이션화합니다.

response = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={
    "model_name": "kling-v2-master",
    "image": "https://example.com/scene.jpg",
    "prompt": "강물이 흐르고 새들이 날아다니는 모습",
    "duration": "5",
    "static_mask": "https://example.com/buildings-mask.png",  # 흰색 = 고정
})

상호 배타성 규칙

다음 기능들은 단일 요청에서 함께 사용할 수 없습니다:

기능 세트 A기능 세트 B
image_taildynamic_masks, static_mask, camera_control
dynamic_masks / static_maskimage_tail, camera_control
camera_controlimage_tail, dynamic_masks, static_mask

이미지 요구 사항

제약 조건값
형식JPG, PNG, WebP
최대 크기10 MB
최소 해상도300x300 px
최대 해상도4096x4096 px
마스크 형식흰색(선택) / 검은색(제외) PNG

오류 처리

오류원인해결 방법
400 유효하지 않은 이미지URL에 접근할 수 없거나 형식이 잘못됨이미지 URL이 공개적으로 접근 가능한지 확인
400 상호 배타성호환되지 않는 기능 결합요청당 하나의 기능 세트만 사용
task_status: failed이미지가 너무 복잡하거나 품질이 낮음더 높은 해상도, 더 선명한 소스 사용
마스크 불일치마스크 크기가 소스와 다름마스크가 소스 이미지 크기와 일치하는지 확인

전제 조건

  • 런타임 비밀 관리자에 저장된 Kling API 자격 증명, 승인된 모델 및 기간 허용 목록, 작업당 크레딧 예산.
  • 합성 또는 권리 정리가 완료된 소스 이미지와 모든 마스크 또는 테일 이미지, 식별 가능한 개인에 대한 동의 기록 및 에셋 변환 권한.
  • 비공개 스테이징 버킷과 검토 담당자. 새로 생성된 결과물은 정책, 품질 및 게시 승인이 기록될 때까지 초안 전용 및 워터마크 상태를 유지해야 합니다.

지침

  1. 승인된 허용 목록에서 소스 및 마스크 참조를 확인하고, 신뢰할 수 없는 URL, 출처가 불분명한 데이터 또는 문서화된 동의 없이 식별 가능한 개인이 포함된 에셋은 거부합니다.
  2. 크레딧을 사용하기 전에 형식, 크기, 기능 상호 배타성, 프롬프트 길이 및 요청된 기간을 검증합니다. 자동화된 확인을 위해 합성 테스트 데이터를 사용합니다.
  3. 안정적인 작업 키를 사용하여 요청을 중복 제거하고, 콘텐츠 정책 확인이 통과된 후에만 제출하며, 작업과 소스를 비공개 스테이징 저장소에 보관합니다.
  4. 하나의 짧고 워터마크가 포함된 샌드박스 카나리를 실행합니다. 더 크거나 공개 렌더링을 위한 소유자 승인을 요청하기 전에 움직임, 정책 결과, 소스 충실도 및 크레딧 예산을 확인합니다.
  5. 승인 시, 동일한 정확한 작업 결과를 다이제스트(digest)로 승격합니다. 실패 또는 철회 시, 다운스트림 게시를 중지하고, 스테이징된 미디어와 임시 URL을 제거하며, 이전에 승인된 에셋 또는 작업 상태를 복원합니다.
  6. 불투명한 작업 및 에셋 다이제스트, 정책 및 승인 결과, 예산 결과, 보존 기한 및 롤백 참조만 포함하는 수정된 영수증을 기록합니다.

출력

불투명한 작업 식별자, 모델 및 기간, 상태, 출력 다이제스트 또는 비공개 스테이징 URL, 카나리/승인 상태, 정리 또는 롤백 참조가 포함된 결과를 반환합니다. 소스 이미지, 마스크 URL, 프롬프트, 얼굴 데이터, 자격 증명 또는 수정되지 않은 공급자 응답을 로그나 영수증에 포함하지 마십시오.

예시

안전한 자동화 확인을 위해 합성 풍경 테스트 데이터와 비공개 카나리를 사용합니다:

source=fixture:synthetic-landscape-v3; rights=cleared; mode=standard;
duration=5; canary=watermarked-sandbox; policy=pass; approval=pending;
publish=false; contacts_exported=0; receipt=asset-sha256:opaque

동의, 정책, 품질 및 소유자 승인이 모두 기록될 때까지 라이브 고객 사진을 대체하거나 카나리를 게시하지 마십시오.

리소스

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page for positioning, plan a conversion-optimized page layout, or design a launch page. Examples: "landing page for product launch", "conversion-optimized layout for SaaS

jeremylongshore/tons-of-skills-marketplace

Use when asked to design growth-optimized landing pages, activation funnel layouts, or experiment-friendly page structures. Examples: "growth-optimized landing", "activation funnel layout", "A/B testable page

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page, design page layout for conversion, or plan landing page information architecture. Examples: "landing page structure for SaaS", "conversion-optimized layout

jeremylongshore/tons-of-skills-marketplace

Generate polished demo videos from a single prompt. Use when the user asks to create a demo video, product walkthrough, feature showcase, or animated presentation. Trigger with "make a demo video", "create a product video", "demo walkthrough", or "feature showcase video".

jeremylongshore/tons-of-skills-marketplace

Track cryptocurrency portfolio with real-time valuations, allocation analysis, and P&L tracking. Use when checking portfolio value, viewing holdings breakdown, analyzing allocations, or exporting portfolio data. Trigger with phrases like "show my portfolio", "check crypto holdings", "portfolio allocation", "track my crypto", or "export portfolio".

jeremylongshore/tons-of-skills-marketplace

Runs the full release workflow for the current project. Commits any uncommitted changes, pushes to remote, creates and merges a PR if on a feature branch, determines the next semver version from conventional commits, creates an annotated git tag and GitHub release with generated notes, cleans up merged branches, and returns to a clean main. Use when the user says promote, ship, release, commit and push, tag and release, or get back to main.

jeremylongshore/tons-of-skills-marketplace

Agent skill at plugins/productivity/content-multiplier/skills/channel-formats/SKILL.md

jeremylongshore/tons-of-skills-marketplace

Operate an evidence-backed editorial queue, balance topic and format coverage, schedule approved drafts, and reconcile backlog state with the publishing system. Use when choosing or scheduling the next blog work. Trigger with "show the editorial calendar" or "pick the next topic".

jeremylongshore/tons-of-skills-marketplace

Configure CI/CD pipeline for AppFolio property management integrations. Trigger: "appfolio CI".

jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common AppFolio API integration errors. Trigger: "appfolio error".

jeremylongshore/tons-of-skills-marketplace

Build property management dashboard with AppFolio API data. Trigger: "appfolio property dashboard".

jeremylongshore/tons-of-skills-marketplace

Automate tenant management and lease operations with AppFolio. Trigger: "appfolio tenant management".

jeremylongshore/tons-of-skills-marketplace

Collect AppFolio API debug evidence for support tickets. Trigger: "appfolio debug".

jeremylongshore/tons-of-skills-marketplace

Deploy AppFolio integration service to cloud infrastructure. Trigger: "deploy appfolio".

jeremylongshore/tons-of-skills-marketplace

Query AppFolio properties, units, and tenants via REST API. Trigger: "appfolio hello world".

jeremylongshore/tons-of-skills-marketplace

Configure AppFolio Stack API authentication with OAuth 2.0. Use when setting up property management API access, registering as an AppFolio Stack partner, or configuring client credentials for API calls. Trigger: "install appfolio", "setup appfolio", "appfolio auth", "appfolio API key".

jeremylongshore/tons-of-skills-marketplace

Set up local development for AppFolio property management API integration. Trigger: "appfolio local dev".

jeremylongshore/tons-of-skills-marketplace

Production readiness checklist for AppFolio integrations. Trigger: "appfolio production checklist".

jeremylongshore/tons-of-skills-marketplace

Handle AppFolio API rate limits with throttling and backoff. Trigger: "appfolio rate limit".

jeremylongshore/tons-of-skills-marketplace

Reference architecture for AppFolio property management integration. Trigger: "appfolio architecture".

관련 스킬