kling/kling-v2-6, served by Comfy Router from Kling.
Input: Image, Text · Output: Video
Quick start
Create a key in your Comfy workspace and export it asCOMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk and npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP.
Model ID: kling/kling-v2-6
Endpoint: POST https://api.comfy.org/v2/models/kling/kling-v2-6
- Wait for the result
- Queue and collect later
The same body, sent to
POST https://api.comfy.org/v2/models/kling/kling-v2-6/requests. Router answers 201 with a request_id as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. Queued delivery walks through status, cancellation and collection.Schema
Input
The callback notification address. Ignored: comfy-api drops this field before forwarding; Comfy Router polls on your behalf.Format:
uriControls camera’s movement along horizontal axis (x-axis). Negative indicates left, positive indicates right.Range:
-10 to 10Controls camera’s rotation in vertical plane (x-axis). Negative indicates downward rotation, positive indicates upward rotation.Range:
-10 to 10Controls camera’s rolling amount (z-axis). Negative indicates counterclockwise, positive indicates clockwise.Range:
-10 to 10Controls camera’s rotation in horizontal plane (y-axis). Negative indicates left rotation, positive indicates right rotation.Range:
-10 to 10Controls camera’s movement along vertical axis (y-axis). Negative indicates downward, positive indicates upward.Range:
-10 to 10Controls change in camera’s focal length. Negative indicates narrower field of view, positive indicates wider field of view.Range:
-10 to 10Predefined camera movements type. simple: Customizable camera movement. down_back: Camera descends and moves backward. forward_up: Camera moves forward and tilts up. right_turn_forward: Rotate right and move forward. left_turn_forward: Rotate left and move forward.Possible values:
simple, down_back, forward_up, right_turn_forward, left_turn_forwardFlexibility in video generation. The higher the value, the lower the model’s degree of flexibility, and the stronger the relevance to the user’s prompt.Range:
0 to 1Format: floatVideo length in secondsPossible values:
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15Customized Task ID. Ignored: comfy-api drops this field before forwarding; Comfy Router polls on your behalf.
Model name. Omit it or send null when using Comfy Router; the model is selected by the request path. A supplied name must match that path.
Information about each storyboard, such as prompts and duration. Supports up to 6 storyboards, with a minimum of 1. Required when multi_shot is true and shot_type is customize.
Duration of this storyboard in seconds. Must not exceed total task duration and must not be less than 1. Sum of all storyboard durations equals total task duration.
Whether to generate multi-shot video. When true, the prompt parameter is invalid. When false, the shot_type and multi_prompt parameters are invalid.
Negative text prompt. It is recommended to supplement negative prompt information through negative sentences directly within positive prompts.
Positive text prompt. Use <<<voice_1>>> to specify a voice matching the voice_list parameter order. A task can reference up to 2 tones. When specifying a tone, the sound parameter value must be on.
Storyboard method. Required when the multi_shot parameter is set to true.Possible values:
customize, intelligenceWhether to generate sound simultaneously when generating videos. Only V2.6 and subsequent versions of the model support this parameter.Possible values:
on, offList of voices referenced when generating videos. Supports up to 2 voices; reference them in
prompt as <<<voice_1>>> and <<<voice_2>>> in list order. Requires sound set to “on”, which only V2.6 and subsequent versions of the model support; on an earlier model, or with sound left at its “off” default, voices are not applied.Whether to generate watermarked results simultaneously. Custom watermark is not supported at this time.
Reference Image - URL or Base64 encoded string, cannot exceed 10MB, resolution not less than 300*300px, aspect ratio between 1:2.5 ~ 2.5:1. Base64 should not include data:image prefix.
Reference Image - End frame control. URL or Base64 encoded string, cannot exceed 10MB, resolution not less than 300*300px. Base64 should not include data:image prefix. Cannot be used simultaneously with dynamic_masks/static_mask or camera_control.
Video generation mode. std: Standard Mode, which is cost-effective. pro: Professional Mode, generates videos with longer duration but higher quality output.Possible values:
std, proGET /v2/models/kling/kling-v2-6/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
Examples
Input
Output
Before you ship
The SDKs create anIdempotency-Key and reuse it for automatic retries. For manual retries, reuse the original key. Router can hold the connection for up to 10 minutes.
When a request fails, Router sends an X-Comfy-Error-Type response header explaining why. A 422 means Router rejected the input before calling the provider, and a 413 means the request body was larger than Router accepts. Download generated assets promptly because result URLs can expire.
Any size limit named in a field description above is the provider’s own bound on that field, quoted from the provider’s specification. Router applies a separate cap to the whole request body, which base64-encoded media counts against: see request body size.
This page documents one partner model called through Comfy Router. The same comfy-sdk / @comfyorg/sdk package also ships a second client, for running a whole ComfyUI workflow graph on Comfy Cloud: Comfy(api_key=...) / new Comfy({ apiKey }), with client.workflows, client.assets and client.jobs. See Comfy SDKs.
Headers
Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
Using the Router API
Model discovery, validation errors, retries, and billing.
Limitations
What Router does not do today, and what to use instead.