APIMaster.ai

Sora 2 Video-Generierungs-API

Rufen Sie sora-2 und sora-2-pro auf APIMaster.ai für Text-zu-Video und Bild-zu-Video auf. Abruf und Downloads verwenden APIMaster-URLs.

Sora 2 Video-Generierung

Generieren Sie Videos mit Sora 2 über APIMaster. Unterstützte Modelle: sora-2, sora-2-pro. Der Name sora wird auf sora-2 abgebildet.

Basis-URL: https://apimaster.ai/v1 ist https://apimaster.ai/v1. Verwenden Sie https://apimaster.ai/v1/videos/... — fügen Sie kein weiteres /v1 hinzu.

Preise (20 % Rabatt auf offizielle Preise, pro Sekunde)

Die Abrechnung erfolgt nach Dauer (Sekunden) × Preis pro Sekunde.

Modell Auflösung Offiziell APIMaster
sora-2 720p $0.10 / sec $0.08 / sec
sora-2-pro 720p $0.30 / sec $0.24 / sec
sora-2-pro 1024p $0.50 / sec $0.40 / sec
sora-2-pro 1080p $0.70 / sec $0.56 / sec

Beispiel: 4 Sekunden sora-2 bei 720p ≈ $0.32 ($0.08 × 4).

Eine Aufgabe einreichen

Zwei Einstiegspunkte — verwenden Sie einen davon.

Option A (empfohlen): natives JSON

POST https://apimaster.ai/v1/videos/generations

Feld Typ Erforderlich Beschreibung
model string ja sora-2 / sora-2-pro (oder sora)
prompt string ja Videobeschreibung
duration integer nein Üblich: 4 / 8 / 12 / 16 / 20, Standard 4
resolution string nein sora-2: 720p; sora-2-pro: auch 1024p / 1080p, Standard 720p
aspect_ratio string nein 16:9 / landscape oder 9:16 / portrait, Standard 16:9
image_urls string[] nein Bild-zu-Video; 1 öffentliche URL empfohlen
curl -s "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "A waterfall forming a rainbow, cinematic",
    "duration": 4,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'

Antwort bei Einreichung

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_xxxxxxxx"
    }
  ]
}

Setzen Sie aspect_ratio explizit für Bild-zu-Video (Hochformat → 9:16). Standard ist 16:9.

Option B: OpenAI-Video-kompatibel

POST https://apimaster.ai/v1/videos (JSON oder Multipart)

Feld Typ Erforderlich Beschreibung
model string ja sora-2 / sora-2-pro (oder sora)
prompt string ja Videobeschreibung
seconds string nein Dauer, z.B. "4"; Ganzzahl duration funktioniert ebenfalls, Standard 4
size string nein Pixelgröße — Auflösung + Ausrichtung (Tabelle unten), Standard 720x1280
images string[] nein Bild-zu-Video; höchstens 1 URL. input_reference (einzeln) funktioniert ebenfalls

size-Werte

Modell Querformat (16:9) Hochformat (9:16)
sora-2 1280x720 (720p) 720x1280 (720p)
sora-2-pro 1280x720 (720p) / 1792x1024 (1024p) 720x1280 (720p) / 1024x1792 (1024p)

Ungültige size (z.B. 1920x1080) gibt 400 invalid_size zurück. Der OpenAI-Pfad hat maximal 1024p; verwenden Sie Option A mit resolution: "1080p" für 1080p.

curl -s "https://apimaster.ai/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "A waterfall forming a rainbow, cinematic",
    "seconds": "4",
    "size": "1280x720"
  }'

Antwort bei Einreichung

{
  "id": "task_xxxxxxxx",
  "object": "video",
  "model": "sora-2",
  "status": "queued"
}

Verwenden Sie task_id / id von einem der Endpunkte für Abruf und Download.

Aufgabenstatus abfragen

GET https://apimaster.ai/v1/videos/{task_id}

curl -s "https://apimaster.ai/v1/videos/task_xxxxxxxx" \
  -H "Authorization: Bearer YOUR_API_KEY"

Beispiel für abgeschlossen:

{
  "id": "task_xxxxxxxx",
  "status": "completed",
  "url": "https://apimaster.ai/v1/videos/task_xxxxxxxx/content"
}

Laden Sie MP4 über https://apimaster.ai/v1/videos/{task_id}/content herunter.

Video herunterladen

curl -L "https://apimaster.ai/v1/videos/task_xxxxxxxx/content" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o output.mp4

Beispiele für Bild-zu-Video

Option A:

curl -s "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "Slow push-in, gentle breeze in the hair",
    "duration": 8,
    "resolution": "720p",
    "aspect_ratio": "9:16",
    "image_urls": ["https://example.com/reference.jpg"]
  }'

Option B (images-Feld):

curl -s "https://apimaster.ai/v1/videos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "Slow push-in, gentle breeze in the hair",
    "seconds": "8",
    "images": ["https://example.com/reference.jpg"]
  }'

Tipps zum Abruf

  • Warten Sie nach dem Einreichen 10–20 Sekunden; rufen Sie dann alle 3–5 Sekunden ab.
  • Übliche Dauer: 1–3 Minuten
  • Speichern Sie die MP4 umgehend nach Abschluss

Fehlercodes

code Bedeutung
400 Ungültige Parameter
401 Ungültiger API-Schlüssel
402 Unzureichendes Guthaben
429 Ratenbegrenzung
500 / 502 Temporärer Fehler, wiederholen

Verwandte Themen