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

Grok Imagine Reference to Video

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

ਮਾਡਲ id xai/grok-imagine-video/reference-to-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/xai/grok-imagine-video/reference-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

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

ਉਦਾਹਰਨ ਵਰਗੀਆਂ ਫ਼ਾਈਲਾਂ: $0.402 402 API ਕ੍ਰੈਡਿਟ ਤੁਹਾਡੀਆਂ ਫ਼ਾਈਲਾਂ ਚਲਾਉਣ ਤੋਂ ਪਹਿਲਾਂ ਮਾਪੀਆਂ ਜਾਂਦੀਆਂ ਹਨ ਇਸ ਪੰਨੇ ’ਤੇ ਚਲਾਓ

API ਕੁੰਜੀ ਲਵੋ
xAI ਹਵਾਲੇ ਤੋਂ ਵੀਡੀਓ ਹਵਾਲਾ ਇਨਪੁੱਟ1–10 s720p ਤੱਕ #video-edit#v2v#grok#xai

ਪ੍ਰੌਂਪਟ ਵਿੱਚ @Image1, @Image2 ਵਜੋਂ ਟੈਗ ਕੀਤੇ 1 ਤੋਂ 7 ਹਵਾਲਾ ਚਿੱਤਰਾਂ ਦੇ ਮਾਰਗਦਰਸ਼ਨ ਨਾਲ ਵੀਡੀਓ ਸਿਰਜਦਾ ਹੈ

xAI · ਵੀਡੀਓ

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

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

ਰਿਕਵੈਸਟ ਬਣਾਓ

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

•ਲੋੜੀਂਦਾ 88 / 4096

ਕ੍ਰਮਬੱਧ ਚਿੱਤਰ ਹਵਾਲਿਆਂ ਵਾਲਾ ਵੀਡੀਓ-ਸਿਰਜਣਾ ਪ੍ਰੌਂਪਟ: @Image1 ਵਿੱਚ reference_image_urls ਦੀ ਪਹਿਲੀ ਐਂਟਰੀ, @Image2 ਵਿੱਚ ਦੂਜੀ, ਅਤੇ ਇਸੇ ਤਰ੍ਹਾਂ ਅੱਗੇ ਦਰਸਾਈ ਜਾਂਦੀ ਹੈ।

•ਲੋੜੀਂਦਾ reference_image_urls
ਫ਼ਾਈਲ ਛੱਡੋ, ਜਾਂ · 7 ਤੱਕ

ਵੀਡੀਓ ਲਈ ਸ਼ੈਲੀ ਅਤੇ ਸਮੱਗਰੀ ਦਾ ਮਾਰਗਦਰਸ਼ਨ ਦੇਣ ਵਾਲੇ ਹਵਾਲਾ ਚਿੱਤਰ URL। 1 ਤੋਂ 7 ਚਿੱਤਰ ਦਿਓ ਅਤੇ ਪ੍ਰੌਂਪਟ ਵਿੱਚ @Image1, @Image2 ਆਦਿ ਰਾਹੀਂ ਉਨ੍ਹਾਂ ਦਾ ਹਵਾਲਾ ਦਿਓ।

resolution ਡਿਫ਼ਾਲਟ 480p

ਆਉਟਪੁੱਟ ਵੀਡੀਓ ਦਾ ਰੈਜ਼ੋਲਿਊਸ਼ਨ।

aspect_ratio ਡਿਫ਼ਾਲਟ 16:9

ਨਤੀਜੇ ਵਾਲੀ ਵੀਡੀਓ ਦਾ ਪੱਖ ਅਨੁਪਾਤ।

ਡਿਫ਼ਾਲਟ 8

ਸਕਿੰਟਾਂ ਵਿੱਚ ਮਾਪੀ ਵੀਡੀਓ ਦੀ ਲੰਬਾਈ।

ਉੱਨਤ enable_safety_checker
POST /run/xai/grok-imagine-video/reference-to-video?wait=20 ਕੋਟ → $0.402
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/xai/grok-imagine-video/reference-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

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

ਇਹ ਬੇਨਤੀ ਚਲਾਓ

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

Grok Imagine Reference to Video ਬਾਰੇ

ਇੱਕ ਟੈਕਸਟ ਪ੍ਰੌਂਪਟ ਅਤੇ `reference_image_urls` ਵਿੱਚ ਦਿੱਤੇ 1 ਤੋਂ 7 ਹਵਾਲਾ ਚਿੱਤਰਾਂ ਤੋਂ ਕਲਿੱਪ ਬਣਾਉਂਦਾ ਹੈ, ਜੋ ਸ਼ੈਲੀ ਅਤੇ ਸਮੱਗਰੀ ਦੇ ਮਾਰਗਦਰਸ਼ਕ ਵਜੋਂ ਕੰਮ ਕਰਦੇ ਹਨ। ਪ੍ਰੌਂਪਟ ਵਿੱਚ ਉਨ੍ਹਾਂ ਦਾ ਕ੍ਰਮਵਾਰ @Image1, @Image2 ਆਦਿ ਵਜੋਂ ਜ਼ਿਕਰ ਕਰੋ। ਮਿਆਦ 1 ਤੋਂ 10 ਸਕਿੰਟ ਤੱਕ ਹੈ (ਪੂਰਵ-ਨਿਰਧਾਰਤ 8), ਰੈਜ਼ੋਲਿਊਸ਼ਨ 480p ਜਾਂ 720p ਹੈ, ਅਤੇ 16:9 ਤੋਂ 9:16 ਤੱਕ ਕਈ ਆਕਾਰ ਅਨੁਪਾਤ ਉਪਲਬਧ ਹਨ।

ਪੈਰਾਮੀਟਰ

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

ਨਾਮਕਿਸਮ ਡਿਫ਼ਾਲਟਮਨਜ਼ੂਰਸ਼ੁਦਾ ਵੇਰਵਾ
promptਲੋੜੀਂਦਾ
ਕਿਸਮstring
≤ 4,096 ਅੱਖਰ
ਕ੍ਰਮਬੱਧ ਚਿੱਤਰ ਹਵਾਲਿਆਂ ਵਾਲਾ ਵੀਡੀਓ-ਸਿਰਜਣਾ ਪ੍ਰੌਂਪਟ: @Image1 ਵਿੱਚ reference_image_urls ਦੀ ਪਹਿਲੀ ਐਂਟਰੀ, @Image2 ਵਿੱਚ ਦੂਜੀ, ਅਤੇ ਇਸੇ ਤਰ੍ਹਾਂ ਅੱਗੇ ਦਰਸਾਈ ਜਾਂਦੀ ਹੈ।
reference_image_urlsਲੋੜੀਂਦਾ images
ਕਿਸਮurl[] · image
≤ 7 ਆਈਟਮਾਂ
ਵੀਡੀਓ ਲਈ ਸ਼ੈਲੀ ਅਤੇ ਸਮੱਗਰੀ ਦਾ ਮਾਰਗਦਰਸ਼ਨ ਦੇਣ ਵਾਲੇ ਹਵਾਲਾ ਚਿੱਤਰ URL। 1 ਤੋਂ 7 ਚਿੱਤਰ ਦਿਓ ਅਤੇ ਪ੍ਰੌਂਪਟ ਵਿੱਚ @Image1, @Image2 ਆਦਿ ਰਾਹੀਂ ਉਨ੍ਹਾਂ ਦਾ ਹਵਾਲਾ ਦਿਓ।
durationਵਿਕਲਪਿਕ
ਕਿਸਮinteger
ਡਿਫ਼ਾਲਟ8
1 – 10
ਸਕਿੰਟਾਂ ਵਿੱਚ ਮਾਪੀ ਵੀਡੀਓ ਦੀ ਲੰਬਾਈ।
resolutionਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟ480p
480p720p
ਆਉਟਪੁੱਟ ਵੀਡੀਓ ਦਾ ਰੈਜ਼ੋਲਿਊਸ਼ਨ।
aspect_ratioਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟ16:9
16:94:33:21:12:33:49:16
ਨਤੀਜੇ ਵਾਲੀ ਵੀਡੀਓ ਦਾ ਪੱਖ ਅਨੁਪਾਤ।
enable_safety_checkerਵਿਕਲਪਿਕ
ਕਿਸਮboolean
ਡਿਫ਼ਾਲਟtrue
false ਸੈੱਟ ਕਰਕੇ ਸਕ੍ਰੀਨਿੰਗ ਨੂੰ ਢਿੱਲਾ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ, ਜੇ ਕਾਲਰ ਅਧਿਕਾਰਤ ਹੋਵੇ।
ਲੋੜੀਂਦਾ ਕੈਨੋਨਿਕਲ ਨਾਮ, ਇਹ ਵੀ ਸਵੀਕਾਰਿਆ ਜਾਂਦਾ ਹੈ

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

ਆਉਟਪੁੱਟ

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "xai/grok-imagine-video/reference-to-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": 402,
    "usd": "0.402",
    "charged": 402,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "reference_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "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,
      "width": 1024,
      "height": 768,
      "fps": 1.0,
      "duration": 5,
      "num_frames": 1
    }
  },
  "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://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://vit.doitong.com/api/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, width, height, fps, duration, num_frames}ਮਾਡਲ ਵੱਲੋਂ ਤਿਆਰ ਕੀਤੀ ਵੀਡੀਓ।

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

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