Skip to main content
POST
cURL
Bu endpoint’i, bir prompt’tan Kling text-to-video görevi oluşturmak için kullanın. Hazır bir videoyu hemen döndürmek yerine async bir iş başlatır.

İlk çalışan istek

  • Önce kısa bir prompt gönderin
  • kling-v3 örneğiyle başlayın, ardından farklı bir model hattına ihtiyaç duyduğunuzda OpenAPI enum içinden başka bir model_name seçin
  • Temel akış çalıştıktan sonra aspect_ratio, duration, mode veya sound ekleyin
  • Salt polling yerine push teslimat istiyorsanız callback_url ayarlayın
  • Desteklenen modellerde, deterministik ve ses içermeyen ilk istek için sound: off kullanın

Model adlandırma

Bu endpoint’te standart Kling video model ID’lerini kullanın. Omni model ID’lerini Omni Video için saklayın.

Süre ve en-boy oranı

Bu endpoint ayrı bir çözünürlük belirteci veya kesin bir size alanı sunmaz. İstenen en-boy oranı, çıktı kare şek­lini kontrol eder.

Görev akışı

1

Üretim isteğini gönderin

Görevi bu endpoint üzerinden oluşturun ve döndürülen Kling görev kimliğini kaydedin.
2

Görev durumunu sorgulayın

Görev terminal bir duruma ulaşana kadar ilerlemeyi Bir Kling görevi alın üzerinden kontrol edin.
3

Sonucu kalıcı olarak saklayın

Kling tamamlanmış varlık meta verilerini döndürdüğünde, uzun süreli saklama gerekiyorsa sonucu kendi depolamanıza taşıyın.
Tam parametre matrisi ve model hattı ayrıntıları için resmî Kling dokümantasyonuna bakın.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer token authentication. Use your CometAPI key.

Başlıklar

Content-Type
string

Must be application/json.

Gövde

application/json
prompt
string
gerekli

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

negative_prompt
string

Elements to exclude from the video. Maximum 200 characters.

aspect_ratio
enum<string>

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.

Mevcut seçenekler:
16:9,
9:16,
1:1
callback_url
string

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

model_name
enum<string>
varsayılan:kling-v1

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.

Mevcut seçenekler:
kling-v1,
kling-v1-6,
kling-v2-master,
kling-v2-1-master,
kling-v2-5-turbo,
kling-v2-6,
kling-v3
cfg_scale
number

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

mode
enum<string>
varsayılan:std

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

Mevcut seçenekler:
std,
pro
duration
string
varsayılan:5

Output video length in seconds. Use 5 or 10; omit to use 5.

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.

sound
enum<string>

Optional generated-audio switch for models that support video sound. Use on or off, or omit the field for the model default.

Mevcut seçenekler:
on,
off

Yanıt

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