Skip to content
هذه الصفحة غير متاحة بلغتك بعد، لذا تُعرض باللغة الإنجليزية.
Kuaishou · Kling Image

kling-v4-image API

Generate images from text, reference images, or related series in 2K, 4K, and 8K on APISea.

إنشاء الصورالصورمهمة غير متزامنة
معرّف النموذج
kling-v4-image

تسعير API لنموذج kling-v4-image

جميع الأسعار بالدولار الأمريكي (USD). مقارنة أسعار APISea بالسعر الرسمي المعلن للوحدة نفسها.

الخيارAPISeaرسميوفّر
افتراضيافتراضي$0.06286$0.05714—
2K$0.06286$0.05714—
4K$0.09429$0.08571—
8K$0.1571$0.1429—

الأسعار لكل صورة.

ما هو kling-v4-image؟

Kuaishou’s Kling Image model, kling-v4-image, generates images from text, up to 10 reference images, or instructions for a related series. It supports PNG output at 2K, 4K, and 8K, with 1–9 images per standard request or 2–4 images in series mode. Developers can select an aspect ratio, let the model choose one from the prompt or references, and describe both desired and unwanted content in the required prompt.

Access the model through APISea using one API key and the OpenAI-compatible base URL https://api.apisea.ai/v1. Generation is asynchronous: submit a request, retain its task ID, and poll for results. APISea uses pay-as-you-go billing and charges only for successful requests. Default and 2K output cost $0.06286 per image, 4K costs $0.09429 per image, and 8K costs $0.1571 per image.

أبرز مزايا kling-v4-image

Text and Reference Inputs

Generate from a text prompt or supply up to 10 reference images. Refer to individual inputs with @Image1, @Image2, and subsequent markers in array order.

Three Output Resolutions

Choose 2K, 4K, or 8K PNG output. At a 1:1 aspect ratio, these produce 2048×2048, 4096×4096, and 8192×8192 images respectively.

Batch or Series Generation

Request 1–9 outputs in standard mode, or generate a related series of 2–4 images. Series mode uses a separate required image-count setting.

Aspect Ratio Controls

Choose auto or one of eight explicit aspect ratios, including 16:9, 9:16, and 1:1. The aspect_ratio parameter takes precedence when both it and size are supplied.

كيفية استدعاء API الخاص بـ kling-v4-image في 4 خطوات

  1. 01

    احصل على API key

    سجّل الدخول إلى APISea، واشحن رصيدك بدءًا من $50، وأنشئ مفتاح sk-sea من وحدة التحكم.

  2. 02

    اضبط عنوان URL الأساسي

    استخدم https://api.apisea.ai/v1 عنوانًا أساسيًا في SDK أو عميل HTTP.

  3. 03

    أرسل الطلب

    استدعِ POST /v1/images/generations مع "model": "kling-v4-image" والمعلمات أدناه.

  4. 04

    تعامل مع الاستجابة

    تتضمن الاستجابة task_id. أرسل طلبات GET /v1/tasks/{task_id} دوريًا حتى تصبح الحالة completed، ثم نزّل روابط النتائج.

أمثلة على الطلبات

الوثائق: Kling V4 Image Generation
curl --request POST \
  --url https://api.apisea.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "kling-v4-image",
  "prompt": "An orange cat sitting on a windowsill in warm afternoon sunlight, realistic photography",
  "size": "1:1",
  "resolution": "2K",
  "n": 1,
  "nsfw_check": true
}'

المعلمات

المعلمةالنوعمطلوبافتراضيالوصف
modelstringمطلوب—Must be `kling-v4-image`.
nsfw_checkbooleanاختياريfalseWhether to run content moderation before submitting the image task.
promptstringمطلوب—Required for text-to-image, image-to-image, and series generation. Describe both desired and unwanted content here. Limits are 50,000 characters for English-only text and 21,000 for Chinese-only text and similar languages; mixed-language limits are proportional.
image_urlsstring[]اختياري—Up to 10 reference images, supplied as publicly accessible direct image URLs. For local files, use the [image upload API](/docs/uploads/images) first and pass the returned `url`.
nintegerاختياري1Number of outputs in standard mode: an integer from 1 to 9, default 1. In series mode, omit `n` or set it to `1`; `sequential_image_generation_options.max_images` determines the output count. Passing `n > 1` in series mode returns HTTP 400.
resolutionstringاختياري2KSupports `2K` (default), `4K`, and `8K`, case-insensitive, with PNG output. At `1:1`, 2K is `2048×2048`, 4K is `4096×4096`, and 8K is `8192×8192`; for other ratios, use the actual dimensions of the returned images.
sizestringاختياريautoOutput aspect ratio. Supports `auto` (default) and these 8 explicit ratios:
aspect_ratiostringاختياري—Alias for `size`, with the same accepted values. If both are provided, `aspect_ratio` takes precedence.
sequential_image_generationstringاختياريdisabledUse `disabled` or omit this field for standard generation. Set it to `auto` to generate related images as a series; `sequential_image_generation_options.max_images` is then required. Here, `auto` does not choose the image count automatically.
sequential_image_generation_optionsobjectاختياري—Specifies the image count in series mode.
max_imagesintegerاختياري—Required in series mode: an integer from 2 to 4 specifying the requested output count. Omitting it, passing the string `"auto"`, or using an out-of-range value returns HTTP 400.

ما الذي يمكنك إنشاؤه باستخدام kling-v4-image

Campaign Image Variations

Build a workflow that generates multiple images from a campaign brief, using standard mode to request up to nine outputs for review.

Reference-Based Visual Concepts

Let teams upload reference images and describe the desired result. Use numbered image markers to identify which reference each instruction concerns.

Related Editorial Images

Generate a series of two to four related images for an article, presentation, or visual narrative using series mode.

Multi-Format Content Tools

Offer landscape, portrait, and square image generation in a content tool, with selectable aspect ratios and 2K, 4K, or 8K output.

نصائح للحصول على نتائج أفضل

  • 01

    Write Both Requirements and Exclusions

    Include desired and unwanted content in the prompt, which is required for text-to-image, image-to-image, and series generation.

  • 02

    Validate Reference Images First

    Use publicly accessible direct image URLs. Each reference must be at most 30 MB, at least 300 pixels in both dimensions, and within the 2:5–5:2 aspect-ratio range.

  • 03

    Set Series Counts Explicitly

    Set sequential_image_generation to auto and supply sequential_image_generation_options.max_images as an integer from 2 to 4. Omit n or set it to 1; auto does not choose the series count.

  • 04

    Choose Resolution and Poll

    Use 2K at $0.06286 per image when higher resolution is unnecessary; 4K costs $0.09429 per image and 8K costs $0.1571 per image. Keep the task ID and poll for completion rather than submitting duplicate requests.

القيود ومعلومات مهمة

  • Generation is asynchronous, and a related series may take several minutes.

  • Requests accept up to 10 reference images, with 1–9 standard outputs or 2–4 series outputs.

  • Explicit width, height, mask_url, pixel-based size, and watermark: true are unsupported and return HTTP 400.

الأسئلة الشائعة حول API الخاص بـ kling-v4-image

How much does kling-v4-image cost on APISea?

Default and 2K output cost $0.06286 per image, 4K costs $0.09429 per image, and 8K costs $0.1571 per image. Billing is pay-as-you-go and applies only to successful requests; these rates do not represent savings over provider list prices.

How do I call kling-v4-image through the API?

Send an authenticated POST request to https://api.apisea.ai/v1/images/generations with model set to kling-v4-image and a required prompt. Read data[0].task_id, then query GET /v1/tasks/{task_id} for the result.

What resolutions and aspect ratios are supported?

The model outputs PNG images in 2K, 4K, or 8K, with 2K as the default. Aspect ratios are auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, and 21:9; pixel-based size values are not supported.

Can I use reference images, and what are the limits?

Yes, you can supply up to 10 publicly accessible direct image URLs in JPG, JPEG, PNG, or GIF format. Each image must be no larger than 30 MB, measure at least 300 pixels in both dimensions, and have an aspect ratio between 2:5 and 5:2.

How do I generate a related series of images?

Set sequential_image_generation to auto and set sequential_image_generation_options.max_images to an integer from 2 to 4. Omit n or set it to 1; passing n greater than 1 in series mode returns HTTP 400.

Can I use generated images commercially?

Commercial use is subject to the provider’s terms. Review the applicable Kuaishou terms and any rights associated with your reference images before using outputs commercially.

نماذج ذات صلة

العمق: أكثر من 250 نموذجًا · الحد الأدنى لشحن الرصيد $50

ابدأ التطوير باستخدام kling-v4-image

مفتاح واحد، وادفع حسب الاستخدام بدءًا من $50؛ ولا تُحتسب الرسوم إلا على الطلبات الناجحة.