Skip to content
Kuaishou · Kling Image

kling-v4-long-image API

透過 APISea 上的 kling-v4-long-image,以 1K 或 2K 生成直式商品詳情圖片和網頁設計。

圖片生成圖片非同步任務
模型 ID
kling-v4-long-image

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 提供存取。提交非同步生成請求後,輪詢回傳的 task 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

  1. 01

    取得 API key

    登入 APISea,儲值 $50 起,並在控制台建立 sk-sea 金鑰。

  2. 02

    設定 base URL

    在 SDK 或 HTTP 用戶端中,將 https://api.apisea.ai/v1 設為 base URL。

  3. 03

    傳送請求

    呼叫 POST /v1/images/generations,並使用下方的參數及 "model": "kling-v4-long-image"。

  4. 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
}'

參數

參數類型必填預設說明
modelstring必填—Must be `kling-v4-long-image`.
nsfw_checkboolean選填falseWhether to run content moderation before submitting the image task.
promptstring必填—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.
skillstring必填—Required: `ecommerce` for product detail pages or `webpage` for webpage designs, case-insensitive. The modes use different reference-image fields as shown above.
lengthstring選填mediumOnly 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.
resolutionstring選填1KSupports `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_urlsstring[]選填—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_rolesobject[]選填—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.
urlstring必填—A publicly accessible direct reference-image URL.
rolestring必填—
ninteger選填—Each request generates one tall image. Omit this field or use the integer `1`; other values return HTTP 400.
watermarkboolean選填—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

    輪詢 Task ID

    向 POST /v1/images/generations 提交請求,讀取 data[0].task_id,再查詢 GET /v1/tasks/{task_id}。提交前請先驗證參考圖 URL;無法存取或無效的參考圖可能導致生成失敗。

限制與須知

  • 每個非同步請求會生成一張 PNG;n 必須省略或設為 1。

  • 不支援 4K、自訂尺寸,以及 aspect_ratio、width 和 height 欄位。

  • 參考圖必須為 JPG、JPEG 或 PNG,大小最多 30 MB,長寬皆至少 300 px,且比例須介於 2:5 至 5:2。

kling-v4-long-image API 常見問題

在 APISea 上使用 kling-v4-long-image 的費用是多少?

APISea Default 每張圖片 $0.4714。價格依選項而異:APISea 1K-SHORT 每張圖片 $0.2357,APISea 1K-WEBPAGE 每張圖片 $0.55,APISea 2K-LONG 每張圖片 $0.8643;僅對成功的請求收費。

如何透過 API 呼叫 kling-v4-long-image?

使用 APISea Bearer key,將 model 設為 kling-v4-long-image,提供非空白的 prompt,並將 skill 設為 ecommerce 或 webpage,然後傳送 POST https://api.apisea.ai/v1/images/generations。讀取 data[0].task_id,並輪詢 GET /v1/tasks/{task_id} 取得結果。

支援哪些解析度和版面長度?

此模型支援 1K 和 2K,輸出寬度分別為 1024 px 和 2048 px。電商模式在兩種解析度下皆支援短、中、長版面;網頁模式則必須省略 length。

我需要提供參考圖嗎?

電商模式需要透過 image_urls 提供 1–3 張可公開存取的產品圖片。網頁模式可只使用提示詞,也可透過 image_with_roles 提供參考圖,最多各一張風格圖與主體圖。

網頁模式會生成可運作的網站嗎?

網頁模式產生的是網頁設計圖片,而非可運作的網站。每個請求會回傳一張直式 PNG。

我可以將生成的圖片用於商業用途嗎?

商業用途須遵守服務提供者的條款。發布或散布生成圖片前,請先確認 Kuaishou 適用於您預定用途的條款。

相關模型

涵蓋:250+ 個模型 · 最低儲值 $50

開始使用 kling-v4-long-image 開發

一把金鑰,$50 起按量付費,僅對成功的請求收費。