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

Grok Imagine Image · Edit

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

ਮਾਡਲ id xai/grok-imagine-image/edit
# 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/xai/grok-imagine-image/edit?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"
  }'

# 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.022 22 API ਕ੍ਰੈਡਿਟ ਇਸ ਪੰਨੇ ’ਤੇ ਚਲਾਓ

API ਕੁੰਜੀ ਲਵੋ
xAI ਚਿੱਤਰ ਸੰਪਾਦਨ 2k ਤੱਕ #grok#xai#image-editing

3 ਤੱਕ ਇਨਪੁੱਟ ਚਿੱਤਰਾਂ ਤੋਂ Grok ਚਿੱਤਰ ਸੰਪਾਦਨ, ਜਿਸ ਵਿੱਚ ਆਸਪੈਕਟ ਰੇਸ਼ੋ ਪੂਰਵ-ਨਿਰਧਾਰਤ ਤੌਰ 'ਤੇ ਪਹਿਲੇ ਚਿੱਤਰ ਦਾ ਹੁੰਦਾ ਹੈ

Doitong ’ਤੇ ਬਣਾਇਆ ਗਿਆ

Doitong ਭਾਈਚਾਰੇ ਵੱਲੋਂ Grok Imagine Image ਨਾਲ ਬਣਾਏ ਜਨਤਕ ਕੰਮ। ਇੱਕ ਕਲਿੱਕ ਨਾਲ ਪ੍ਰੌਮਪਟ ਦੁਬਾਰਾ ਵਰਤੋ।

ਦਿਖਾਏ ਗਏ ਜਨਤਕ ਕੰਮ: 16
Art style: Professional portrait photography, cinematic lighting, realistic high detail. День. Тр...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. День. Тротуар у фудтрака, точно восемь горожан стоят в очереди неподвижно. Медиум: клерк в расстёгнутом пальто держит сэндвич в правой руке у рта. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. День, ме...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. День, медиум изнутри окна фудтрака. Арина за стойкой держит в правой руке золотой конверт, в левой магнит. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative rendering...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Арена, с...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Арена, свет софитов, на табло алые цифры 00:45. Трибуны полны и неподвижны. Медиум: Арина с чёрной повязкой на волосах держит сковороду правой рукой. Натан стоит за столом напротив, в его руке пинцет....

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Медиум: ...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Медиум: Арина у стола арены, в правой руке сковорода над пустой глиняной тарелкой, свет софитов. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative rendering directive —...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Судейски...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Судейский стол под софитами. Точно трое критиков в смокингах сидят за ним. Перед ними тарелка с пеной и глиняная тарелка с глазурью. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Арена, м...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Арена, медиум: Натан у стального стола держит пинцет в правой руке, за ним тёмный медиафасад. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative rendering directive — it...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Медиум: ...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Медиум: Арина у стола арены держит обеими руками золотой кубок на уровне груди, золотой свет софитов. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative rendering...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. День, св...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. День, светлая панорамная кухня с окнами. Медиум: Арина в чёрном кителе идёт к раздаче, в правой руке дымящееся блюдо. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FINAL STYLE ENFORCEMENT (this is the authoritative...

ਰਿਕਵੈਸਟ ਬਣਾਓ

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

•ਲੋੜੀਂਦਾ 88 / 8000

ਬਣਾਏ ਜਾਣ ਵਾਲੇ ਚਿੱਤਰ ਦਾ ਲਿਖਤੀ ਵੇਰਵਾ।

resolution ਡਿਫ਼ਾਲਟ 1k

ਮਿਆਰੀ (`1k`) ਅਤੇ ਉੱਚ (`2k`) ਵਿੱਚੋਂ ਚਿੱਤਰ ਰੈਜ਼ੋਲਿਊਸ਼ਨ ਦੀ ਚੋਣ।

ਡਿਫ਼ਾਲਟ auto

ਚਿੱਤਰ ਸੰਪਾਦਨ ਲਈ ਆਉਟਪੁੱਟ ਆਕਾਰ-ਅਨੁਪਾਤ ਸੈਟਿੰਗ, ਜਿਸ ਵਿੱਚ `auto` ਪਹਿਲੇ ਇਨਪੁੱਟ ਦੇ ਅਨੁਪਾਤ ਵਰਤਦਾ ਹੈ। ਇਹ ਆਟੋਮੈਟਿਕ ਸੈਟਿੰਗ ਪੂਰਵ-ਨਿਰਧਾਰਤ ਹੈ।

num_images ਡਿਫ਼ਾਲਟ 1

ਤਿਆਰ ਕੀਤੇ ਜਾਣ ਵਾਲੇ ਚਿੱਤਰਾਂ ਦੀ ਗਿਣਤੀ।

ਉੱਨਤ images · output_format · enable_safety_checker
image_urls
ਫ਼ਾਈਲ ਛੱਡੋ, ਜਾਂ

ਸੰਪਾਦਨ ਲਈ ਚਿੱਤਰ URL, ਵੱਧ ਤੋਂ ਵੱਧ 3 ਚਿੱਤਰਾਂ ਦੀ ਸੂਚੀ ਵਜੋਂ ਦਿੱਤੇ ਗਏ।

output_format ਡਿਫ਼ਾਲਟ jpeg

ਨਤੀਜੇ ਵਾਲੇ ਚਿੱਤਰ ਦਾ ਫ਼ਾਈਲ ਫਾਰਮੈਟ।

POST /run/xai/grok-imagine-image/edit?wait=20 ਕੋਟ → $0.022
# 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/xai/grok-imagine-image/edit?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"
  }'

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

Grok Imagine Image · Edit ਬਾਰੇ

8000 ਅੱਖਰਾਂ ਤੱਕ ਦੇ ਪ੍ਰੌਂਪਟ ਨਾਲ ਵਰਣਿਤ ਚਿੱਤਰਾਂ ਨੂੰ `image_urls` ਵਿੱਚ ਵੱਧ ਤੋਂ ਵੱਧ 3 URL ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਸੰਪਾਦਿਤ ਕਰਦਾ ਹੈ। `aspect_ratio` ਪੂਰਵ-ਨਿਰਧਾਰਤ ਤੌਰ ’ਤੇ auto ਹੈ, ਜੋ ਪਹਿਲੇ ਇਨਪੁੱਟ ਚਿੱਤਰ ਦਾ ਅਨੁਪਾਤ ਕਾਇਮ ਰੱਖਦਾ ਹੈ, ਜਾਂ ਇਸਨੂੰ ਸਪਸ਼ਟ ਤੌਰ ’ਤੇ ਸੈੱਟ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ। ਰੈਜ਼ੋਲਿਊਸ਼ਨ 1k ਜਾਂ 2k ਹੈ ਅਤੇ jpeg, png ਜਾਂ webp ਵਿੱਚ ਵੱਧ ਤੋਂ ਵੱਧ 4 ਆਉਟਪੁੱਟ ਮਿਲਦੇ ਹਨ। ਸੋਧਿਆ ਹੋਇਆ ਪ੍ਰੌਂਪਟ ਵਾਪਸ ਕੀਤਾ ਜਾਂਦਾ ਹੈ।

ਪੈਰਾਮੀਟਰ

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

ਨਾਮਕਿਸਮ ਡਿਫ਼ਾਲਟਮਨਜ਼ੂਰਸ਼ੁਦਾ ਵੇਰਵਾ
promptਲੋੜੀਂਦਾ
ਕਿਸਮstring
≤ 8,000 ਅੱਖਰ
ਬਣਾਏ ਜਾਣ ਵਾਲੇ ਚਿੱਤਰ ਦਾ ਲਿਖਤੀ ਵੇਰਵਾ।
num_imagesਵਿਕਲਪਿਕ num_outputs
ਕਿਸਮinteger
ਡਿਫ਼ਾਲਟ1
1 – 4
ਤਿਆਰ ਕੀਤੇ ਜਾਣ ਵਾਲੇ ਚਿੱਤਰਾਂ ਦੀ ਗਿਣਤੀ।
aspect_ratioਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟauto
auto2:120:919.5:916:94:33:21:12:33:49:169:19.59:201:2
ਚਿੱਤਰ ਸੰਪਾਦਨ ਲਈ ਆਉਟਪੁੱਟ ਆਕਾਰ-ਅਨੁਪਾਤ ਸੈਟਿੰਗ, ਜਿਸ ਵਿੱਚ `auto` ਪਹਿਲੇ ਇਨਪੁੱਟ ਦੇ ਅਨੁਪਾਤ ਵਰਤਦਾ ਹੈ। ਇਹ ਆਟੋਮੈਟਿਕ ਸੈਟਿੰਗ ਪੂਰਵ-ਨਿਰਧਾਰਤ ਹੈ।
resolutionਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟ1k
1k2k
ਮਿਆਰੀ (`1k`) ਅਤੇ ਉੱਚ (`2k`) ਵਿੱਚੋਂ ਚਿੱਤਰ ਰੈਜ਼ੋਲਿਊਸ਼ਨ ਦੀ ਚੋਣ।
output_formatਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟjpeg
jpegpngwebp
ਨਤੀਜੇ ਵਾਲੇ ਚਿੱਤਰ ਦਾ ਫ਼ਾਈਲ ਫਾਰਮੈਟ।
enable_safety_checkerਵਿਕਲਪਿਕ
ਕਿਸਮboolean
ਡਿਫ਼ਾਲਟtrue
false ਸੈੱਟ ਕਰਕੇ ਸਕ੍ਰੀਨਿੰਗ ਨੂੰ ਢਿੱਲਾ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ, ਜੇ ਕਾਲਰ ਅਧਿਕਾਰਤ ਹੋਵੇ।
image_urlsਵਿਕਲਪਿਕ images
ਕਿਸਮurl[] · image
ਸੰਪਾਦਨ ਲਈ ਚਿੱਤਰ URL, ਵੱਧ ਤੋਂ ਵੱਧ 3 ਚਿੱਤਰਾਂ ਦੀ ਸੂਚੀ ਵਜੋਂ ਦਿੱਤੇ ਗਏ।
ਲੋੜੀਂਦਾ ਕੈਨੋਨਿਕਲ ਨਾਮ, ਇਹ ਵੀ ਸਵੀਕਾਰਿਆ ਜਾਂਦਾ ਹੈ

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

ਆਉਟਪੁੱਟ

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "xai/grok-imagine-image/edit",
  "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": 22,
    "usd": "0.022",
    "charged": 22,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "revised_prompt": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "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 ਮਾਡਲ ਦਾ ਆਪਣਾ ਨਤੀਜਾ ਆਬਜੈਕਟ ਹੈ।
ਆਉਟਪੁੱਟ ਦੇ ਫ਼ੀਲਡ
images
array of object {url, content_type, file_name, file_size, width, height}ਸੰਪਾਦਿਤ ਚਿੱਤਰ ਵੱਲ ਇਸ਼ਾਰਾ ਕਰਨ ਵਾਲਾ URL।
revised_prompt
string | nullਚਿੱਤਰ ਸਿਰਜਣਾ ਲਈ ਵਰਤਿਆ ਜਾਣ ਵਾਲਾ ਸੁਧਾਰਿਆ ਪ੍ਰੌਂਪਟ।

ਹੋਰ ਮਾਡਲ: ਚਿੱਤਰ ਸੰਪਾਦਨ

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