Neidio i'r cynnwys

FFmpeg API Compose

Integreiddio

ID y model 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"

Y cais hwn: ≈$0.001 1 credyd API Ei redeg ar y dudalen hon

Cael allwedd API
Utility Fideo i Fideo #ffmpeg

Yn cyfuno sawl trac yn un fideo, gydag union un trac gweledol ac unrhyw nifer o draciau sain

Utility · Data (JSON)

Mae eich canlyniad cyntaf yn mynd yma

Adeiladwch gais isod a'i redeg gyda'ch allwedd API. Mae allbynnau'n cael eu copïo i'n storio, wedi'u cadw am byth neu am 7 diwrnod am ddim.

Adeiladu cais

Cynhyrchir rheolyddion o sgema'r model. Mae'r cod a'r pris yn diweddaru wrth i chi eu newid.

•gofynnol

Rhestr traciau ar gyfer cydosod y cyfrwng terfynol, sy'n cynnwys union un trac fideo neu ddelwedd ynghyd â nifer anghyfyngedig o draciau sain.

POST /run/ffmpeg-api/compose?wait=20 dyfynbris → $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"

Rhedeg y cais hwn

Mae'ch allwedd yn aros yn y porwr hwn: caiff ei hanfon at Doitong API yn unig a'i chadw (localStorage) dim ond os ticiwch Cofio. Cael allwedd API

Ynglŷn â FFmpeg API Compose

Yn adeiladu fideo terfynol o restr o `tracks`. Rhaid i'r rhestr gynnwys union un trac gweledol, naill ai fideo neu ddelwedd, a gall gynnwys unrhyw nifer o draciau sain. JSON gyda `video_url` a `thumbnail_url` yw'r allbwn.

Paramedrau

EnwMath RhagosodedigCaniateir Disgrifiad
tracksgofynnol
Mathobject[]
Rhestr traciau ar gyfer cydosod y cyfrwng terfynol, sy'n cynnwys union un trac fideo neu ddelwedd ynghyd â nifer anghyfyngedig o draciau sain.
tracks[].idgofynnol
Mathstring
Dynodwr sy'n adnabod y trac yn unigryw.
tracks[].typegofynnol
Mathstring
Categori trac: 'video', 'audio', neu 'image'.
tracks[].keyframesgofynnol
Mathobject[]
Fframiau allweddol sy'n ffurfio'r trac, a ddarperir fel rhestr.
tracks[].keyframes[].timestampgofynnol
Mathnumber
Amser cychwyn y ffrâm allweddol, wedi'i fynegi mewn milieiliadau.
tracks[].keyframes[].durationgofynnol
Mathnumber
Hyd y ffrâm allweddol, wedi'i fynegi mewn milieiliadau.
tracks[].keyframes[].urlgofynnol
Mathstring
URL sy'n darparu mynediad at ffeil y cyfrwng ar gyfer y ffrâm allweddol hon.
gofynnol

Allbwn

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"
  }
}
Eich ffeiliau, eich dewisMae pob outputs[].url yn gopi ar ein storio: wedi'i gadw am byth (telir fesul GB-mis) neu am 7 diwrnod am ddim, yn ôl gosodiad eich cyfrif neu ?storage=.
Yr un siâp ar bob modeltype, url, content_type, width, height a duration, ar gyfer delweddau, fideo a sain fel ei gilydd. Gwrthrych canlyniad y model ei hun yw output.
Meysydd yr allbwn
video_url
string (video URL)URL sy'n pwyntio at y fideo wedi'i brosesu.
thumbnail_url
stringURL sy'n pwyntio at y mân-lun ar gyfer y fideo.

Mwy o fodelau: Fideo i Fideo

Ar gyfer asiantau AI: mae'r dudalen hon fel Markdown ar gael yn https://doitong.com/cy/developers/models/ffmpeg-api/compose.md. Pob model a chanllaw: https://doitong.com/developers/llms.txt