UlazAI API Documentatie
Kling 3.0 video-API
White-label videogeneratie API voor tekst-naar-video, afbeelding-naar-video, start-/eindframebediening, optionele audio en multi-shot storytelling.
Prijs is per seconde. Duur ondersteunt hele seconden vanaf 3 naar
15. U kunt de aanmelding voor Prompt Directory inschakelen om een ββonmiddellijke aanvraag toe te passen
-10 tegoeden korting.
/kling30/api/genereren/
Maak een generatietaak Kling 3.0 aan.
Authenticatie
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Lichaam aanvragen
{
"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
}
Voorbeeld van afbeelding naar video
{
"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"
}
Veldreferentie
snel (tekenreeks, vereist, max. 2500)
generatieModus (vereist): tekst_naar_video of afbeelding_naar_video
afbeeldingUrls (array): vereist voor beeld-naar-video tenzij frame-URL's zijn opgegeven
duurSeconden (vereist): geheel getal 3..15
kwaliteitModus (vereist): standaard of pro
geluid (optioneel, booleaans)
meerdereShots (optioneel, booleaans)
aspectRatio (optioneel): 16:9, 9:16, 1:1 (niet toegestaan ββals start-/eindframe-URL's zijn ingesteld)
startFrameUrl, endFrameUrl (optionele http(s) URL's)
prompt_directory_optin (optioneel, booleaans): onmiddellijke korting toepassen en automatisch delen bij succes
Succes reactie
{
"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"
}
/kling30/api/status/{task_id}/
Haal de taakstatus en uitvoer-URL op wanneer deze voltooid is.
{
"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"
}
Statuswaarden: in behandeling, verwerking, voltooid, mislukt.
Bij mislukking worden de tegoeden automatisch terugbetaald.
/kling30/api/upload/
Upload bron-/begin-/eindframe-afbeeldingen (JPEG/PNG/WebP, max. 10 MB) en ontvang een openbare URL voor generatieverzoeken.
Prijsmatrix (credits per seconde)
Standaard
Niet-audio: 20 / S
Met geluid: 30 / S
Pro
Niet-audio: 27 / S
Met geluid: 40 / S
Curl-voorbeeld
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
}'
Foutcodes
- 400 ongeldige lading
- 401 ongeldige authenticatie
- 402 onvoldoende kredieten
- 429 tarief beperkt
- 500 upstream/provider of interne storing