UlazAI API Documentatie
Kling 2.6 Videogeneratie API
Genereer AI-video's van hoge kwaliteit met Kling 2.6 - De meest betaalbare optie voor het genereren van video's met native audio-ondersteuning!
π° Beste waarde: Vanaf slechts 55 credits voor video's van 5 seconden - de goedkoopste optie voor het genereren van video's op UlazAI!
β¨ Kling 2.6 Functies
β Tekst-naar-video generatie
β Afbeelding-naar-video animatie
β 5s of 10s videoduur
β Native audio generatie
β Meerdere beeldverhoudingen (16:9, 9:16, 1:1)
β Snelle verwerking (~60-90 seconden)
β Laagste prijzen vanaf 55 studiepunten
β API sleutelauthenticatie
/kling26/api/genereren/
Kling 2.6 Video genereren
Maak een video met Kling 2.6 - ondersteunt zowel tekst-naar-video- als afbeelding-naar-video-modi.
Vraag headers aan
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Verzoektekst (tekst-naar-video)
{
"prompt": "A dog running through a field of flowers at sunset",
"generationMode": "text_to_video",
"duration": "5",
"aspectRatio": "16:9",
"sound": true
}
Verzoektekst (afbeelding-naar-video)
{
"prompt": "The dog starts running and playing happily",
"generationMode": "image_to_video",
"imageUrls": ["https://example.com/dog.jpg"],
"duration": "5",
"sound": false
}
Parameters
snel * (snaar)
Beschrijving van de video. Maximaal 2000 tekens.
generatieModus * (snaar)
Modus: tekst_naar_video of afbeelding_naar_video
afbeeldingUrls (matrix)
Vereist voor de modus image_to_video. Array met 1 afbeeldings-URL.
duur (snaar)
Videoduur: "5" of "10" seconden. Standaard: "5"
aspectRatio (snaar)
Voor tekst_naar_video: "16:9", "9:16", of "1:1". Standaard: "16:9"
geluid (Booleaans)
Schakel native audiogeneratie in. Verdubbelt de kredietkosten. Standaard: false
prompt_directory_optin (Booleaans) π° -10 KREDIETEN
Deel uw video op onze openbare Prompt Directory en ontvang 10 credits korting! Standaard: true
Succesreactie (201)
{
"success": true,
"data": {
"task_id": "uuid-here",
"status": "processing",
"credits_used": 55,
"credits_remaining": 945,
"estimated_time": "60-90 seconds",
"message": "KLING 2.6 video generation started"
}
}
cURL-voorbeeld
curl -X POST https://ulazai.com/kling26/api/generate/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A dog running through a field at sunset",
"generationMode": "text_to_video",
"duration": "5",
"aspectRatio": "16:9",
"sound": false
}'
/kling26/api/status/{task_id}/
Controleer de generatiestatus
Haal de huidige status en het resultaat op van een generatietaak van Kling 2.6.
Reactie Staten
Voltooid
{
"success": true,
"data": {
"task_id": "uuid-here",
"status": "completed",
"video_url": "https://cdn.ulazai.com/kling/videos/...",
"duration": 5,
"has_audio": true
}
}
Verwerking
{
"success": true,
"data": {
"task_id": "uuid-here",
"status": "processing",
"progress": 45
}
}
cURL-voorbeeld
curl -X GET https://ulazai.com/kling26/api/status/UUID/ \
-H "Authorization: Bearer YOUR_API_KEY"
π° Kling 2.6 Prijzen
Zonder audio
55 studiepunten (5s)
110 studiepunten (10s)
β’ Stille video-uitvoer
β’ Optie met de beste prijs
Met audio
110 studiepunten (5s)
220 studiepunten (10s)
β’ Native audiogeneratie
β’ Geluidseffecten en muziek
π‘ Voor een tip: Kling 2.6 is de goedkoopste optie voor het genereren van video's - ideaal voor het maken van bulkvideo's!
π» Python-voorbeeld
import requests
import time
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://ulazai.com"
# Genereer video
response = requests.post(
f"{BASE_URL}/kling26/api/genereren/",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"prompt": "A dog running through a field at sunset",
"generationMode": "text_to_video",
"duration": "5",
"aspectRatio": "16:9",
"sound": False
}
)
if response.status_code == 201:
task_id = response.json()["data"]["task_id"]
print(f"Generatie gestart: {task_id}")
# Poll voor status
while True:
status_response = requests.get(
f"{BASE_URL}/kling26/api/status/{task_id}/",
headers={"Authorization": f"Bearer {API_KEY}"}
)
status_data = status_response.json()["data"]
if status_data["status"] == "completed":
print(f"Video klaar: {status_data['video_url']}")
break
elif status_data["status"] == "failed":
print("Generatie mislukt")
break
time.sleep(10) # Controleer elke 10 seconden
else:
print(f"Fout: {response.json()}")