Op den Inhalt sprangen

FFmpeg API Compose

Integréieren

Modell-ID ffmpeg-api/compose
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ffmpeg-api/compose?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tracks": [
      {
        "id": "your-id",
        "type": "example",
        "keyframes": [
          {
            "timestamp": 1,
            "duration": 1,
            "url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
          }
        ]
      }
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Dës Ufro: ≈0,001 $ 1 API-Kredit Op dëser Säit ausféieren

API-Schlëssel kréien
Utility Video zu Video #ffmpeg

Féiert verschidde Spueren zu engem Video zesummen, mat genee enger visueller Spur plus enger beliebeger Zuel Audio-Spuren

Utility · Donnéeën (JSON)

Äin éischt Resultat kënnt hei hin

Baut hei drënner eng Ufro a féiert se mat Ärem API-Schlëssel aus. Output gëtt an eis Späicherung kopéiert, fir ëmmer oder 7 Deeg gratis gespäichert.

Eng Ufro erstellen

D'Kontrolle ginn aus dem Modellschema generéiert. De Code an de Präis aktualiséiere sech, wann s du se ännerst.

•obligatoresch

Track-Lëscht fir d'Zesummesetze vum definitiivne Medium, bestehend aus genee engem Video- oder Bildtrack plus enger onbegrenzter Zuel vun Audiotracks.

POST /run/ffmpeg-api/compose?wait=20 Präis → 0,001 $
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ffmpeg-api/compose?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tracks": [
      {
        "id": "your-id",
        "type": "example",
        "keyframes": [
          {
            "timestamp": 1,
            "duration": 1,
            "url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
          }
        ]
      }
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Dës Ufro ausféieren

Äre Schlëssel bleift an dësem Browser: e gëtt nëmmen un d'Doitong API geschéckt an nëmme gespäichert (localStorage), wann s du „Erënneren“ aktivéiers. En API-Schlëssel kréien

Iwwer FFmpeg API Compose

Erstellt e finale Video aus enger Lëscht vu `tracks`. D'Lëscht muss genee eng visuell Spur enthalen, entweder e Video oder e Bild, a kann eng beliebeg Zuel Audio-Spuren enthalen. D'Ausgab ass JSON mat `video_url` an `thumbnail_url`.

Parameteren

NummTyp StandardErlaabt Beschreiwung
tracksobligatoresch
Typobject[]
Track-Lëscht fir d'Zesummesetze vum definitiivne Medium, bestehend aus genee engem Video- oder Bildtrack plus enger onbegrenzter Zuel vun Audiotracks.
tracks[].idobligatoresch
Typstring
Identifikator, deen den Track eendeiteg identifizéiert.
tracks[].typeobligatoresch
Typstring
Track-Kategorie: 'video', 'audio' oder 'image'.
tracks[].keyframesobligatoresch
Typobject[]
Keyframes, déi den Track ausmaachen, als Lëscht geliwwert.
tracks[].keyframes[].timestampobligatoresch
Typnumber
Startzäit vum Keyframe, a Millisekonnen uginn.
tracks[].keyframes[].durationobligatoresch
Typnumber
Längt vum Keyframe, a Millisekonnen uginn.
tracks[].keyframes[].urlobligatoresch
Typstring
URL, déi Zougang zu der Medium-Datei fir dëse Keyframe gëtt.
obligatoresch

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ffmpeg-api/compose",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "tracks": [
      {
        "id": "your-id",
        "type": "example",
        "keyframes": [
          {
            "timestamp": 1,
            "duration": 1,
            "url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
          }
        ]
      }
    ]
  },
  "output": {
    "video_url": "string",
    "thumbnail_url": "string"
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Är Fichieren, Är WielAll outputs[].url ass eng Kopie an eiser Späicherung: fir ëmmer gespäichert (bezuelbar pro GB-Mount) oder 7 Deeg gratis, jee no Ärer Kontastellung oder ?storage=.
D'selwecht Struktur bei all Modelltype, url, content_type, width, height an duration, fir Biller, Video an Audio gläichermoossen. output ass dem Modell säin eegent Resultatobjet.
Output-Felder
video_url
string (video URL)URL op de veraarbechte Video.
thumbnail_url
stringURL op d'Miniatur vum Video.

Méi Modeller: Video zu Video

Fir AI-Agenten: dës Säit als Markdown ass ënner https://doitong.com/lb/developers/models/ffmpeg-api/compose.md. All Modeller a Guiden: https://doitong.com/developers/llms.txt