메인 콘텐츠로 건너뛰기
POST
/
kling
/
v1
/
videos
/
text2video
Text to Video
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/text2video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A happy scene of a vacation on the beach."
}
'
{
  "code": 123,
  "message": "<string>",
  "request_id": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "created_at": 123,
    "updated_at": 123
  }
}
이 엔드포인트를 사용하면 프롬프트로 Kling 텍스트-비디오 작업을 생성할 수 있습니다. 완성된 비디오를 즉시 반환하는 대신 비동기 작업을 시작합니다.

처음 작동하는 요청

  • 먼저 짧은 프롬프트를 보내세요
  • 기본 흐름이 동작한 후에만 aspect_ratio, duration, mode를 추가하세요
  • 순수 polling 대신 푸시 방식으로 전달받고 싶다면 callback_url을 설정하세요

작업 흐름

1

생성 요청 제출

이 엔드포인트를 통해 작업을 생성하고 반환된 Kling task id를 저장하세요.
2

작업 상태 폴링

작업이 종료 상태에 도달할 때까지 개별 조회를 통해 진행 상황을 확인하세요.
3

결과 영구 저장

Kling이 완성된 asset 메타데이터를 반환하면, 장기 보관이 필요할 경우 결과를 자체 스토리지로 옮기세요.
전체 파라미터 매트릭스와 model-track 세부 정보는 Kling 공식 문서를 참조하세요. 이 페이지의 요청 및 응답 형식은 CometAPI 래퍼 참조로 활용하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

헤더

Content-Type
string

Must be application/json.

본문

application/json
prompt
string
기본값:Hello
필수

Text prompt describing the video to generate. Maximum 500 characters.

negative_prompt
string

Elements to exclude from the video. Maximum 200 characters.

aspect_ratio
string

Output aspect ratio (width:height). Options: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3.

callback_url
string

Webhook URL to receive task status updates when the task completes.

model_name
string

Kling model variant to use. See the Models page for current options.

cfg_scale
number

Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1.

mode
enum<string>

Generation mode. std for standard (faster), pro for professional (higher quality).

사용 가능한 옵션:
std,
pro
duration
string

Output video length in seconds. Options: 5, 10.

camera_control
object

Camera motion preset or manual configuration. Omit for automatic camera movement.

external_task_id
string

Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user.

응답

200 - application/json

Successful Response

code
integer

Error code; specifically define the error code

message
string

error message

request_id
string

Request ID, system-generated, for tracking requests, troubleshooting issues

data
object