GetRun by Getcore API Documentation

Docs / image / GPT Image 2 Image to Image

GPT Image 2 Image to Image online

Edit and transform images with natural-language instructions — restyle, retouch, and combine references using GPT Image 2.

Rp Mulai Rp480 / image Rp2.250 −78.7% gpt-image-2-image-to-image/base 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://run.getcore.id/v1/tasks
curl -X POST https://run.getcore.id/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: my-task-001" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2-image-to-image/base",
    "input": {
      "prompt": "take a photo with Sam Altman in the conference room",
      "resolution": "1K",
      "aspect_ratio": "auto"
    }
  }'
const res = await fetch('https://run.getcore.id/v1/tasks', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Idempotency-Key': 'my-task-001',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "gpt-image-2-image-to-image/base",
    "input": {
      "prompt": "take a photo with Sam Altman in the conference room",
      "resolution": "1K",
      "aspect_ratio": "auto"
    }
  }),
});
const task = await res.json();
import requests

res = requests.post(
    "https://run.getcore.id/v1/tasks",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Idempotency-Key": "my-task-001",
    },
    json={
      "model": "gpt-image-2-image-to-image/base",
      "input": {
        "prompt": "take a photo with Sam Altman in the conference room",
        "resolution": "1K",
        "aspect_ratio": "auto"
      }
    },
)
task = res.json()

Input parameters

NameTypeRequiredDescriptionExample
prompt string Yes Used to describe the generated images. (max 20000 chars) take a photo with Sam Altman in the conference
input_urls array No Image for reference (array of file URLs)
resolution string No Image resolution
Opsi: 1K 2K 4K
1K
aspect_ratio string No For 2K and 4K resolution, the following aspect ratios are not supported: 5:4, 4:5, 3:1, 1:3, and 9:21.
Opsi: auto 1:1 3:2 2:3 4:3 3:4 16:9 9:16 2:1 1:2 3:1 1:3 21:9 9:21 5:4 4:5
auto

2 · Poll the result

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

GEThttps://run.getcore.id/v1/tasks/{task_id}

Respons saat sukses:

{
  "id": "task_9f2c…",
  "status": "succeeded",
  "model": "gpt-image-2-image-to-image/base",
  "price": {
    "currency": "IDR",
    "estimated": 480,
    "reserved": 480,
    "final": 480
  },
  "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
GPT Image 2 Image to Image
Mulai Rp480 / image
  • Harga jelas, pembayaran mudah.
  • Transparan, tanpa biaya tersembunyi.
  • Hemat 79% dibanding harga pembanding.
Try in Playground ↗

Eksperimen model ini langsung di Playground untuk hasil instan.

Model details
Model IDgpt-image-2-image-to-image/base
Modalityimage
Output typeimage/png
API versionv1
Need help?

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