UlazAI API Dokumentation

Kling 3.0-Video-API

White-Label-Videogenerierung API für Text-zu-Video, Bild-zu-Video, Start-/End-Frame-Steuerung, optionales Audio und Multi-Shot-Storytelling.

Die Preise gelten pro Sekunde. Die Dauer unterstützt ganze Sekunden ab 3 Zu 15. Sie können das Prompt Directory-Opt-in aktivieren, um eine sofortige Anwendung anzuwenden -10 Credits Rabatt.

POST /kling30/api/generate/

Erstellen Sie eine Kling 3.0-Generierungsaufgabe.

Authentifizierung

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Anforderungstext

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

Bild-zu-Video-Beispiel

{
  "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"
}

Feldreferenz

prompt (Zeichenfolge, erforderlich, max. 2500)

generationMode (erforderlich): text_to_video oder image_to_video

imageUrls (Array): erforderlich für Bild-zu-Video, sofern keine Frame-URLs angegeben sind

DauerSekunden (erforderlich): Ganzzahl 3..15

Qualitätsmodus (erforderlich): std oder Profi

Klang (optional, boolesch)

MultiShots (optional, boolesch)

Aspektverhältnis (optional): 16:9, 9:16, 1:1 (nicht zulässig, wenn Start-/End-Frame-URLs festgelegt sind)

startFrameUrl, endFrameUrl (optionale http(s)-URLs)

prompt_directory_optin (optional, boolesch): Sofortrabatt anwenden und bei Erfolg automatisch teilen

Erfolgsantwort

{
  "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": "60-180 seconds"
}
GET /kling30/api/status/{task_id}/

Rufen Sie nach Abschluss den Aufgabenstatus und die Ausgabe-URL ab.

{
  "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"
}

Statuswerte: ausstehend, Verarbeitung, vollendet, fehlgeschlagen. Bei Nichtbestehen werden die Credits automatisch zurückerstattet.

POST /kling30/api/upload/

Laden Sie Quell-/Start-/End-Frame-Bilder hoch (JPEG/PNG/WebP, max. 10 MB) und erhalten Sie eine öffentliche URL für Generierungsanfragen.

Preismatrix (Credits pro Sekunde)

Standard

Nicht-Audio: 20 / S

Mit Audio: 30 / S

Profi

Nicht-Audio: 27 / S

Mit Audio: 40 / S

cURL-Beispiel

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

Fehlercodes

  • 400 ungültige Nutzlast
  • 401 Ungültige Authentifizierung
  • 402 unzureichende Kredite
  • 429 satzbegrenzt
  • 500 Upstream-/Provider- oder interner Fehler