Kling 텍스트-투-비디오 작업 생성
CometAPI의 POST /kling/v1/videos/text2video를 통해 Kling으로 텍스트 프롬프트에서 비디오를 생성한 다음, task ID로 작업 상태를 추적하고 결과를 조회합니다.
첫 번째로 동작하는 요청
- 먼저 짧은 프롬프트를 보내세요
kling-v3예시부터 시작한 다음, 다른 모델 계열이 필요할 때 OpenAPI enum에서 다른model_name을 선택하세요- 기본 흐름이 정상적으로 동작한 후에만
aspect_ratio,duration,mode,sound를 추가하세요 - 순수 폴링 대신 푸시 전달을 원하면
callback_url을 설정하세요 - 생성 사운드를 지원하는 모델에서 오디오 없는 결정적 첫 요청이 필요하다면
sound: off를 사용하세요
모델 이름 지정
이 엔드포인트에서는 일반적인 Kling 비디오 model ID를 사용하세요. Omni model ID는 Omni Video용으로 유지하세요.duration 및 종횡비
size 필드를 제공하지 않습니다. 요청한 종횡비가 출력 프레임 형태를 제어합니다.
작업 흐름
생성 요청 제출
작업 상태 폴링
결과 저장
인증
Bearer token authentication. Use your CometAPI key.
헤더
Must be application/json.
본문
Text prompt describing the video to generate. Maximum 500 characters.
Elements to exclude from the video. Maximum 200 characters.
Aspect ratio request. Typical rendered sizes are 1280x720 for 16:9, 720x1280 for 9:16, and 960x960 for 1:1. This endpoint does not expose an exact size field.
16:9, 9:16, 1:1 Webhook URL to receive task status updates when the task completes.
Model ID for this text-to-video request. Use an ordinary Kling video model ID; use Omni model IDs only with the Omni Video endpoint.
kling-v1, kling-v1-6, kling-v2-master, kling-v2-1-master, kling-v2-5-turbo, kling-v2-6, kling-v3 Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1.
Generation mode. std for standard (faster), pro for professional (higher quality). The default is std.
std, pro Output video length in seconds. Use 5 or 10; omit to use 5.
Camera motion preset or manual configuration. Omit for automatic camera movement.
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.
Optional generated-audio switch for models that support video sound. Use on or off, or omit the field for the model default.
on, off