Docs / image / Flux 3 Klein Edit Image
Flux 3 Klein Edit Image online
Generasi dan editing gambar Flux 3 Klein hingga 4K, dengan sampai 10 gambar referensi.
Rp Mulai Rp130 / gambar
⏱ ±10–180 detik perkiraan waktu
flux-3/klein-edit-image model id
Up to 4K1–4 images
1 · Create a task
Kirim permintaan untuk membuat tugas generasi image. Wajib header Idempotency-Key. Saldo direservasi sebesar estimasi; task gagal tidak ditagih.
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": "flux-3/klein-edit-image",
"input": {
"prompt": "A cinematic scene with natural light and gentle motion.",
"image_urls": [
"https://example.com/reference.jpg"
]
}
}'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": "flux-3/klein-edit-image",
"input": {
"prompt": "A cinematic scene with natural light and gentle motion.",
"image_urls": [
"https://example.com/reference.jpg"
]
}
}),
});
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": "flux-3/klein-edit-image",
"input": {
"prompt": "A cinematic scene with natural light and gentle motion.",
"image_urls": [
"https://example.com/reference.jpg"
]
}
},
)
task = res.json()Input parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
seed |
integer | No | (min 0, max 2147483647) | — |
prompt |
string | Yes | (max 5000 chars) | A cinematic scene with natural light and gentl |
image_urls |
array | Yes | https://example.com/reference.jpg |
|
num_images |
integer | No | (min 1, max 4) | 1 |
resolution |
string | No | Opsi: 1K 2K 4K |
1K |
aspect_ratio |
string | No | Opsi: 1:1 4:3 3:4 3:2 2:3 16:9 9:16 21:9 9:21 auto |
auto |
nsfw_checker |
boolean | No | — | |
output_format |
string | No | Opsi: png jpeg webp |
png |
enhance_prompt |
boolean | No | Opsi: true false |
true |
2 · Poll the result
Ambil status tugas hingga selesai — poll tiap 2–5 detik.
Respons saat sukses:
{
"id": "task_9f2c…",
"status": "succeeded",
"model": "flux-3/klein-edit-image",
"price": {
"currency": "IDR",
"estimated": 130,
"reserved": 130,
"final": 130
},
"output": {
"urls": [
"https://storage.getcore.id/outputs/task_9f2c…/0.png"
],
"expires_at": "(7 hari setelah selesai)"
}
}
Status values
| Status | Keterangan |
|---|---|
queued | Tugas sedang diantrikan. |
processing | Sedang diproses. |
succeeded | Berhasil. |
failed | Gagal — lihat error detail, tidak ditagih. |
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.
