GetRun by Getcore API Documentation

Docs / image / Grok Imagine Image 2.0 Image Edit

Grok Imagine Image 2.0 Image Edit online

Edit an existing image with Grok Imagine 2.0 — swap backgrounds, replace text, and restyle with a prompt.

Rp Rp320 / gambar grok-imagine-image-2-0/image-edit model id

1 · Create a task

Kirim permintaan untuk membuat tugas generasi image. Wajib header Idempotency-Key. Saldo direservasi sebesar estimasi; task gagal tidak ditagih.

POSThttps://getrun.id/v1/tasks
curl -X POST https://getrun.id/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: my-task-001" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-2-0/image-edit",
    "input": {
      "prompt": "Replace the main title “NOVA CREATIVE CLUB” with “Kie.ai Creative Studio” while preserving the original typography style, layout structure, and vintage editorial design language. Adapt the surrounding text elements to match the new Kie.ai Creative Studio identity while keeping the same visual hierarchy, spacing, and print texture. Maintain the original composition, including the portrait, color palette, curved graphic elements, badges, feature sections, and footer details. Make the new brand name appear naturally printed on the magazine cover with realistic distressed ink, consistent typography weight, and authentic editorial magazine quality. Keep the overall retro creative studio aesthetic unchanged, creating the feeling of a real Kie.ai Creative Studio special edition magazine.",
      "image_urls": [
        "https://example.com/input.jpg"
      ],
      "aspect_ratio": "auto"
    }
  }'
const res = await fetch('https://getrun.id/v1/tasks', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Idempotency-Key': 'my-task-001',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "grok-imagine-image-2-0/image-edit",
    "input": {
      "prompt": "Replace the main title “NOVA CREATIVE CLUB” with “Kie.ai Creative Studio” while preserving the original typography style, layout structure, and vintage editorial design language. Adapt the surrounding text elements to match the new Kie.ai Creative Studio identity while keeping the same visual hierarchy, spacing, and print texture. Maintain the original composition, including the portrait, color palette, curved graphic elements, badges, feature sections, and footer details. Make the new brand name appear naturally printed on the magazine cover with realistic distressed ink, consistent typography weight, and authentic editorial magazine quality. Keep the overall retro creative studio aesthetic unchanged, creating the feeling of a real Kie.ai Creative Studio special edition magazine.",
      "image_urls": [
        "https://example.com/input.jpg"
      ],
      "aspect_ratio": "auto"
    }
  }),
});
const task = await res.json();
import requests

res = requests.post(
    "https://getrun.id/v1/tasks",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Idempotency-Key": "my-task-001",
    },
    json={
      "model": "grok-imagine-image-2-0/image-edit",
      "input": {
        "prompt": "Replace the main title “NOVA CREATIVE CLUB” with “Kie.ai Creative Studio” while preserving the original typography style, layout structure, and vintage editorial design language. Adapt the surrounding text elements to match the new Kie.ai Creative Studio identity while keeping the same visual hierarchy, spacing, and print texture. Maintain the original composition, including the portrait, color palette, curved graphic elements, badges, feature sections, and footer details. Make the new brand name appear naturally printed on the magazine cover with realistic distressed ink, consistent typography weight, and authentic editorial magazine quality. Keep the overall retro creative studio aesthetic unchanged, creating the feeling of a real Kie.ai Creative Studio special edition magazine.",
        "image_urls": [
          "https://example.com/input.jpg"
        ],
        "aspect_ratio": "auto"
      }
    },
)
task = res.json()

Input parameters

NameTypeRequiredDescriptionExample
prompt string No Text prompt describing the desired image. (max 5000 chars) Replace the main title “NOVA CREATIVE CLUB” wi
image_urls array Yes Upload an image file to use as input for the API (array of file URLs) https://example.com/input.jpg
aspect_ratio string Yes Specifies the width-to-height ratio of the generated image. Controls the aspect ratio of the output.
Opsi: 1:1 2:3 3:2 16:9 9:16 auto
auto

2 · Poll the result

Ambil status tugas hingga selesai — poll tiap 2–5 detik.

GEThttps://getrun.id/v1/tasks/{task_id}

Respons saat sukses:

{
  "id": "task_9f2c…",
  "status": "succeeded",
  "model": "grok-imagine-image-2-0/image-edit",
  "price": {
    "currency": "IDR",
    "estimated": 320,
    "reserved": 320,
    "final": 320
  },
  "output": {
    "urls": [
      "https://storage.getcore.id/outputs/task_9f2c…/0.png"
    ],
    "expires_at": "(7 hari setelah selesai)"
  }
}

Status values

StatusKeterangan
queuedTugas sedang diantrikan.
processingSedang diproses.
succeededBerhasil.
failedGagal — lihat error detail, tidak ditagih.
Output bertipe image/png, dilayani dari CDN kami dan berlaku 7 hari — salin ke penyimpananmu sendiri untuk jangka panjang.

Best practices

Bila generation gagal, task berstatus failed dengan error.code ternormalisasi (mis. moderation_blocked, upstream_error) dan price.final = 0 — saldo dikembalikan otomatis. Daftar lengkap kode error ada di Error handling. Selalu kirim Idempotency-Key unik per tugas agar retry aman.

Coba tanpa kode: jalankan model ini langsung dari Playground atau lihat di API Market.

On this page
1 · Create a task Input parameters 2 · Poll the result Status values Best practices
Pricing summary
Grok Imagine Image 2.0 Image Edit
Rp320 / gambar
  • Harga jelas, pembayaran mudah.
  • Transparan, tanpa biaya tersembunyi.
  • Task gagal tidak ditagih.
Try in Playground ↗

Eksperimen model ini langsung di Playground untuk hasil instan.

Model details
Model IDgrok-imagine-image-2-0/image-edit
Modalityimage
Output typeimage/png
API versionv1
Need help?

Lihat daftar error umum di Error handling atau hubungi support@getcore.id.