Skip to content
Developers
API docs / Models

MAKEUGC PLATFORM API · DOCS V2

Kling 4.0 · Text to video

Kling 4.0 · text-to-video

VIDEO OUTPUT

Request

POST /enterprise/generate

Model ID: kling-v4-t2v. Put model inputs inside params; keep model and project_id at the top level. Send webhook_url at the top level when using notifications.

Alias: kling/v4/text-to-video
Unsupported fields are rejected, including seed, cfg_scale, negative_prompt, generate_audio and client prices. Do not send mode, user_id, project_id or model_version in params.
Media accepts public HTTP(S) URLs or matching base64 data URIs. Images: up to 30 MiB, at least 300px on each side. Videos: up to 300 MiB, 700–4553px on each side, 23.9–60.05 FPS. Source/reference videos: 3–30.05 seconds; element videos: 3–8.05 seconds including metadata tolerance. Media aspect ratio must be 0.4–2.5. Actual bytes and video durations are checked before charging.
Generation without video input costs $0.157/s at 720p or $0.235/s at 1080p. Edit and reference generation with video use $0.094/s or $0.141/s and bill max(input seconds + output seconds, 2 × output seconds). Credits = ceil to 0.1(provider USD × 1.5 / 2.50). Current pricing_version: kling-v4-2026-10-27-v2.
Use the server quote: 5s generation is 0.5 credits at 720p or 0.8 at 1080p. Do not halve an old rounded quote. Pricing fields are response-only; never send retail_multiplier, pricing_version or credits in params. Enqueue and status include the saved pricing snapshot; historical jobs retain their original policy.
The initial quote is reserved once. Status returns credits_deducted, credits_charged and credit_adjustment/refund_result. Shorter outputs may receive a partial refund; final charges never exceed the reservation. Failed jobs refund the reservation.
Supply prompt or multi_prompt (or both). Each shot has a 1–512 character prompt and integer duration 1–30 (default 5). Total shot duration must be 3–30 seconds and overrides duration.

Request envelope

Parameter Description
model
string
Required
Exact public model ID from the model catalog.
params
object
Required
Model-specific input fields. See the individual model page for required fields, types, defaults and limits.
project_id
string
Optional
Existing project belonging to your account. Omit to create a project automatically.
webhook_url
string
Optional
Optional callback URL for supported models. Models marked polling-only reject this field. Enterprise Seedance does not forward it. Always keep polling available.

Model parameters

Parameter Description
prompt
string
Optional
Non-blank prompt; required unless multi_prompt is provided for generation.

Allowed: 1–26000 Unicode characters; preserved without truncation

resolution
string
Optional
Output resolution.

Allowed: 720p | 1080p

Default: 1080p

duration
integer
Optional
Output seconds; overridden by the sum of multi_prompt durations.

Allowed: 3–30

Default: 5

multi_prompt
object[]
Optional
Non-empty ordered shots: {prompt, duration}. Total duration 3–30 seconds; no six-shot limit.
aspect_ratio
string
Optional
Output aspect ratio.

Allowed: 16:9 | 9:16 | 1:1 | 21:9

Default: 16:9

Code examples

Set MAKEUGC_API_KEY on your server. Replace example media URLs with files you host and keep accessible during processing.

cURL
curl --fail-with-body --max-time 120 -X POST "https://app.makeugc.ai/api/platform/enterprise/generate" \
  -H "X-Api-Key: $MAKEUGC_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "kling-v4-t2v",
  "params": {
    "prompt": "A slow camera move around a ceramic coffee cup in warm morning light.",
    "resolution": "1080p",
    "duration": 5
  }
}'
JavaScript
// Run on your server with Node.js 20+.
const apiKey = process.env.MAKEUGC_API_KEY;
if (!apiKey) throw new Error("Set MAKEUGC_API_KEY first");

const response = await fetch("https://app.makeugc.ai/api/platform/enterprise/generate", {
  method: "POST",
  headers: {
    "X-Api-Key": apiKey,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "model": "kling-v4-t2v",
  "params": {
    "prompt": "A slow camera move around a ceramic coffee cup in warm morning light.",
    "resolution": "1080p",
    "duration": 5
  }
}),
  signal: AbortSignal.timeout(120000),
});
const text = await response.text();
if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${text} (request ${response.headers.get("x-request-id")})`);
}
const result = JSON.parse(text);
console.log(result);
Python
# Install the requests package before running.
import os
import requests

payload = {
    "model": "kling-v4-t2v",
    "params": {
        "prompt": "A slow camera move around a ceramic coffee cup in warm morning light.",
        "resolution": "1080p",
        "duration": 5
    }
}

response = requests.post(
    "https://app.makeugc.ai/api/platform/enterprise/generate",
    headers={"X-Api-Key": os.environ["MAKEUGC_API_KEY"]},
    json=payload,
    timeout=120,
)
if not response.ok:
    raise RuntimeError(f"HTTP {response.status_code}: {response.text} "
                       f"(request {response.headers.get('x-request-id')})")
print(response.json())

200 · Job accepted

Generation response
{
  "request_id": "request_123",
  "project_id": "project_123",
  "media": "video",
  "model": "kling-v4-t2v",
  "status": "queued",
  "message": "Enterprise API job queued"
}

Retrieve the result

Save request_id, then poll every 5–10 seconds. A successful generation request does not mean the output is ready.

cURL
curl --fail-with-body --max-time 120 -X GET "https://app.makeugc.ai/api/platform/enterprise/status/request_123?media=video" \
  -H "X-Api-Key: $MAKEUGC_API_KEY"
JavaScript
// Run on your server with Node.js 20+.
const apiKey = process.env.MAKEUGC_API_KEY;
if (!apiKey) throw new Error("Set MAKEUGC_API_KEY first");

const response = await fetch("https://app.makeugc.ai/api/platform/enterprise/status/request_123?media=video", {
  method: "GET",
  headers: {
    "X-Api-Key": apiKey,
  },
  signal: AbortSignal.timeout(120000),
});
const text = await response.text();
if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${text} (request ${response.headers.get("x-request-id")})`);
}
const result = JSON.parse(text);
console.log(result);
Python
# Install the requests package before running.
import os
import requests

response = requests.get(
    "https://app.makeugc.ai/api/platform/enterprise/status/request_123?media=video",
    headers={"X-Api-Key": os.environ["MAKEUGC_API_KEY"]},
    timeout=120,
)
if not response.ok:
    raise RuntimeError(f"HTTP {response.status_code}: {response.text} "
                       f"(request {response.headers.get('x-request-id')})")
print(response.json())

200 · Completed

Status response
{
  "request_id": "request_123",
  "media": "video",
  "status": 1,
  "video_url": "https://your-cdn.example/result.mp4",
  "created_at": "2026-10-13T00:00:00.000Z",
  "updated_at": "2026-10-13T00:00:30.000Z"
}

Read status: 0 is processing, 1 is completed and 2 is failed. Video status can also be a string. Output is in video_url . If completed has no output URL yet, continue polling within your timeout. See jobs & webhooks.

Credits & errors

Cost: quoted by resolution, output duration and measured video input. Read returned credit fields when available. See credit units and limits.

Invalid inputs return 400; insufficient credits can return 400 or 402 depending on the generation path. Access restrictions return 403 and temporary model unavailability can return 503. See error handling. Each POST can start a billable job; do not automatically resubmit after a timeout.

Related models

Browse all models →