Use the Kling 3.0 API for 3–15 second video

The xplaai Kling 3.0 API uses the asynchronous /v1/videos endpoint. Select kling-video-3-0 for 3–15 second generation, choose standard for 720p or professional for 1080p, and select kling-video-3-0-edit explicitly for source-video editing. The two public model names keep separate input and duration rules.

Create an API key or review the current video documentation.

Two public model names, two contracts

Workflow Public model Important rule
Text-to-video and supported reference-image generation kling-video-3-0 Set an integer duration from 3 to 15 seconds
Source-video editing kling-video-3-0-edit Supply a reference video; its first item determines duration

The editing model is not a hidden mode or automatic fallback for the generation model. Choose the public model name that matches the input you intend to send.

Create a Kling 3.0 generation task

export XPLA_API_KEY="your_api_key"

curl --request POST \
  --url https://xplaai.com/v1/videos \
  --header "Authorization: Bearer $XPLA_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "kling-video-3-0",
    "prompt": "a premium product shot floating above a green-tech city at night",
    "mode": "professional",
    "seconds": "6",
    "metadata": {
      "aspectRatio": "16:9",
      "mode_image": "default"
    }
  }'

This request asks for six seconds in professional mode. The video request returns an asynchronous task rather than the final file.

Control duration and resolution

Duration

kling-video-3-0 accepts integer durations from 3 through 15 seconds. Validate the value before creating the task; do not round an unsupported decimal or silently replace an out-of-range duration.

The edit model works differently. Its source video determines the output duration, so a duration selector for generation should not be reused as if it controlled editing.

Resolution

Kling maps its public mode to resolution:

  • mode: "standard" → 720p;
  • mode: "professional" → 1080p.

Store the selected mode with the task so the generated result is explainable later.

Aspect ratio

The xplaai content map positions this page for 16:9, 9:16 and 1:1 Kling workflows. Use the current documentation as the final authority for the chosen task and keep the ratio consistent across any aliases your client sends.

For short-form mobile creative, use 9:16. For conventional landscape video, use 16:9. Use 1:1 only when the live model contract confirms it for the selected workflow.

Add a reference image

The Kling contract accepts supported reference images as public URLs or base64 input. Current file rules include:

  • JPEG or PNG;
  • up to 10MB per image;
  • a public URL must be reachable by the service;
  • base64 data should be validated for media type and size before submission.

Example:

{
  "model": "kling-video-3-0",
  "prompt": "animate the supplied product with a slow camera orbit and controlled studio reflections",
  "mode": "professional",
  "seconds": "8",
  "images": [
    "https://example.com/product-reference.png"
  ],
  "metadata": {
    "aspectRatio": "9:16",
    "mode_image": "default"
  }
}

Do not include credentials in a media URL. If the URL expires, keep it valid long enough for the platform to retrieve the file.

Edit a source video with the separate model

Use kling-video-3-0-edit when the request begins with a source video:

{
  "model": "kling-video-3-0-edit",
  "prompt": "keep the original motion and turn the scene into a clean futuristic product lab",
  "mode": "professional",
  "images": [
    "https://example.com/reference-frame.png"
  ],
  "metadata": {
    "aspectRatio": "16:9",
    "mode_image": "default",
    "ref_videos": "https://example.com/reference-video.mp4"
  }
}

Current source-video rules:

  • a reference video is required;
  • MP4, MOV and WebM are supported;
  • the first reference video determines output duration;
  • the maximum documented source length is 120 seconds;
  • the maximum documented source size is 100MB;
  • one source video is recommended.

Validate the file before submitting it. A browser filename alone is not reliable proof of the actual media type.

Poll and retrieve the video

Store the task ID from POST /v1/videos, then poll:

GET https://xplaai.com/v1/videos/{task_id}
Authorization: Bearer $XPLA_API_KEY

After completion:

GET https://xplaai.com/v1/videos/{task_id}/content
Authorization: Bearer $XPLA_API_KEY

Keep retry behavior separate from creating a new generation. A network retry should not accidentally submit a second paid task.

Build validation around the selected contract

For kling-video-3-0, validate:

  • duration is an integer from 3 to 15;
  • mode is standard or professional;
  • the selected aspect ratio is supported by the live contract;
  • reference images meet format and size rules.

For kling-video-3-0-edit, validate:

  • at least one reference video is present;
  • the first source video is within 120 seconds and 100MB;
  • the source type is MP4, MOV or WebM;
  • user-facing duration is derived from the source rather than a generation-only selector.

This split prevents fields from one contract leaking into the other.

Compare Kling with other xplaai video models

Choose the model by the inputs and controls your application needs:

  • Veo 3.1 Fast has a fixed eight-second contract with frame and ingredient reference modes.
  • Grok Imagine Video offers fixed 720p output with 6, 10 and 15 second duration choices.
  • The broader AI video API guide compares the task lifecycle across models.

If you need product inputs, copy planning and several vertical outputs coordinated as a workflow, explore the Batch Commerce Video Skill.

Frequently asked questions

What duration does Kling Video 3.0 support?

kling-video-3-0 accepts integer durations from 3 through 15 seconds. The editing model uses the first reference video's duration.

How do I request 1080p?

Set mode to professional. Standard mode maps to 720p; professional mode maps to 1080p.

Is editing the same model as text-to-video?

No. Use kling-video-3-0 for generation and explicitly select kling-video-3-0-edit for source-video editing.

Can I use a reference image?

Yes. Current documentation accepts JPEG or PNG reference images through a supported public URL or base64 value, up to 10MB per image.

What source-video formats are supported?

The editing contract supports MP4, MOV and WebM, with a documented maximum of 120 seconds or 100MB.

How do I retrieve the result?

Poll GET /v1/videos/{task_id} and request /v1/videos/{task_id}/content after the task completes.

Run a Kling Video 3.0 request

Create an xplaai API key, choose the generation or editing contract, and test the full asynchronous lifecycle before putting it behind a production interface.