Skip to content

UlazAI developer docs

Kling 3.0 API docs for generate, upload, and pricing

Kling 3.0 reference

Kling 3.0 API docs for generate, upload, and pricing

To use the Kling 3.0 API, start here: use POST /kling30/api/generate/ to create jobs, GET /kling30/api/status/{task_id}/ to poll output status, and POST /kling30/api/upload/ for source frames. UlazAI supports text-to-video and image-to-video with optional audio, multi-shots, start and end frame control, and per-second pricing for standard, pro and 4K quality modes.

Core endpoints

POST /kling30/api/generate/

GET /kling30/api/status/{task_id}/

POST /kling30/api/upload/

Current support

3 to 15 second renders

Standard, pro or 4K quality

Audio, multi-shots, and frame control

Pricing is per second. Duration supports whole seconds from 3 to 15. You can enable Prompt Directory opt-in to apply an immediate -10 credits discount.

POST /kling30/api/generate/

Create a Kling 3.0 generation task.

Authentication

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request body

{
  "prompt": "A cinematic tracking shot following a cyclist through a rainy neon city street.",
  "generationMode": "text_to_video",
  "durationSeconds": 8,
  "qualityMode": "4K",
  "sound": true,
  "multiShots": true,
  "aspectRatio": "16:9",
  "prompt_directory_optin": true
}

Image-to-video example

{
  "prompt": "The portrait slowly smiles while camera pushes in.",
  "generationMode": "image_to_video",
  "imageUrls": ["https://example.com/source.jpg"],
  "durationSeconds": 5,
  "qualityMode": "std",
  "sound": false,
  "startFrameUrl": "https://example.com/start.jpg",
  "endFrameUrl": "https://example.com/end.jpg"
}

Field reference

prompt (string, required, max 2500)

generationMode (required): text_to_video or image_to_video

imageUrls (array): required for image-to-video unless frame URLs are provided

durationSeconds (required): integer 3..15

qualityMode (required): std, pro, or 4K

sound (optional, boolean)

multiShots (optional, boolean)

aspectRatio (optional): 16:9, 9:16, 1:1 (not allowed when start/end frame URLs are set)

startFrameUrl, endFrameUrl (optional http(s) URLs)

prompt_directory_optin (optional, boolean): apply immediate discount and auto-share on success

Success response

{
  "success": true,
  "task_id": "7f8cfd64-5b91-4a31-a987-e0ea8fd9d0a1",
  "provider_task_id": "281e5b0...f39b9",
  "status": "processing",
  "credits_used": 310,
  "directory_discount_applied": 10,
  "estimated_time": "varies by queue"
}
GET /kling30/api/status/{task_id}/

Get task status and output URL when complete.

{
  "success": true,
  "task_id": "7f8cfd64-5b91-4a31-a987-e0ea8fd9d0a1",
  "status": "completed",
  "video_url": "https://cdn.example.com/path/output.mp4",
  "credits_charged": 310,
  "prompt_submission_id": "70f4f6a9-2d17-4f31-81ac-8d57eecb9e21"
}

Status values: pending, processing, completed, failed. On failure, credits are refunded automatically.

POST /kling30/api/upload/

Upload source/start/end frame images (JPEG/PNG/WebP, max 10MB) and receive a public URL for generation requests.

Pricing matrix (credits per second)

Standard

No audio: 20 / s

With audio: 30 / s

Pro

No audio: 27 / s

With audio: 40 / s

4K

67 / s

cURL example

curl -X POST https://ulazai.com/kling30/api/generate/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A heroic wide shot of a spaceship entering orbit above Earth.",
    "generationMode": "text_to_video",
    "durationSeconds": 10,
    "qualityMode": "pro",
    "sound": true,
    "multiShots": true,
    "aspectRatio": "16:9",
    "prompt_directory_optin": true
  }'

Error codes

  • 400 invalid payload
  • 401 invalid authentication
  • 402 insufficient credits
  • 429 rate-limited
  • 500 upstream/provider or internal failure

Credits, models and status

Music Studio Songs, instrumentals and your own lyrics.