kling-v4-long-image API 价格
所有价格均以 USD 计。对比 APISea 费率与相同计费单位的官方标价。
| 选项 | APISea | 官方 | 节省 |
|---|---|---|---|
| 默认默认 | $0.4714 | $0.4286 | — |
| 1K-LONG | $0.7857 | $0.7143 | — |
| 1K-MEDIUM | $0.4714 | $0.4286 | — |
| 1K-SHORT | $0.2357 | $0.2143 | — |
| 1K-WEBPAGE | $0.55 | $0.50 | — |
| 2K-LONG | $0.8643 | $0.7857 | — |
| 2K-MEDIUM | $0.55 | $0.50 | — |
| 2K-SHORT | $0.2829 | $0.2571 | — |
| 2K-WEBPAGE | $0.5971 | $0.5429 | — |
价格单位为 每张图像。
kling-v4-long-image 是什么?
快手的 kling-v4-long-image 属于 Kling Image 系列,可生成竖版商品详情图和网页设计图。在电商模式下,可根据提示词和 1–3 张商品参考图,生成短、中或长版商品布局。网页模式接受提示词,并可选提供风格和主体参考图。两种模式的每个请求均返回一张 PNG,输出宽度可选 1K 或 2K;图像高度取决于生成的内容。
APISea 通过一个 API key 和兼容 OpenAI 的 base URL https://api.apisea.ai/v1 提供访问。提交异步生成请求后,轮询返回的任务 ID 获取结果。采用按量付费,价格因分辨率和布局选项而异:APISea Default 每张图片 $0.4714,APISea 1K-SHORT 每张图片 $0.2357。APISea 仅对成功的请求收费。
kling-v4-long-image 的亮点
适用于电商的高纵向布局
可选择短、中或长布局,大致对应 2–5、6–10 或 11–18 个内容区块。实际内容和高度取决于生成结果。
网页设计图片
仅通过提示词生成网页设计图片,也可以添加可选的风格参考和主体参考。每种参考角色最多只能使用一次。
两种输出宽度
选择 1K,输出宽度为 1024 px;或选择 2K,输出宽度为 2048 px。两种分辨率均支持所有电商布局长度,包括长布局。
参考图引导生成
电商模式需要 1–3 张产品图片。在提示词中使用带编号的图片标记,指明具体输入图片。
分 4 步调用 kling-v4-long-image API
- 01
获取 API 密钥
登录 APISea,充值 $50 起,并在控制台创建一个 sk-sea 密钥。
- 02
设置 base URL
在 SDK 或 HTTP 客户端中将 https://api.apisea.ai/v1 设置为 base URL。
- 03
发送请求
调用 POST /v1/images/generations,并传入 "model": "kling-v4-long-image" 及以下参数。
- 04
处理响应
响应中包含 task_id。轮询 GET /v1/tasks/{task_id},直到状态变为 completed,然后下载结果 URL。
curl --request POST \
--url https://api.apisea.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v4-long-image",
"skill": "ecommerce",
"prompt": "Create a product detail page for the coffee maker in @Image1, with a hero section, key features, and everyday use scenes",
"image_urls": [
"https://example.com/product.png"
],
"length": "medium",
"resolution": "1K",
"nsfw_check": true
}'参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
model | string | 必填 | — | Must be `kling-v4-long-image`. |
nsfw_check | boolean | 可选 | false | Whether to run content moderation before submitting the image task. |
prompt | string | 必填 | — | Required and must not be blank. Limits are 166,000 characters for English-only text and 71,000 for Chinese-only text and similar languages; mixed-language limits are proportional. Describe the layout, sections, copy, style, and subject. |
skill | string | 必填 | — | Required: `ecommerce` for product detail pages or `webpage` for webpage designs, case-insensitive. The modes use different reference-image fields as shown above. |
length | string | 可选 | medium | Only for `skill: "ecommerce"`: `short`, `medium` (default), or `long`, roughly corresponding to 2–5, 6–10, or 11–18 content sections. Actual content and height depend on generation. Omit this field in webpage mode; sending it returns HTTP 400. |
resolution | string | 可选 | 1K | Supports `1K` (default) and `2K`, case-insensitive. Both resolutions support every ecommerce length, including `long + 2K`. Output widths are 1024 px and 2048 px respectively; height depends on content. `4K` is not supported. |
image_urls | string[] | 可选 | — | Only for ecommerce: 1–3 product images are required. Omit this field in webpage mode and use `image_with_roles`. Supply publicly accessible direct image URLs. For local files, use the [image upload API](/docs/uploads/images) and pass the returned `url`. |
image_with_roles | object[] | 可选 | — | Only for webpage mode; optional. Provide at most one `style` image and one `subject` image. Either or both may be omitted. Omit this field in ecommerce mode. |
url | string | 必填 | — | A publicly accessible direct reference-image URL. |
role | string | 必填 | — | |
n | integer | 可选 | — | Each request generates one tall image. Omit this field or use the integer `1`; other values return HTTP 400. |
watermark | boolean | 可选 | — | Omit this field or use `false`; `true` returns HTTP 400. |
kling-v4-long-image 的应用场景
产品详情页素材
构建工作流,将产品参考图和按区块编写的文案转换为纵向电商图片。
营销活动布局变体
针对不同的营销活动需求生成短、中、长产品布局,并在提示词中指定内容和样式。
网页设计概念图
根据文字需求创建网页设计图片,在实施前用于设计评审。
基于参考图探索设计
团队可以提供风格参考图和主体参考图,围绕选定的视觉方向和主体探索网页设计概念。
获得更好结果的技巧
- 01
撰写区块需求说明
明确描述布局、区块、文案、风格和主体。在电商模式下,选择与预期区块数量相匹配的布局长度。
- 02
让参考图与模式匹配
电商模式使用 image_urls,网页模式使用 image_with_roles。使用 @Image1 及后续编号标记引用图片;网页模式的参考图按风格图优先、主体图其次的顺序编号。
- 03
选择定价档位
请谨慎选择分辨率和电商布局长度:APISea 1K-SHORT 每张图片 $0.2357,APISea 2K-LONG 每张图片 $0.8643。默认分辨率为 1K,默认电商布局长度为中。
- 04
轮询任务 ID
向 POST /v1/images/generations 提交请求,读取 data[0].task_id,然后查询 GET /v1/tasks/{task_id}。提交前请验证参考图 URL;无法访问或无效的参考图可能导致生成失败。
限制与须知
每个异步请求生成一张 PNG;必须省略 n 或将其设为 1。
不支持 4K 和自定义 size、aspect_ratio、width、height 字段。
参考图必须为 JPG、JPEG 或 PNG,大小不超过 30 MB,宽和高均至少为 300 px,宽高比须在 2:5 到 5:2 之间。
kling-v4-long-image API 常见问题
kling-v4-long-image 在 APISea 上的费用是多少?
APISea Default 每张图片收费 $0.4714。价格因选项而异:APISea 1K-SHORT 每张图片 $0.2357,APISea 1K-WEBPAGE 每张图片 $0.55,APISea 2K-LONG 每张图片 $0.8643;仅对成功的请求收费。
如何通过 API 调用 kling-v4-long-image?
发送 POST https://api.apisea.ai/v1/images/generations 请求,并提供 APISea Bearer 密钥、将 model 设为 kling-v4-long-image、非空 prompt,以及设为 ecommerce 或 webpage 的 skill。读取 data[0].task_id,并轮询 GET /v1/tasks/{task_id} 获取结果。
支持哪些分辨率和布局长度?
该模型支持 1K 和 2K,输出宽度分别为 1024 px 和 2048 px。电商模式在两种分辨率下均支持短、中、长布局;网页模式则要求省略 length。
我需要提供参考图吗?
电商模式需要通过 image_urls 提供 1–3 张可公开访问的产品图片。网页模式可以仅使用提示词,也可以通过 image_with_roles 提供最多一张风格图和一张主体图。
网页模式会生成可运行的网站吗?
网页模式生成的是网页设计图片,而不是可运行的网站。每个请求都会返回一张纵向 PNG 图片。
生成的图片可以用于商业用途吗?
商业用途须遵守提供方的条款。在发布或分发生成的图片前,请查看适用于您预期用途的快手相关条款。