Endpoints
| Método | Endpoint | Descripción |
|---|---|---|
| POST | /api/v1/generateTask/kling-2-5-turbo-pro | Crear tarea de generación |
| GET | /api/v1/statusTask/kling-2-5-turbo-pro | Consultar estado de la tarea |
Autenticación
Todas las solicitudes requieren una clave API en el header:Cuerpo de la solicitud
Parámetros
async (polling) or callback (webhook)
Callback URL, required when request_type=callback (conditional)
Routing strategy: auto, value, or official
Model input parameters
text-to-video— Generate video from textimage-to-video— Generate video from image (supports 1-2 images for end frame control)
Example
Text-to-VideoRespuesta
POST /api/v1/generateTask/kling-2-5-turbo-pro
DevuelvetaskId en éxito para consultas de estado posteriores.
Éxito:
GET /api/v1/statusTask/kling-2-5-turbo-pro
Consulta el estado de ejecución y resultados de la tarea víataskId.
Campos de respuesta de estado
Identificador único de la tarea.
Estado actual:
pending, processing, success, or failed.JSON string containing
resultUrls array. Only present on success. Parse with JSON.parse().Error code. Only present when
state is failed. See Códigos de error.Human-readable error message. Only present when
state is failed.Task creation timestamp (Unix milliseconds).
Task completion timestamp (Unix milliseconds).
Processing duration in milliseconds.
Códigos de error
| Código | Descripción |
|---|---|
| 400 | Parámetros inválidos o error de solicitud |
| 401 | Clave API inválida o faltante |
| 429 | Límite de tasa excedido |
| Fail Code | Descripción |
|---|---|
CONTENT_VIOLATION | Content violates safety guidelines |
INVALID_IMAGE_URL | Cannot access provided image URL |
Límites de tasa
| Límite | Valor |
|---|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
429. Espera y reintenta.
Consejos
- Generation time:
- 5-second video: ~30-45 seconds
- 10-second video: ~45-60 seconds
- Submit task, wait 30 seconds, then poll every 5 seconds
- Turbo advantage: Faster generation and better value compared to standard version, ideal for batch generation.
- Callback mode: Recommend using
callbackmode to avoid frequent polling. - Video expiration: Result URLs are valid for 15 days. Download promptly.
- Content moderation: Prompts must comply with content safety guidelines.
- End frame control:
image-to-videomode supports 2 images:- 1st image: Video start frame
- 2nd image: Video end frame
- Enables precise start/end control, ideal for transition animations
- Negative prompt: Use
negative_promptto avoid blur, jitter, and other unwanted effects. - CFG Scale:
- 0.3-0.5: More creative freedom
- 0.6-0.8: Moderate adherence to prompt
- 0.9-1.0: Strict adherence, may lose flexibility
- Image formats:
image_urlssupports JPG, PNG, WebP, max 10MB per image.