Output resolution
Supports 1k, 2k from the published endpoint schema.
curl -X POST https://runapi.ai/api/v1/kling/text_to_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v4-long-image",
"prompt": "A red apple on a white table",
"output_resolution": "2k",
"skill": "ecommerce",
"source_image_urls": [
"https://cdn.runapi.ai/public/samples/image.jpg"
]
}'
import { KlingClient } from "@runapi.ai/kling";
const client = new KlingClient();
const result = await client.textToImage.run({
model: "kling-v4-long-image",
prompt: "A red apple on a white table",
output_resolution: "2k",
skill: "ecommerce",
source_image_urls: ["https://cdn.runapi.ai/public/samples/image.jpg"],
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/kling/text_to_image",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"kling-v4-long-image","prompt":"A red apple on a white table","output_resolution":"2k","skill":"ecommerce","source_image_urls":["https://cdn.runapi.ai/public/samples/image.jpg"]}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/kling/text_to_image");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'kling-v4-long-image',
'prompt' => 'A red apple on a white table',
'output_resolution' => '2k',
'skill' => 'ecommerce',
'source_image_urls' => ['https://cdn.runapi.ai/public/samples/image.jpg'],
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToImage().run({"model":"kling-v4-long-image","prompt":"A red apple on a white table","output_resolution":"2k","skill":"ecommerce","source_image_urls":["https://cdn.runapi.ai/public/samples/image.jpg"]});
task.waitForResult();
require "runapi/kling"
client = RunApi::Kling::Client.new
result = client.text_to_image.run(
model: "kling-v4-long-image",
prompt: "A red apple on a white table",
output_resolution: "2k",
skill: "ecommerce",
source_image_urls: ["https://cdn.runapi.ai/public/samples/image.jpg"]
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToImage.Run({"model":"kling-v4-long-image","prompt":"A red apple on a white table","output_resolution":"2k","skill":"ecommerce","source_image_urls":["https://cdn.runapi.ai/public/samples/image.jpg"]})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model kling-v4-long-image \
--endpoint text_to_image \
--wait
24 versions available
Pick any model and generate in seconds.
| Provider | Kuaishou |
| Model ID | kling-v4-long-image |
| Modality | Image |
| Task types | Asynchronous |
| API endpoint | /api/v1/kling/text_to_image |
| Billing unit | call |
| Input parameters | callback_url, length, model, output_resolution, prompt, skill, source_image_urls, style_image_url, subject_image_url |
| Max resolution | 1k, 2k |
| Catalog status | Operational |
Sign up for free and create an API key for kling-v4-long-image from the dashboard.
POST to /api/v1/kling/text_to_image with the kling-v4-long-image model slug and your parameters.
Poll the task or follow the callback to retrieve the completed kling-v4-long-image result.
Supports 1k, 2k from the published endpoint schema.
Configure 7 documented parameters, including length, output_resolution, prompt, skill, source_image_urls.
Exposes 1 public endpoint(s): text_to_image.
Asynchronous tasks accept a callback URL for completion notifications.
skillLong-image skill; case insensitive. (ecommerce, webpage)
lengthEcommerce image length. (short, medium, long)
promptLong image description. References must name supplied images: @image_N, @style or @subject.
callback_urlWebhook URL for async notifications.
style_image_urlOptional webpage style reference: public HTTP/HTTPS JPG or PNG, at most 20 MB.
output_resolutionOutput resolution. (1k, 2k)
source_image_urlsEcommerce product images: public HTTP/HTTPS JPG or PNG, at most 20 MB each.
subject_image_urlOptional webpage subject reference: public HTTP/HTTPS JPG or PNG, at most 20 MB.
Auto-generate lifestyle product photos for e-commerce catalogs that lack studio photography.
Rapidly concept environments and characters before committing to final art.
Generate unique cover art and illustrations for blog posts and articles at scale.
Pass the model ID shown in the quickstart.
Per-key rate limits scale with your usage tier. The pricing page shows current limits. If you need higher throughput, contact support to discuss tier upgrades.
Yes. Variant is a parameter in the request. Switch by changing the model ID — no code changes, no re-authentication, no separate billing setup. All variants share the same API key and request shape.
Where streaming is available, RunAPI streams end-to-end. LLM models support token-level streaming. Media models use async task polling or webhook callbacks for result delivery.
Open an issue on the public GitHub repo or email support at [email protected]. Include the task ID and model ID so the team can investigate the specific generation.
No. Your RunAPI API key is enough to access this variant and every other model in the catalog. You do not need accounts with the underlying provider.
We're here to help with enterprise setup, integrations, and technical questions.
Contact Us