跳转到主要内容
POST
Submit a Kling 4.0 image-to-video task in Kling's native shape.

授权

Authorization
string
header
必填

Bearer token authentication. Normally a Firebase or Cloud JWT. A 'comfyui-' prefixed API key is also accepted in this header: the prefix classifies the value as an API key and it is validated exactly as if it had been sent in X-API-Key.

请求体

application/json

Kling's native Kling 4.0 image-to-video request.

Request body for a Kling 4.0 image-to-video generation from first, middle and last frame images. The aspect ratio follows the images. The prompt is a contents item of type "prompt"; a top-level prompt is refused rather than ignored. settings.duration and settings.resolution are required so the request never falls back to Kling's own defaults, which are the most expensive configuration.

contents
object[]
必填

The prompt and up to 10 frame images. Each item's type is one of "prompt", "first_frame", "middle_frame" or "last_frame".

Required array length: 1 - 11 elements
settings
object
必填

Output configuration such as resolution and duration.

options
object | null

General configuration such as watermark options. options.callback_url and options.external_task_id are not supported on Kling 4.0; Comfy Router refuses a request that sets either inside options. An explicit null options is treated as absent.

响应

OK - the task-creation response, in Kling's own shape.

Response returned when a Kling 3.0 Turbo task is created.

code
integer

Error code. 0 indicates success.

message
string

Error message.

request_id
string

Request ID generated by the system.

data
object