메인 콘텐츠로 건너뛰기
POST
/
kling
/
v1
/
videos
/
avatar
/
image2video
Create a Kling avatar task
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/avatar/image2video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image": "example"
}
'
{
  "code": 123,
  "message": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "created_at": 123,
    "updated_at": 123,
    "task_info": {}
  }
}
이 엔드포인트를 사용하면 하나의 원본 이미지와 하나의 오디오 소스를 기반으로 말하는 아바타 클립을 만들 수 있습니다.

호출 전에 확인하세요

  • 하나의 아바타 image를 공개 URL 또는 원시 base64 문자열로 제공하세요
  • audio_id 또는 sound_file 중 정확히 하나만 전송하세요
  • 첫 번째 요청은 단순하게 유지하세요: 얼굴 이미지 1개, 오디오 클립 1개, 그리고 선택 사항인 짧은 프롬프트
  • 특별히 더 높은 품질의 경로가 필요하지 않다면 mode: std로 시작하세요

오디오 소스 규칙

  • audio_id는 이미 Kling TTS 경로를 통해 음성을 생성한 경우 가장 쉬운 방법입니다
  • sound_file는 이미 자체 MP3, WAV, M4A 또는 AAC 리소스를 가지고 있을 때 사용할 수 있습니다
  • 아바타 오디오는 길이가 2초에서 60초로 문서화되어 있습니다

작업 흐름

1

아바타 작업 생성

이미지와 하나의 오디오 소스를 제출한 다음, 반환된 task id를 저장하세요.
2

작업 폴링

작업이 종료 상태에 도달할 때까지 개별 조회를 계속 진행하세요.
3

완료된 결과 저장

제공업체 전달 URL 이상의 보존이 필요하다면 최종 리소스를 자체 스토리지에 복사하세요.
전체 파라미터 참조는 공식 Kling Avatar 문서를 확인하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

헤더

Content-Type
string

Optional content type header.

본문

application/json
image
string
기본값:example
필수

Avatar reference image. Accepts an image URL or raw Base64 string (no data: prefix). Supported formats: JPG, JPEG, PNG. Max file size 10 MB. Minimum dimension 300 px on each side; aspect ratio between 1:2.5 and 2.5:1.

audio_id
string
필수

Audio ID returned by the Kling TTS API. Only audio clips between 2 and 60 seconds generated within the last 30 days are accepted. Mutually exclusive with sound_file — exactly one must be provided.

sound_file
string

Audio file as a URL or Base64 string. Accepted formats: MP3, WAV, M4A, AAC. Max 5 MB, duration 2–60 seconds. Mutually exclusive with audio_id — exactly one must be provided.

prompt
string

Text prompt to guide avatar actions, emotions, and camera movements. Max 2500 characters.

mode
string

Generation mode. std (standard, faster and more cost-effective) or pro (professional, higher quality output).

callback_url
string

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

응답

200 - application/json

Task accepted.

code
integer
필수
message
string
필수
data
object
필수