Referencia de la API de Kling 2.6
Clips 1080p con sonido y control de movimiento opcionales
Con una sola clave de API de PopNow puedes llamar a Kling 2.6 desde tu propio código. Aquí tienes los ID de modelo que debes enviar, cada campo de entrada que acepta, cuántos créditos cuesta cada solicitud y una petición que puedes pegar tal cual en la terminal.
Las descripciones de los parámetros vienen del esquema de entrada del modelo y solo están en inglés.
De un vistazo
- Creado por
- Kuaishou
- Resultado
- Video
- Desde
- 10.35 créditos por segundo generado ($0.1035)
1 crédito = 0,01 US$. Al aceptarse, la tarea retiene el cargo máximo posible y al terminar cobra el uso real, redondeado al crédito superior; el resto se libera. Las tareas fallidas no se cobran. Para saber la cifra exacta antes de ejecutar, llama a POST /api/v1/jobs/quote.
Crear video
kling/2.6/text-to-video
Precio
| Opción | Créditos (por segundo generado) | Dólares |
|---|---|---|
false | 10.35 | $0.1035 |
true | 20.7 | $0.207 |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
promptObligatorio | string | — | hasta 2500 caracteres | Describe the scene, the action and the camera. With sound on, add dialogue in quotes and the sounds you want. |
negative_promptOpcional | string | — | hasta 2500 caracteres | What must not appear in the clip. |
aspect_ratioOpcional | string | 16:9 | 16:9, 9:16, 1:1 | Output aspect ratio. |
generate_audioOpcional | boolean | false | — | Generate a native soundtrack (voices, effects, ambience) with the picture. Audio costs more per second. |
duration_secondsOpcional | integer | 5 | 5, 10 | Output length: 5 or 10 seconds. Billed per second. |
guidance_scaleOpcional | number | 0.5 | de 0 a 1 | How strictly the clip follows the prompt, 0 to 1. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "kling/2.6/text-to-video",
"input": {
"prompt": "A paper boat drifts down a rain-soaked street at dusk, neon signs reflecting in the water, slow tracking shot at ground level",
"duration_seconds": 5,
"generate_audio": false
}
}'La respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Imagen a video
kling/2.6/image-to-video
Precio
| Opción | Créditos (por segundo generado) | Dólares |
|---|---|---|
false | 10.35 | $0.1035 |
true | 20.7 | $0.207 |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
promptObligatorio | string | — | hasta 2500 caracteres | Describe what happens after the opening frame: the action, the camera and, with sound on, the sounds. |
image_urlObligatorio | string (uri) | — | — | Opening frame. The clip starts from this image. JPEG or PNG only. |
negative_promptOpcional | string | — | hasta 2500 caracteres | What must not appear in the clip. |
generate_audioOpcional | boolean | false | — | Generate a native soundtrack (voices, effects, ambience) with the picture. Audio costs more per second. |
duration_secondsOpcional | integer | 5 | 5, 10 | Output length: 5 or 10 seconds. Billed per second. |
guidance_scaleOpcional | number | 0.5 | de 0 a 1 | How strictly the clip follows the prompt, 0 to 1. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
El ejemplo usa archivos de muestra de PopNow en image_url. Cámbialos por tus propios enlaces HTTPS públicos, archivos subidos o recursos guardados.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "kling/2.6/image-to-video",
"input": {
"prompt": "He lands softly on the rooftop, laughs and turns toward the camera while the balloons sway in the evening breeze; slow push-in",
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"duration_seconds": 5,
"generate_audio": false
}
}'La respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Control de movimiento
kling/2.6/character-animation
Precio
| Opción | Créditos (por segundo generado) | Dólares |
|---|---|---|
720p | 10.35 | $0.1035 |
1080p | 16.8 | $0.168 |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
image_urlObligatorio | string (uri) | — | — | The character to animate: one clear, full or half-body picture of the person. JPEG or PNG only. |
video_urlObligatorio | string (uri) | — | — | Driving clip, 3 to 30 seconds: the moves, expressions and gestures to copy. The result is as long as this clip. |
promptOpcional | string | — | hasta 2500 caracteres | Optional notes on the result: the setting, the look, anything the driving clip does not show. |
resolutionOpcional | string | 720p | 720p, 1080p | Output resolution. Higher tiers cost more per second. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
El ejemplo usa archivos de muestra de PopNow en image_url, video_url. Cámbialos por tus propios enlaces HTTPS públicos, archivos subidos o recursos guardados.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "kling/2.6/character-animation",
"input": {
"prompt": "The person dances with relaxed, natural movement",
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
"resolution": "720p"
}
}'La respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
