
Kling v2.5 Turbo Pro Text-to-Video API by Kuaishou
Delivers high-speed text-to-video generation with cinematic motion precision and enhanced temporal stability.
Eingabe
Ausgabe
InaktivJede Ausführung kostet $0.06. Für $10 können Sie ca. 166 Mal ausführen.
Sie können fortfahren mit:
Codebeispiel
import requests
import time
# Step 1: Start video generation
generate_url = "https://api.atlascloud.ai/api/v1/model/generateVideo"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $ATLASCLOUD_API_KEY"
}
data = {
"model": "kwaivgi/kling-v2.5-turbo-pro/text-to-video",
"prompt": "A beautiful sunset over the ocean with gentle waves",
"width": 512,
"height": 512,
"duration": 3,
"fps": 24,
}
generate_response = requests.post(generate_url, headers=headers, json=data)
generate_result = generate_response.json()
prediction_id = generate_result["data"]["id"]
# Step 2: Poll for result
poll_url = f"https://api.atlascloud.ai/api/v1/model/prediction/{prediction_id}"
def check_status():
while True:
response = requests.get(poll_url, headers={"Authorization": "Bearer $ATLASCLOUD_API_KEY"})
result = response.json()
if result["data"]["status"] in ["completed", "succeeded"]:
print("Generated video:", result["data"]["outputs"][0])
return result["data"]["outputs"][0]
elif result["data"]["status"] == "failed":
raise Exception(result["data"]["error"] or "Generation failed")
else:
# Still processing, wait 2 seconds
time.sleep(2)
video_url = check_status()Installieren
Installieren Sie das erforderliche Paket für Ihre Programmiersprache.
pip install requestsAuthentifizierung
Alle API-Anfragen erfordern eine Authentifizierung über einen API-Schlüssel. Sie können Ihren API-Schlüssel über das Atlas Cloud Dashboard erhalten.
export ATLASCLOUD_API_KEY="your-api-key-here"HTTP-Header
import os
API_KEY = os.environ.get("ATLASCLOUD_API_KEY")
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {API_KEY}"
}Geben Sie Ihren API-Schlüssel niemals in clientseitigem Code oder öffentlichen Repositories preis. Verwenden Sie stattdessen Umgebungsvariablen oder einen Backend-Proxy.
Anfrage senden
import requests
url = "https://api.atlascloud.ai/api/v1/model/generateVideo"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $ATLASCLOUD_API_KEY"
}
data = {
"model": "your-model",
"prompt": "A beautiful landscape"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())Anfrage senden
Senden Sie eine asynchrone Generierungsanfrage. Die API gibt eine Vorhersage-ID zurück, mit der Sie den Status prüfen und das Ergebnis abrufen können.
/api/v1/model/generateVideoAnfragekörper
import requests
url = "https://api.atlascloud.ai/api/v1/model/generateVideo"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $ATLASCLOUD_API_KEY"
}
data = {
"model": "kwaivgi/kling-v2.5-turbo-pro/text-to-video",
"input": {
"prompt": "A beautiful sunset over the ocean with gentle waves"
}
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(f"Prediction ID: {result['id']}")
print(f"Status: {result['status']}")Antwort
{
"id": "pred_abc123",
"status": "processing",
"model": "model-name",
"created_at": "2025-01-01T00:00:00Z"
}Status prüfen
Fragen Sie den Vorhersage-Endpunkt ab, um den aktuellen Status Ihrer Anfrage zu überprüfen.
/api/v1/model/prediction/{prediction_id}Abfrage-Beispiel
import requests
import time
prediction_id = "pred_abc123"
url = f"https://api.atlascloud.ai/api/v1/model/prediction/{prediction_id}"
headers = { "Authorization": "Bearer $ATLASCLOUD_API_KEY" }
while True:
response = requests.get(url, headers=headers)
result = response.json()
status = result["data"]["status"]
print(f"Status: {status}")
if status in ["completed", "succeeded"]:
output_url = result["data"]["outputs"][0]
print(f"Output URL: {output_url}")
break
elif status == "failed":
print(f"Error: {result['data'].get('error', 'Unknown')}")
break
time.sleep(3)Statuswerte
processingDie Anfrage wird noch verarbeitet.completedDie Generierung ist abgeschlossen. Ergebnisse sind verfügbar.succeededDie Generierung war erfolgreich. Ergebnisse sind verfügbar.failedDie Generierung ist fehlgeschlagen. Überprüfen Sie das Fehlerfeld.Abgeschlossene Antwort
{
"data": {
"id": "pred_abc123",
"status": "completed",
"outputs": [
"https://storage.atlascloud.ai/outputs/result.mp4"
],
"metrics": {
"predict_time": 45.2
},
"created_at": "2025-01-01T00:00:00Z",
"completed_at": "2025-01-01T00:00:10Z"
}
}Dateien hochladen
Laden Sie Dateien in den Atlas Cloud Speicher hoch und erhalten Sie eine URL, die Sie in Ihren API-Anfragen verwenden können. Verwenden Sie multipart/form-data zum Hochladen.
/api/v1/model/uploadMediaUpload-Beispiel
import requests
url = "https://api.atlascloud.ai/api/v1/model/uploadMedia"
headers = { "Authorization": "Bearer $ATLASCLOUD_API_KEY" }
with open("image.png", "rb") as f:
files = {"file": ("image.png", f, "image/png")}
response = requests.post(url, headers=headers, files=files)
result = response.json()
download_url = result["data"]["download_url"]
print(f"File URL: {download_url}")Antwort
{
"data": {
"download_url": "https://storage.atlascloud.ai/uploads/abc123/image.png",
"file_name": "image.png",
"content_type": "image/png",
"size": 1024000
}
}Eingabe-Schema
Die folgenden Parameter werden im Anfragekörper akzeptiert.
Keine Parameter verfügbar.
Beispiel-Anfragekörper
{
"model": "kwaivgi/kling-v2.5-turbo-pro/text-to-video"
}Ausgabe-Schema
Die API gibt eine Vorhersage-Antwort mit den generierten Ausgabe-URLs zurück.
Beispielantwort
{
"id": "pred_abc123",
"status": "completed",
"model": "model-name",
"outputs": [
"https://storage.atlascloud.ai/outputs/result.mp4"
],
"metrics": {
"predict_time": 45.2
},
"created_at": "2025-01-01T00:00:00Z",
"completed_at": "2025-01-01T00:00:10Z"
}Atlas Cloud Skills
Atlas Cloud Skills integriert über 300 KI-Modelle direkt in Ihren KI-Coding-Assistenten. Ein Befehl zur Installation, dann verwenden Sie natürliche Sprache, um Bilder, Videos zu generieren und mit LLMs zu chatten.
Unterstützte Clients
Installieren
npx skills add AtlasCloudAI/atlas-cloud-skillsAPI-Schlüssel einrichten
Erhalten Sie Ihren API-Schlüssel über das Atlas Cloud Dashboard und setzen Sie ihn als Umgebungsvariable.
export ATLASCLOUD_API_KEY="your-api-key-here"Funktionen
Nach der Installation können Sie natürliche Sprache in Ihrem KI-Assistenten verwenden, um auf alle Atlas Cloud Modelle zuzugreifen.
MCP-Server
Der Atlas Cloud MCP-Server verbindet Ihre IDE mit über 300 KI-Modellen über das Model Context Protocol. Funktioniert mit jedem MCP-kompatiblen Client.
Unterstützte Clients
Installieren
npx -y atlascloud-mcpKonfiguration
Fügen Sie die folgende Konfiguration zur MCP-Einstellungsdatei Ihrer IDE hinzu.
{
"mcpServers": {
"atlascloud": {
"command": "npx",
"args": [
"-y",
"atlascloud-mcp"
],
"env": {
"ATLASCLOUD_API_KEY": "your-api-key-here"
}
}
}
}Verfügbare Werkzeuge
API-Schema
Schema nicht verfügbarAnmelden, um Anfrageverlauf anzuzeigen
Sie müssen angemeldet sein, um auf Ihren Modellanfrageverlauf zuzugreifen.
AnmeldenKling 2.5 Turbo Pro (Text-to-Video)
Kling 2.5 Turbo Pro is an advanced text-to-video model that produces ultra-smooth motion, cinematic visuals, and accurate prompt adherence.
Its improved dynamic processing and text-to-motion control allow for seamless transitions while maintaining style fidelity across various looks.
What makes it different?
-
Enhanced multi-step instruction understanding A new text-and-timing controller processes multi-step prompts to transform static inputs into coherent, controllable narrative scenes.
-
High-motion quality and stability Better training and data balance create realistic dynamics, enabling quick and complex movements with fewer artifacts like jitter, tearing, or frame drops.
-
Faster inference Optimized pipelines reduce end-to-end delay, providing faster delivery of high-quality results without compromising visual fidelity.
-
Consistent style Enhanced style conditioning preserves the reference look (palette, lighting, brushwork, mood), ensuring frames stay consistent - even during dynamic scenes.
Designed for
- Marketing & Brand Teams – Produce style-consistent ads, feature demos, and campaign assets fast.
- Content Creators / YouTubers / Short-form Teams – Improve watch-through with stronger narrative flow and motion.
- Film/Animation Studios – Use for previz, technique exploration, and style studies with reliable dynamic consistency.
- Training & Education – Turn documents into clear, high-resolution explainer videos for scalable distribution.
Pricing
| Duration | Price |
|---|---|
| 5s | $0.35 |
| 10s | $0.70 |
Billing Rules
- Minimum charge: 5 seconds
- Per-second rate = (price per 5 seconds) ÷ 5
- Billed duration = video length in seconds (rounded up), with a 5-second minimum
- Total cost = billed duration × per-second rate (by output resolution)
How to use
-
Write the prompt – Specify subject, scene, actions, camera movement, and style keywords; include multi-step/causal logic if needed.
-
Choose aspect – Match output to your channel and quality targets.
-
Set duration – Help models understand how long of the result.
-
Set guidance_scale – Controls how strongly the model follows your prompt. The higher the value, the less creative freedom the model has.
-
Generate – Leverage accelerated inference to get a first pass quickly.
-
Review & iterate – Refine timing, angles, or style strength and re-render for final delivery (Set the seed).






