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

Workflow Utilities Trim Video

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

ਮਾਡਲ id workflow-utilities/trim-video
# 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/workflow-utilities/trim-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }'

# 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"

ਹਰ ਰਨ ਲਈ $3.60 ਤੱਕ ਅਸਲ ਵਰਤੋਂ ਅਨੁਸਾਰ ਚਾਰਜ ਕੀਤਾ ਜਾਂਦਾ ਹੈ, ਬਾਕੀ ਦੀ ਰਕਮ ਵਾਪਸੀ ਹੁੰਦੀ ਹੈ ਇਸ ਪੰਨੇ ’ਤੇ ਚਲਾਓ

API ਕੁੰਜੀ ਲਵੋ
Utility · ਵੀਡੀਓ

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

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

ਰਿਕਵੈਸਟ ਬਣਾਓ

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

•ਲੋੜੀਂਦਾ video_url
ਫ਼ਾਈਲ ਛੱਡੋ, ਜਾਂ

ਟ੍ਰਿਮ ਕਰਨ ਲਈ ਵੀਡੀਓ ਫ਼ਾਈਲ URL।

ਡਿਫ਼ਾਲਟ 2

`start_time` ਤੋਂ ਮਾਪੀ ਗਈ ਕਲਿੱਪ ਦੀ ਲੰਬਾਈ, ਸਕਿੰਟਾਂ ਵਿੱਚ; ਜੇ `end_time` ਦਿੱਤਾ ਗਿਆ ਹੋਵੇ ਤਾਂ ਉਸਨੂੰ ਤਰਜੀਹ ਮਿਲਦੀ ਹੈ ਅਤੇ ਇਸ ਮੁੱਲ ਨੂੰ ਨਜ਼ਰਅੰਦਾਜ਼ ਕੀਤਾ ਜਾਂਦਾ ਹੈ।

ਉੱਨਤ start_time · end_time
ਡਿਫ਼ਾਲਟ 1

ਸ਼ੁਰੂਆਤੀ ਟਾਈਮਸਟੈਂਪ, ਸਕਿੰਟਾਂ ਵਿੱਚ।

ਅੰਤਿਮ ਟਾਈਮਸਟੈਂਪ, ਸਕਿੰਟਾਂ ਵਿੱਚ। ਨਾ ਦਿੱਤੇ ਜਾਣ 'ਤੇ ਇਸ ਦੀ ਥਾਂ ਮਿਆਦ ਵਰਤੀ ਜਾਂਦੀ ਹੈ।

POST /run/workflow-utilities/trim-video?wait=20 ਕੋਟ → $3.60
# 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/workflow-utilities/trim-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }'

# 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 ਕੁੰਜੀ ਪ੍ਰਾਪਤ ਕਰੋ

Workflow Utilities Trim Video ਬਾਰੇ

ਵੀਡੀਓ ਨੂੰ `start_time` ਸਕਿੰਟ ਤੋਂ ਸ਼ੁਰੂ ਹੋਣ ਵਾਲੇ ਭਾਗ ਤੱਕ ਟ੍ਰਿਮ ਕਰਦਾ ਹੈ। `end_time` ਜਾਂ ਸ਼ੁਰੂਆਤ ਤੋਂ `duration` ਦਿਓ; ਜਦੋਂ ਅੰਤ ਦਾ ਸਮਾਂ ਸੈੱਟ ਹੋਵੇ ਤਾਂ `duration` ਨੂੰ ਅਣਡਿੱਠਾ ਕੀਤਾ ਜਾਂਦਾ ਹੈ। ਮੂਲ ਅਤੇ ਟ੍ਰਿਮ ਕੀਤੀ ਮਿਆਦਾਂ ਸਮੇਤ ਟ੍ਰਿਮ ਕੀਤੀ ਵੀਡੀਓ ਵਾਪਸ ਕਰਦਾ ਹੈ।

ਪੈਰਾਮੀਟਰ

ਕੈਨੋਨਿਕਲ ਨਾਮ ਜਾਂ ਨੇਟਿਵ ਨਾਮ ਵਿੱਚੋਂ ਕੋਈ ਇੱਕ ਭੇਜੋ, ਦੋਵੇਂ ਨਹੀਂ। ਕੈਨੋਨਿਕਲ ਨਾਮ

ਨਾਮਕਿਸਮ ਡਿਫ਼ਾਲਟਮਨਜ਼ੂਰਸ਼ੁਦਾ ਵੇਰਵਾ
video_urlਲੋੜੀਂਦਾ video
ਕਿਸਮurl · video
ਟ੍ਰਿਮ ਕਰਨ ਲਈ ਵੀਡੀਓ ਫ਼ਾਈਲ URL।
start_timeਵਿਕਲਪਿਕ
ਕਿਸਮnumber
ਡਿਫ਼ਾਲਟ1
≥ 0
ਸ਼ੁਰੂਆਤੀ ਟਾਈਮਸਟੈਂਪ, ਸਕਿੰਟਾਂ ਵਿੱਚ।
end_timeਵਿਕਲਪਿਕ
ਕਿਸਮnumber | null
ਅੰਤਿਮ ਟਾਈਮਸਟੈਂਪ, ਸਕਿੰਟਾਂ ਵਿੱਚ। ਨਾ ਦਿੱਤੇ ਜਾਣ 'ਤੇ ਇਸ ਦੀ ਥਾਂ ਮਿਆਦ ਵਰਤੀ ਜਾਂਦੀ ਹੈ।
durationਵਿਕਲਪਿਕ
ਕਿਸਮnumber | null
ਡਿਫ਼ਾਲਟ2
> 0
`start_time` ਤੋਂ ਮਾਪੀ ਗਈ ਕਲਿੱਪ ਦੀ ਲੰਬਾਈ, ਸਕਿੰਟਾਂ ਵਿੱਚ; ਜੇ `end_time` ਦਿੱਤਾ ਗਿਆ ਹੋਵੇ ਤਾਂ ਉਸਨੂੰ ਤਰਜੀਹ ਮਿਲਦੀ ਹੈ ਅਤੇ ਇਸ ਮੁੱਲ ਨੂੰ ਨਜ਼ਰਅੰਦਾਜ਼ ਕੀਤਾ ਜਾਂਦਾ ਹੈ।
ਲੋੜੀਂਦਾ ਕੈਨੋਨਿਕਲ ਨਾਮ, ਇਹ ਵੀ ਸਵੀਕਾਰਿਆ ਜਾਂਦਾ ਹੈ

ਫ਼ਾਈਲ ਪੈਰਾਮੀਟਰ ਜਨਤਕ https:// URL, 10 MB ਤੱਕ ਦਾ data: URI, ਜਾਂ ਅੱਪਲੋਡ ਦੇ file_url ਨੂੰ ਸਵੀਕਾਰਦੇ ਹਨ। ਫ਼ਾਈਲਾਂ

ਆਉਟਪੁੱਟ

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "workflow-utilities/trim-video",
  "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": 3600,
    "usd": "3.60",
    "charged": 3600,
    "refunded": 0
  },
  "input": {
    "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "original_duration": 5.041667,
    "trimmed_duration": 2
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "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
object {url, content_type, file_name, file_size}ਟ੍ਰਿਮ ਕਰਨ ਤੋਂ ਬਾਅਦ ਦਾ ਵੀਡੀਓ।
original_duration
numberਮੂਲ ਵੀਡੀਓ ਦੀ ਮਿਆਦ, ਸਕਿੰਟਾਂ ਵਿੱਚ।
trimmed_duration
numberਟ੍ਰਿਮ ਕੀਤੇ ਵੀਡੀਓ ਦੀ ਮਿਆਦ, ਸਕਿੰਟਾਂ ਵਿੱਚ।

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

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