kling/kling-image-o1, served by Comfy Router from Kling.
Input: Text, Image · Output: Image
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-image-o1
Endpoint: POST https://api.comfy.org/v2/models/kling/kling-image-o1
- Wait for the result
- Queue and collect later
The same body, sent to
POST https://api.comfy.org/v2/models/kling/kling-image-o1/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
Aspect ratio of the generated images (width:height). auto is to intelligently generate images based on incoming content.Possible values:
16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9, autoThe callback notification address for the result of this task. If configured, the server will actively notify when the task status changes. Ignored: comfy-api drops this field before forwarding; Comfy Router polls on your behalf.Format:
uriReference Element List based on element ID configuration. The sum of reference elements and reference images shall not exceed 10.
Customized Task ID. Must be unique within a single user account. Ignored: comfy-api drops this field before forwarding; Comfy Router polls on your behalf.
Reference Image List. Supports inputting image Base64 encoding or image URL (ensure accessibility). Supported formats include .jpg/.jpeg/.png. File size cannot exceed 10MB. Width and height dimensions shall not be less than 300px, aspect ratio between 1:2.5 ~ 2.5:1. The sum of reference elements and reference images shall not exceed 10.
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.
Text prompt words, which can include positive and negative descriptions. Must not exceed 2,500 characters. The Omni model can achieve various capabilities through Prompt with elements and images. Specify an image in the format of <<<>>>, such as <<<image_1>>>.
Image generation resolution. 1k is 1K standard, 2k is 2K high-res, 4k is 4K high-res.Possible values:
1k, 2k, 4kControl whether to generate a single image or a series of images. series is not supported for kling-image-o1 (also what the v1 proxy uses when model_name is omitted); such a request is refused with HTTP 400.Possible values:
single, seriesGET /v2/models/kling/kling-image-o1/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
Task status information, displaying the failure reason when the task fails (such as triggering the content risk control of the platform, etc.)
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.