ਸਮੱਗਰੀ ਵੱਲ ਜਾਓ

FFmpeg API Compose

ਇੰਟੀਗ੍ਰੇਟ ਕਰੋ

ਮਾਡਲ 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"

ਇਹ ਬੇਨਤੀ: ≈$0.001 1 API ਕ੍ਰੈਡਿਟ ਇਸ ਪੰਨੇ ’ਤੇ ਚਲਾਓ

API ਕੁੰਜੀ ਲਵੋ

ਕਈ ਟ੍ਰੈਕਾਂ ਨੂੰ ਇੱਕ ਵੀਡੀਓ ਵਿੱਚ ਜੋੜਦਾ ਹੈ, ਜਿਸ ਵਿੱਚ ਬਿਲਕੁਲ ਇੱਕ ਵਿਜ਼ੂਅਲ ਟ੍ਰੈਕ ਅਤੇ ਆਡੀਓ ਟ੍ਰੈਕਾਂ ਦੀ ਕੋਈ ਵੀ ਗਿਣਤੀ ਹੁੰਦੀ ਹੈ

Utility · ਡਾਟਾ (JSON)

ਤੁਹਾਡਾ ਪਹਿਲਾ ਨਤੀਜਾ ਇੱਥੇ ਹੋਵੇਗਾ

ਹੇਠਾਂ ਬੇਨਤੀ ਬਣਾਓ ਅਤੇ ਆਪਣੀ API ਕੁੰਜੀ ਨਾਲ ਚਲਾਓ। ਆਉਟਪੁੱਟ ਸਾਡੇ ਸਟੋਰੇਜ ਵਿੱਚ ਕਾਪੀ ਕੀਤੇ ਜਾਂਦੇ ਹਨ ਅਤੇ ਹਮੇਸ਼ਾ ਲਈ ਜਾਂ ਮੁਫ਼ਤ ਵਿੱਚ 7 ਦਿਨ ਤੱਕ ਰੱਖੇ ਜਾਂਦੇ ਹਨ।

ਰਿਕਵੈਸਟ ਬਣਾਓ

ਕੰਟਰੋਲ ਮਾਡਲ ਸਕੀਮਾ ਤੋਂ ਤਿਆਰ ਹੁੰਦੇ ਹਨ। ਤੁਸੀਂ ਬਦਲਾਅ ਕਰਦੇ ਹੀ ਕੋਡ ਅਤੇ ਕੀਮਤ ਅੱਪਡੇਟ ਹੋ ਜਾਂਦੇ ਹਨ।

•ਲੋੜੀਂਦਾ

ਅੰਤਿਮ ਮੀਡੀਆ ਤਿਆਰ ਕਰਨ ਲਈ ਟ੍ਰੈਕਾਂ ਦੀ ਸੂਚੀ, ਜਿਸ ਵਿੱਚ ਬਿਲਕੁਲ ਇੱਕ ਵੀਡੀਓ ਜਾਂ ਚਿੱਤਰ ਟ੍ਰੈਕ ਅਤੇ ਆਡੀਓ ਟ੍ਰੈਕਾਂ ਦੀ ਬੇਅੰਤ ਗਿਣਤੀ ਹੁੰਦੀ ਹੈ।

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

ਇਹ ਬੇਨਤੀ ਚਲਾਓ

ਤੁਹਾਡੀ key ਇਸ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਰਹਿੰਦੀ ਹੈ: ਇਹ ਸਿਰਫ਼ Doitong API ਨੂੰ ਭੇਜੀ ਜਾਂਦੀ ਹੈ ਅਤੇ ਸਿਰਫ਼ ਤਾਂ ਹੀ (localStorage) ਵਿੱਚ ਸੁਰੱਖਿਅਤ ਹੁੰਦੀ ਹੈ ਜੇ ਤੁਸੀਂ Remember ਚੁਣੋ। API ਕੁੰਜੀ ਪ੍ਰਾਪਤ ਕਰੋ

FFmpeg API Compose ਬਾਰੇ

`tracks` ਦੀ ਸੂਚੀ ਤੋਂ ਅੰਤਿਮ ਵੀਡੀਓ ਬਣਾਉਂਦਾ ਹੈ। ਸੂਚੀ ਵਿੱਚ ਬਿਲਕੁਲ ਇੱਕ ਵਿਜ਼ੂਅਲ ਟ੍ਰੈਕ ਹੋਣਾ ਲਾਜ਼ਮੀ ਹੈ, ਜੋ ਵੀਡੀਓ ਜਾਂ ਚਿੱਤਰ ਹੋ ਸਕਦਾ ਹੈ, ਅਤੇ ਇਸ ਵਿੱਚ ਆਡੀਓ ਟ੍ਰੈਕਾਂ ਦੀ ਕੋਈ ਵੀ ਗਿਣਤੀ ਸ਼ਾਮਲ ਕੀਤੀ ਜਾ ਸਕਦੀ ਹੈ। ਆਉਟਪੁੱਟ JSON ਹੁੰਦੀ ਹੈ, ਜਿਸ ਵਿੱਚ `video_url` ਅਤੇ `thumbnail_url` ਹੁੰਦੇ ਹਨ।

ਪੈਰਾਮੀਟਰ

ਨਾਮਕਿਸਮ ਡਿਫ਼ਾਲਟਮਨਜ਼ੂਰਸ਼ੁਦਾ ਵੇਰਵਾ
tracksਲੋੜੀਂਦਾ
ਕਿਸਮobject[]
ਅੰਤਿਮ ਮੀਡੀਆ ਤਿਆਰ ਕਰਨ ਲਈ ਟ੍ਰੈਕਾਂ ਦੀ ਸੂਚੀ, ਜਿਸ ਵਿੱਚ ਬਿਲਕੁਲ ਇੱਕ ਵੀਡੀਓ ਜਾਂ ਚਿੱਤਰ ਟ੍ਰੈਕ ਅਤੇ ਆਡੀਓ ਟ੍ਰੈਕਾਂ ਦੀ ਬੇਅੰਤ ਗਿਣਤੀ ਹੁੰਦੀ ਹੈ।
tracks[].idਲੋੜੀਂਦਾ
ਕਿਸਮstring
ਟ੍ਰੈਕ ਦੀ ਵਿਲੱਖਣ ਪਛਾਣ ਕਰਨ ਵਾਲਾ ਪਛਾਣਕਰਤਾ।
tracks[].typeਲੋੜੀਂਦਾ
ਕਿਸਮstring
ਟ੍ਰੈਕ ਸ਼੍ਰੇਣੀ: 'video', 'audio', ਜਾਂ 'image'।
tracks[].keyframesਲੋੜੀਂਦਾ
ਕਿਸਮobject[]
ਟ੍ਰੈਕ ਨੂੰ ਬਣਾਉਣ ਵਾਲੇ ਕੀਫ੍ਰੇਮ, ਸੂਚੀ ਵਜੋਂ ਦਿੱਤੇ ਗਏ।
tracks[].keyframes[].timestampਲੋੜੀਂਦਾ
ਕਿਸਮnumber
ਕੀਫ੍ਰੇਮ ਦਾ ਸ਼ੁਰੂਆਤੀ ਸਮਾਂ, ਮਿਲੀਸਕਿੰਟਾਂ ਵਿੱਚ।
tracks[].keyframes[].durationਲੋੜੀਂਦਾ
ਕਿਸਮnumber
ਕੀਫ੍ਰੇਮ ਦੀ ਲੰਬਾਈ, ਮਿਲੀਸਕਿੰਟਾਂ ਵਿੱਚ।
tracks[].keyframes[].urlਲੋੜੀਂਦਾ
ਕਿਸਮstring
ਇਸ ਕੀਫ੍ਰੇਮ ਲਈ ਮੀਡੀਆ ਫ਼ਾਈਲ ਤੱਕ ਪਹੁੰਚ ਦੇਣ ਵਾਲਾ URL।
ਲੋੜੀਂਦਾ

ਆਉਟਪੁੱਟ

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"
  }
}
ਤੁਹਾਡੀਆਂ ਫ਼ਾਈਲਾਂ, ਤੁਹਾਡੀ ਚੋਣਹਰ outputs[].url ਸਾਡੇ ਸਟੋਰੇਜ ਵਿੱਚ ਇੱਕ ਕਾਪੀ ਹੈ: ਹਮੇਸ਼ਾ ਲਈ ਰੱਖੀ ਜਾਂਦੀ ਹੈ (ਪ੍ਰਤੀ GB-ਮਹੀਨਾ ਭੁਗਤਾਨ) ਜਾਂ 7 ਦਿਨ ਤੱਕ ਮੁਫ਼ਤ, ਤੁਹਾਡੀ ਖਾਤਾ ਸੈਟਿੰਗ ਜਾਂ ?storage= ਅਨੁਸਾਰ।
ਹਰ ਮਾਡਲ ’ਤੇ ਇੱਕੋ ਜਿਹਾ ਰੂਪਤਸਵੀਰਾਂ, ਵੀਡੀਓ ਅਤੇ ਆਡੀਓ ਸਭ ਲਈ type, url, content_type, width, height ਅਤੇ duration। output ਮਾਡਲ ਦਾ ਆਪਣਾ ਨਤੀਜਾ ਆਬਜੈਕਟ ਹੈ।
ਆਉਟਪੁੱਟ ਦੇ ਫ਼ੀਲਡ
video_url
string (video URL)ਪ੍ਰੋਸੈਸ ਕੀਤੇ ਵੀਡੀਓ ਵੱਲ ਇਸ਼ਾਰਾ ਕਰਨ ਵਾਲਾ URL।
thumbnail_url
stringਵੀਡੀਓ ਦੇ ਥੰਬਨੇਲ ਵੱਲ ਇਸ਼ਾਰਾ ਕਰਨ ਵਾਲਾ URL।

ਹੋਰ ਮਾਡਲ: ਵੀਡੀਓ ਤੋਂ ਵੀਡੀਓ

AI ਏਜੰਟਾਂ ਲਈ: ਇਹ ਪੰਨਾ Markdown ਵਜੋਂ ਇੱਥੇ ਹੈ https://doitong.com/pa/developers/models/ffmpeg-api/compose.md. ਸਾਰੇ ਮਾਡਲ ਅਤੇ ਗਾਈਡ: https://doitong.com/developers/llms.txt