happyhorse-1.1-t2v
Modell zur Erstellung kurzer Videos mit Ton anhand einer Textbeschreibung. Geeignet für Szenen, deren Bewegung, Komposition und visueller Stil mit Worten vorgegeben werden.
- Ailoot · Videos
POST /v1/videos/generationshappyhorse-1.1-t2v - Ailoot · Videos
POST /v1/videos/generationshappyhorse-t2v - Ailoot · Videos
POST /v1/videos/generationshappyhorse-t2v-latest
Über das Modell
Diese Beschreibung erläutert die Fähigkeiten des Modells. Die über Ailoot verfügbaren Eingaben, Ausgaben und Optionen sind unten für die ausgewählte Methode aufgeführt.
HappyHorse-1.1-T2V ist ein Modell von Alibaba zur Erstellung kurzer Videoszenen aus Text. Die Beschreibung legt Figuren, Handlungen, Umgebung und visuelle Gestaltung fest; für diesen Modus ist kein Ausgangsbild erforderlich. Das Modell erzeugt das Video und kann dazu passenden Ton generieren.
Der Hersteller hebt das Verständnis des Szeneninhalts, filmische Inszenierung und ausdrucksstarke Bewegung hervor. Der Text kann Atmosphäre, Handlungen einer Figur, das Verhalten von Objekten und physikalische Dynamik bestimmen. So lässt sich eine Szene um das geplante Geschehen aufbauen und anschließend durch Licht, Blickwinkel und Kamerabewegung steuern.
Inszenierung mit Worten
Die Vorgabe ist verpflichtend und kann in jeder Sprache verfasst sein. Sie darf bis zu 5000 nicht chinesische oder 2500 chinesische Zeichen enthalten; überzähliger Text wird verworfen. Handlung, Umgebung und wichtige visuelle Details müssen innerhalb dieses Umfangs beschrieben werden. Diese Art der Inszenierung lässt dem Modell Raum, eine neue Szene zu gestalten, statt ihm einen fertigen ersten Frame vorzugeben.
In diesem Modus ist der Text das wichtigste Steuerungsmaterial. Das konkrete Aussehen einer Figur oder eines Gegenstands lässt sich mit Worten beschreiben; die Möglichkeit, es mit eigenen Bildern vorzugeben, gehört zu einem anderen Modus der Modellfamilie. Das Ergebnis hängt von der gesamten Vorgabe ab. Deshalb hilft derselbe Zufalls-Seed, ähnliche Varianten zu erzeugen, garantiert aber keine exakte Wiederholung.
Video und Tonspur
Bei HappyHorse-1.1 wird die Videodauer als ganze Zahl von 3 bis 15 Sekunden gewählt. Unterstützt werden die Auflösungen 480P, 720P und 1080P. Die fertige Datei ist ein MP4 mit 24 Frames pro Sekunde. Das Modell kann Ton gemeinsam mit dem Bild erzeugen und die Tonspur mit dem Geschehen in der Szene verbinden.
Die Form des Bildes kann vorab festgelegt werden. Verfügbar sind 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21 und 21:9 — vom breiten filmischen Bild bis zum langgezogenen vertikalen Clip. Auflösung, Format und Dauer bestimmen die Abmessungen des Ergebnisses; Inhalt und Bewegung werden durch den Text vorgegeben.
Diese Variante dient dazu, aus einer sprachlich formulierten Idee eine neue Szene zu erstellen. Sie eignet sich für eine kurze Episode, eine visuelle Idee oder einen stimmungsvollen Clip, dessen Inszenierung als Text beschrieben werden soll.
Ailoot · Videos POST /v1/videos/generations happyhorse-1.1-t2v
happyhorse-1.1-t2vhappyhorse-1.1-t2vhappyhorse-t2vhappyhorse-t2v-latest
Einstieg
Modell zur Erstellung kurzer Videos mit Ton anhand einer Textbeschreibung. Geeignet für Szenen, deren Bewegung, Komposition und visueller Stil mit Worten vorgegeben werden.
- Zulässige Eingaben
- Text
- Ergebnisse
- Video
In Ailoot verfügbar · Eingaben und Methoden
Ailoot · Videos POST /v1/videos/generations
- Eingabe
text- Ausgabe
video- Ausgabeformat
- mp4
| Feld | Typ | Anforderung | Werte und Limits | Standard |
|---|---|---|---|---|
Feldmodel | Typstring | AnforderungErforderlich | Werte und Limits happyhorse-1.1-t2v | Standard— |
Feldprompt | Typstring | AnforderungErforderlich | Werte und Limits Mindestlänge: 1 | Standard— |
Feldduration | Typinteger | AnforderungOptional | Werte und Limits Minimum: 3 Maximum: 15 Einheit: Sekunden | Standard5 |
Feldresolution | Typstring | AnforderungOptional | Werte und Limits 480P, 720P, 1080P | Standard720P |
Feldratio | Typstring | AnforderungOptional | Werte und Limits 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9 | Standard16:9 |
Feldimage_urls | Typhttps_url|data_image_url[] | AnforderungOptional | Werte und Limits Mindestanzahl Elemente: 0 Maximale Anzahl Elemente: 0 Maximale Anzahl dekodierter Bytes: 20 971 520 MIME-Typen: image/jpeg, image/png, image/webp | Standard— |
Kombinationen von Eingabematerialien
Text zu Video · Erforderlich: prompt
Methodenparameter und Lebenszyklus
| Parameter | Vertrag |
|---|---|
Parametercontent_type | Vertragapplication/json |
Parameterrequired | Vertragmodel, prompt |
Parametermaterial_types | Vertragtext |
Parameteroptional | Vertragduration, resolution, ratio |
Parameterduration_integer_range | Vertrag3, 15 |
Parameterdefault_duration | Vertrag5 |
Parameterresolution | Vertrag480P, 720P, 1080P |
Parameterdefault_resolution | Vertrag720P |
Parameterratio | Vertrag16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9 |
Parameterratio_must_omit | Vertragfalse |
Parameterimage_urls | Vertrag{"max_count":0} |
Lebenszyklus: submit_once_poll_original
GET /v1/videos/{request_id}
GET /v1/videos/generations/{request_id}
GET /v1/videos/{request_id}/content
GET /v1/videos/generations/{request_id}/content
Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.
Tarife
Ailoot-Methodentarife
POST /v1/videos/generations- Ausgabe
- $ 0,18 pro Sekunde bei 1080p
- Ausgabe
- $ 0,07 pro Sekunde bei 480p
- Ausgabe
- $ 0,14 pro Sekunde bei 720p
Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. So funktionieren Reservierung und Abrechnung →
Beispielanfragen
Ailoot · Videos
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 scene brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-1.1-t2v", "prompt": "", "duration": 5, "resolution": "720P", "ratio": "16:9"}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
Ergebnisse abrufen und speichern
Ailoot · Videos
mp4
GET /v1/videos/{request_id}GET /v1/videos/generations/{request_id}GET /v1/videos/{request_id}/contentGET /v1/videos/generations/{request_id}/content
Auftragsstatus prüfen
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
for x in r.get("data",[]):print(x)
PY_STATUS
Alle fertiggestellten Dateien speichern
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
u=urljoin("https://api.ailoot.ai",x)
z=urlsplit(u)
if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
curl --fail-with-body --silent --show-error "$asset_url" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
index=$((index + 1))
done < asset-urls.txt
Abrufe anderer Inhalte
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
Alle fertiggestellten Ergebnisse aufbewahren
Speichern Sie jedes fertiggestellte Video oder jede zurückgegebene Datei; rufen Sie jede tatsächlich zurückgegebene Datei-URL ab.
Bewahren Sie jedes zurückgegebene Datenelement/jeden Ausgabeindex auf. content_url bezeichnet nur die erste Ausgabe; rufen Sie jeden tatsächlichen Inhaltspfad/jedes Asset ab. GET content ohne index liefert nicht sämtliche Ausgaben.
Wenn die ursprüngliche Antwort geprüft werden muss
Lesen Sie den vorhandenen ursprünglichen Auftrag; übermitteln Sie eine Anfrage mit unbekanntem Übermittlungsergebnis niemals erneut.
Antwortfelder
| Feld | Typ |
|---|---|
Feldid | Typstring |
Feldobject | Typstring |
Feldmodel | Typstring |
Feldstatus | Typstring |
Feldcontent_url | Typsigned URL |
Felddata[] | Typsigned URL |
Feldusage | Typobject |
Feldresult_pending_check | Typboolean |
Fehler und nächste Schritte
| Antwort | Bedingung | Nächster Schritt |
|---|---|---|
Antwort400 · invalid_request_error | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |
Antwort409 · video_not_ready | BedingungDer ursprüngliche Ergebnisinhalt ist noch nicht verfügbar | Nächster SchrittFragen Sie die ursprünglich zurückgegebene ID regelmäßig ab und beachten Sie Retry-After. |
Antwortserver_error | BedingungDie zurückgegebene Antwort gibt an, dass der Vorgang oder das Ergebnis eine Prüfung erfordert | Nächster SchrittDie ursprünglich zurückgegebene Vorgangs-/Aufgaben-ID, die Anfrageheader und die Antwort aufbewahren; mit unterstützten Leseaufrufen für diesen ursprünglichen Vorgang fortfahren. Die Erstellungsanfrage nicht erneut senden. |
Aliasnamen
Modellaliasnamen
Ailoot happyhorse-1.1-t2v, happyhorse-t2v, happyhorse-t2v-latest
Aliasnamen für Methodenpfade
Verwenden Sie die oben angezeigten Methodenpfade.
Zugehörige Aufrufer-IDs
Ailoot · Videos POST /v1/videos/generations happyhorse-t2v
happyhorse-t2vhappyhorse-1.1-t2vhappyhorse-t2vhappyhorse-t2v-latest
Einstieg
Modell zur Erstellung kurzer Videos mit Ton anhand einer Textbeschreibung. Geeignet für Szenen, deren Bewegung, Komposition und visueller Stil mit Worten vorgegeben werden.
- Zulässige Eingaben
- Text
- Ergebnisse
- Video
In Ailoot verfügbar · Eingaben und Methoden
Ailoot · Videos POST /v1/videos/generations
- Eingabe
text- Ausgabe
video- Ausgabeformat
- mp4
| Feld | Typ | Anforderung | Werte und Limits | Standard |
|---|---|---|---|---|
Feldmodel | Typstring | AnforderungErforderlich | Werte und Limits happyhorse-t2v | Standard— |
Feldprompt | Typstring | AnforderungErforderlich | Werte und Limits Mindestlänge: 1 | Standard— |
Feldduration | Typinteger | AnforderungOptional | Werte und Limits Minimum: 3 Maximum: 15 Einheit: Sekunden | Standard5 |
Feldresolution | Typstring | AnforderungOptional | Werte und Limits 480P, 720P, 1080P | Standard720P |
Feldratio | Typstring | AnforderungOptional | Werte und Limits 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9 | Standard16:9 |
Feldimage_urls | Typhttps_url|data_image_url[] | AnforderungOptional | Werte und Limits Mindestanzahl Elemente: 0 Maximale Anzahl Elemente: 0 Maximale Anzahl dekodierter Bytes: 20 971 520 MIME-Typen: image/jpeg, image/png, image/webp | Standard— |
Kombinationen von Eingabematerialien
Text zu Video · Erforderlich: prompt
Methodenparameter und Lebenszyklus
| Parameter | Vertrag |
|---|---|
Parametermaterial_types | Vertragtext |
Parameterrequired | Vertragnull |
Parameteroptional_controls | Vertragnull |
Lebenszyklus: submit_once_poll_original
GET /v1/videos/{request_id}
GET /v1/videos/generations/{request_id}
GET /v1/videos/{request_id}/content
GET /v1/videos/generations/{request_id}/content
Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.
Tarife
Ailoot-Methodentarife
POST /v1/videos/generations- Ausgabe
- $ 0,18 pro Sekunde bei 1080p
- Ausgabe
- $ 0,07 pro Sekunde bei 480p
- Ausgabe
- $ 0,14 pro Sekunde bei 720p
Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. So funktionieren Reservierung und Abrechnung →
Beispielanfragen
Ailoot · Videos
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 scene brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-t2v", "prompt": "", "duration": 5, "resolution": "720P", "ratio": "16:9"}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
Ergebnisse abrufen und speichern
Ailoot · Videos
mp4
GET /v1/videos/{request_id}GET /v1/videos/generations/{request_id}GET /v1/videos/{request_id}/contentGET /v1/videos/generations/{request_id}/content
Auftragsstatus prüfen
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
for x in r.get("data",[]):print(x)
PY_STATUS
Alle fertiggestellten Dateien speichern
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
u=urljoin("https://api.ailoot.ai",x)
z=urlsplit(u)
if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
curl --fail-with-body --silent --show-error "$asset_url" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
index=$((index + 1))
done < asset-urls.txt
Abrufe anderer Inhalte
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
Alle fertiggestellten Ergebnisse aufbewahren
Speichern Sie jedes fertiggestellte Video oder jede zurückgegebene Datei; rufen Sie jede tatsächlich zurückgegebene Datei-URL ab.
Bewahren Sie jedes zurückgegebene Datenelement/jeden Ausgabeindex auf. content_url bezeichnet nur die erste Ausgabe; rufen Sie jeden tatsächlichen Inhaltspfad/jedes Asset ab. GET content ohne index liefert nicht sämtliche Ausgaben.
Wenn die ursprüngliche Antwort geprüft werden muss
Lesen Sie den vorhandenen ursprünglichen Auftrag; übermitteln Sie eine Anfrage mit unbekanntem Übermittlungsergebnis niemals erneut.
Antwortfelder
| Feld | Typ |
|---|---|
Feldid | Typstring |
Feldobject | Typstring |
Feldmodel | Typstring |
Feldstatus | Typstring |
Feldcontent_url | Typsigned URL |
Felddata[] | Typsigned URL |
Feldusage | Typobject |
Feldresult_pending_check | Typboolean |
Fehler und nächste Schritte
| Antwort | Bedingung | Nächster Schritt |
|---|---|---|
Antwort400 · invalid_request_error | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |
Antwort409 · video_not_ready | BedingungDer ursprüngliche Ergebnisinhalt ist noch nicht verfügbar | Nächster SchrittFragen Sie die ursprünglich zurückgegebene ID regelmäßig ab und beachten Sie Retry-After. |
Antwortserver_error | BedingungDie zurückgegebene Antwort gibt an, dass der Vorgang oder das Ergebnis eine Prüfung erfordert | Nächster SchrittDie ursprünglich zurückgegebene Vorgangs-/Aufgaben-ID, die Anfrageheader und die Antwort aufbewahren; mit unterstützten Leseaufrufen für diesen ursprünglichen Vorgang fortfahren. Die Erstellungsanfrage nicht erneut senden. |
Aliasnamen
Modellaliasnamen
Ailoot happyhorse-1.1-t2v, happyhorse-t2v, happyhorse-t2v-latest
Aliasnamen für Methodenpfade
Verwenden Sie die oben angezeigten Methodenpfade.
Zugehörige Aufrufer-IDs
Ailoot · Videos POST /v1/videos/generations happyhorse-t2v-latest
happyhorse-t2v-latesthappyhorse-1.1-t2vhappyhorse-t2vhappyhorse-t2v-latest
Einstieg
Modell zur Erstellung kurzer Videos mit Ton anhand einer Textbeschreibung. Geeignet für Szenen, deren Bewegung, Komposition und visueller Stil mit Worten vorgegeben werden.
- Zulässige Eingaben
- Text
- Ergebnisse
- Video
In Ailoot verfügbar · Eingaben und Methoden
Ailoot · Videos POST /v1/videos/generations
- Eingabe
text- Ausgabe
video- Ausgabeformat
- mp4
| Feld | Typ | Anforderung | Werte und Limits | Standard |
|---|---|---|---|---|
Feldmodel | Typstring | AnforderungErforderlich | Werte und Limits happyhorse-t2v-latest | Standard— |
Feldprompt | Typstring | AnforderungErforderlich | Werte und Limits Mindestlänge: 1 | Standard— |
Feldduration | Typinteger | AnforderungOptional | Werte und Limits Minimum: 3 Maximum: 15 Einheit: Sekunden | Standard5 |
Feldresolution | Typstring | AnforderungOptional | Werte und Limits 480P, 720P, 1080P | Standard720P |
Feldratio | Typstring | AnforderungOptional | Werte und Limits 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9 | Standard16:9 |
Feldimage_urls | Typhttps_url|data_image_url[] | AnforderungOptional | Werte und Limits Mindestanzahl Elemente: 0 Maximale Anzahl Elemente: 0 Maximale Anzahl dekodierter Bytes: 20 971 520 MIME-Typen: image/jpeg, image/png, image/webp | Standard— |
Kombinationen von Eingabematerialien
Text zu Video · Erforderlich: prompt
Methodenparameter und Lebenszyklus
| Parameter | Vertrag |
|---|---|
Parametermaterial_types | Vertragtext |
Parameterrequired | Vertragnull |
Parameteroptional_controls | Vertragnull |
Lebenszyklus: submit_once_poll_original
GET /v1/videos/{request_id}
GET /v1/videos/generations/{request_id}
GET /v1/videos/{request_id}/content
GET /v1/videos/generations/{request_id}/content
Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.
Tarife
Ailoot-Methodentarife
POST /v1/videos/generations- Ausgabe
- $ 0,18 pro Sekunde bei 1080p
- Ausgabe
- $ 0,07 pro Sekunde bei 480p
- Ausgabe
- $ 0,14 pro Sekunde bei 720p
Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. So funktionieren Reservierung und Abrechnung →
Beispielanfragen
Ailoot · Videos
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 scene brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-t2v-latest", "prompt": "", "duration": 5, "resolution": "720P", "ratio": "16:9"}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
Ergebnisse abrufen und speichern
Ailoot · Videos
mp4
GET /v1/videos/{request_id}GET /v1/videos/generations/{request_id}GET /v1/videos/{request_id}/contentGET /v1/videos/generations/{request_id}/content
Auftragsstatus prüfen
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
for x in r.get("data",[]):print(x)
PY_STATUS
Alle fertiggestellten Dateien speichern
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
u=urljoin("https://api.ailoot.ai",x)
z=urlsplit(u)
if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
curl --fail-with-body --silent --show-error "$asset_url" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
index=$((index + 1))
done < asset-urls.txt
Abrufe anderer Inhalte
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
-H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
Alle fertiggestellten Ergebnisse aufbewahren
Speichern Sie jedes fertiggestellte Video oder jede zurückgegebene Datei; rufen Sie jede tatsächlich zurückgegebene Datei-URL ab.
Bewahren Sie jedes zurückgegebene Datenelement/jeden Ausgabeindex auf. content_url bezeichnet nur die erste Ausgabe; rufen Sie jeden tatsächlichen Inhaltspfad/jedes Asset ab. GET content ohne index liefert nicht sämtliche Ausgaben.
Wenn die ursprüngliche Antwort geprüft werden muss
Lesen Sie den vorhandenen ursprünglichen Auftrag; übermitteln Sie eine Anfrage mit unbekanntem Übermittlungsergebnis niemals erneut.
Antwortfelder
| Feld | Typ |
|---|---|
Feldid | Typstring |
Feldobject | Typstring |
Feldmodel | Typstring |
Feldstatus | Typstring |
Feldcontent_url | Typsigned URL |
Felddata[] | Typsigned URL |
Feldusage | Typobject |
Feldresult_pending_check | Typboolean |
Fehler und nächste Schritte
| Antwort | Bedingung | Nächster Schritt |
|---|---|---|
Antwort400 · invalid_request_error | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |
Antwort409 · video_not_ready | BedingungDer ursprüngliche Ergebnisinhalt ist noch nicht verfügbar | Nächster SchrittFragen Sie die ursprünglich zurückgegebene ID regelmäßig ab und beachten Sie Retry-After. |
Antwortserver_error | BedingungDie zurückgegebene Antwort gibt an, dass der Vorgang oder das Ergebnis eine Prüfung erfordert | Nächster SchrittDie ursprünglich zurückgegebene Vorgangs-/Aufgaben-ID, die Anfrageheader und die Antwort aufbewahren; mit unterstützten Leseaufrufen für diesen ursprünglichen Vorgang fortfahren. Die Erstellungsanfrage nicht erneut senden. |
Aliasnamen
Modellaliasnamen
Ailoot happyhorse-1.1-t2v, happyhorse-t2v, happyhorse-t2v-latest
Aliasnamen für Methodenpfade
Verwenden Sie die oben angezeigten Methodenpfade.
Zugehörige Aufrufer-IDs
FAQ · happyhorse-1.1-t2v
- Welche Eingaben und Ergebnisse sind verfügbar?
POST /v1/videos/generations·happyhorse-1.1-t2v:text→videoPOST /v1/videos/generations·happyhorse-t2v:text→videoPOST /v1/videos/generations·happyhorse-t2v-latest:text→video- Welche Felder verwendet die Anfrage?
POST /v1/videos/generations·happyhorse-1.1-t2v:model,prompt,duration,resolution,ratio,image_urlsPOST /v1/videos/generations·happyhorse-t2v:model,prompt,duration,resolution,ratio,image_urlsPOST /v1/videos/generations·happyhorse-t2v-latest:model,prompt,duration,resolution,ratio,image_urls- Welche Grenzen gelten?
POST /v1/videos/generations·happyhorse-1.1-t2v:duration.minimum:3;duration.maximum:15POST /v1/videos/generations·happyhorse-t2v:duration.minimum:3;duration.maximum:15POST /v1/videos/generations·happyhorse-t2v-latest:duration.minimum:3;duration.maximum:15