# BUMI Digital API — Referensi Lengkap

**Sumber:** https://bumi.digital/api-docs
**Diakses:** 30 Juli 2026
**Total Model:** 87 model aktif

---

## 1. BASE URL

```
https://bumi.digital
```

Semua endpoint API di-prepend dengan base URL ini.

---

## 2. AUTENTIKASI

| Header | Format |
|--------|--------|
| `Authorization: Bearer bd_xxxxxxxxxxxx` | API key dengan prefix `bd_` |

- Buat API Key di **Settings → Profile → New API Key**
- Jangan simpan di source code / version control
- Rotasi key secara berkala

---

## 3. ENDPOINT — UPLOAD FILE

```
POST /api/v1/upload
```

**Content-Type:** `multipart/form-data`  
**Retensi:** File otomatis dihapus setelah **7 hari**

| Tipe | Maks Ukuran |
|------|------------|
| Image | 20 MB |
| Video | 100 MB |
| Audio | 50 MB |

**Response:**
```json
{
  "ok": true,
  "data": {
    "file_id": "c9b7xxxxx",
    "file_url": "https://storage.bumi.digital/uploads/c9b7xxxxx.jpg",
    "file_type": "image",
    ...
  }
}
```

Gunakan `file_url` sebagai referensi di parameter `image`, `reference_images`, dll.

---

## 4. ENDPOINT — CEK KREDIT

```
GET /api/v1/credits
```

**Response:**
```json
{
  "ok": true,
  "data": {
    "user_id": "clu...xyz",
    "credits": 1234.56,
    "currency": "credits"
  }
}
```

---

## 5. ENDPOINT — HISTORY GENERASI

```
GET /api/v1/generations
```

**Query Parameters:**

| Parameter | Tipe | Default | Deskripsi |
|-----------|------|---------|-----------|
| page | int | 1 | Halaman |
| limit | int | 20 | Max 100 |
| type | string | — | `image`, `video`, `audio`, `upscale-image`, `upscale-video` |
| status | string | — | `processing`, `completed`, `failed` |
| from | ISO date | — | Filter tanggal mulai |
| to | ISO date | — | Filter tanggal selesai |
| q | string | — | Cari teks di prompt/model |
| include_deleted | boolean | 0 | Sertakan yang soft-deleted |

Single generation: `GET /api/v1/generation/{id}`

---

## 6. WEBHOOK (ASYNC FLOW)

Kirim `webhook_url` di body request generation:
```json
{
  "model_id": "...",
  "parameters": { ... },
  "webhook_url": "https://your-server.com/webhook"
}
```

**Webhook Payload:**
```json
{
  "generation_id": "...",
  "status": "completed | failed",
  "type": "image | video | audio",
  "model": "...",
  "prompt": "...",
  "resultUrl": "...",
  "resultUrls": ["..."],
  "error": "...",
  "created_at": "2025-11-26T...",
  "completed_at": "2025-11-26T...",
  "aspectRatio": "1:1"
}
```

Atau polling: `GET /api/v1/generation/{generation_id}`

---

## 7. ERROR HANDLING

| Kode | Arti | Tindakan |
|------|------|----------|
| 401 | Unauthorized | Cek API key & format header |
| 400 | Bad Request | Cek parameter model |
| 500 | Server Error | Retry exponential backoff |

---

## 8. MODELS & PRICING

### Endpoint (PUBLIC — tanpa API key)
```
GET /api/v1/models/pricing
```

Query: `?type=image` / `video` / `audio` / `upscale-image` / `upscale-video`

Response punya `input_schema` (JSON Schema) untuk tiap model — bisa dipakai buat dynamic form.

---

## 9. GENERASI (ASYNC)

Semua endpoint generation bersifat **asynchronous**:
- Request → return `generation_id`
- Proses background (2-5 menit untuk video)
- Hasil via webhook atau polling

### Image Generation
```
POST /api/v1/image/generate
```

### Video Generation
```
POST /api/v1/video/generate
```

### Audio Generation
```
POST /api/v1/audio/generate
```

### Upscale
```
POST /api/v1/upscale (image & video)
```

**Generic payload:**
```json
{
  "model_id": "model_id_here",
  "parameters": {
    "prompt": "Your prompt here"
  },
  "webhook_url": "https://..."
}
```

---

## 10. DAFTAR MODEL LENGKAP (87 Model Aktif)

### 🖼️ IMAGE (29 models)

| Model ID | Cost/credits | Provider |
|----------|-------------|----------|
| `bytedance/seedream-5-pro` | 0.27 (1K), 0.50 (2K) | Bytedance |
| `bytedance/seedream-5-lite` | 0.21 | Bytedance |
| `bytedance/seedream-4.5` | 0.24 | Bytedance |
| `bytedance/seedream-4` | 0.18 | Bytedance |
| `bytedance/seedream-3` | 0.18 | Bytedance |
| `bytedance/dreamina-3.1` | 0.18 | Bytedance |
| `google/nano-banana-2` | 0.606 | Google |
| `google/nano-banana-pro` | 0.90 | Google |
| `google/nano-banana` | 0.234 | Google |
| `google/imagen-4-ultra` | 0.36 | Google |
| `google/imagen-4-fast` | 0.12 | Google |
| `google/imagen-3` | 0.30 | Google |
| `openai/gpt-image-1.5` | 0.078 | OpenAI |
| `openai/gpt-image-2` | 0.072 | OpenAI |
| `qwen/qwen-image` | 0.15 | Qwen |
| `qwen/qwen-image-2` | 0.21 | Qwen |
| `qwen/qwen-image-2-pro` | 0.45 | Qwen |
| `qwen/qwen-image-edit` | 0.18 | Qwen |
| `qwen/qwen-image-edit-plus-lora` | 0.18 | Qwen |
| `recraft-ai/recraft-v4` | 0.24 | Recraft |
| `recraft-ai/recraft-v4.1` | 0.24 | Recraft |
| `recraft-ai/recraft-v4-pro` | 1.50 | Recraft |
| `recraft-ai/recraft-v4.1-pro` | 1.50 | Recraft |
| `black-forest-labs/flux-1.1-pro-ultra` | 0.36 | Black Forest Labs |
| `black-forest-labs/flux-kontext-max` | 0.48 | Black Forest Labs |
| `black-forest-labs/flux-kontext-pro` | 0.24 | Black Forest Labs |
| `grok-imagine/text-to-image` | 0.12 | xAI/Grok |
| `wan-video/wan-2.7-image` | 0.18 | Wan |
| `wan-video/wan-2.7-image-pro` | 0.18 | Wan |

### 🎬 VIDEO (45 models)

| Model ID | Cost/credits | Provider |
|----------|-------------|----------|
| `alibaba/happyhorse-1.0` | 8.40 | Alibaba |
| `bytedance/seedance-2.0-fast/text-to-video` | 4.50 | Bytedance |
| `bytedance/seedance-2.0/text-to-video` | 5.40 | Bytedance |
| `bytedance/seedance-2.0-mini` | 3.60 | Bytedance |
| `bytedance/seedance-1-pro` | 1.80 | Bytedance |
| `bytedance/seedance-1.5-pro` | 0.78 | Bytedance |
| `bytedance/seedance-1-pro-fast` | 0.45 | Bytedance |
| `bytedance/seedance-1-lite` | 1.08 | Bytedance |
| `bytedance/dreamactor-m2.0` | 0.30 | Bytedance |
| `bytedance/omni-human-1.5` | 0.96 | Bytedance |
| `kwaivgi/kling-v3-video` | 5.04 | Kling |
| `kwaivgi/kling-v3-omni-video` | 6.72 | Kling |
| `kwaivgi/kling-o1` | 3.36 | Kling |
| `kwaivgi/kling-v3-motion-control` | 0.30 | Kling |
| `kwaivgi/kling-v2.6` | 2.10 | Kling |
| `kwaivgi/kling-v2.6-motion-control` | 0.30 | Kling |
| `kwaivgi/kling-v2.5-turbo-pro` | 2.10 | Kling |
| `kwaivgi/kling-v2.1` | 0.70 | Kling |
| `kwaivgi/kling-v2.1-master` | 8.40 | Kling |
| `kwaivgi/kling-v2.0` | 8.40 | Kling |
| `kwaivgi/kling-v1.6-pro` | 2.85 | Kling |
| `kwaivgi/kling-avatar-v2` | 0.336 | Kling |
| `pixverse/pixverse-v4.5` | 1.80 | Pixverse |
| `pixverse/pixverse-v5` | 1.80 | Pixverse |
| `pixverse/pixverse-v5.6` | 2.70 | Pixverse |
| `pixverse/pixverse-v6` | 2.70 | Pixverse |
| `google/veo-3.1` | 9.60 | Google |
| `google/veo-3.1-fast` | 3.60 | Google |
| `google/veo-3.1-lite` | 1.20 | Google |
| `google/gemini-omni-image-to-video` | 3.60 | Google |
| `openai/sora-2` | 2.40 | OpenAI |
| `minimax/hailuo-02` | 1.62 | MiniMax |
| `minimax/hailuo-2.3` | 1.68 | MiniMax |
| `minimax/hailuo-2.3-fast` | 1.14 | MiniMax |
| `runwayml/gen-4.5` | 3.60 | Runway |
| `wan-video/wan-2.5-t2v` | 3.00 | Wan |
| `wan-video/wan-2.5-i2v` | 3.00 | Wan |
| `wan-video/wan-2.6-t2v` | 3.00 | Wan |
| `wan-video/wan-2.6-i2v` | 3.00 | Wan |
| `wan-video/wan-2.7-r2v` | 3.00 | Wan |
| `wan-video/wan-2.2-animate-replace` | 0.30 | Wan |
| `wan-video/wan-2.2-animate-animation` | 0.018 | Wan |
| `xai/grok-imagine-video` | 1.50 | xAI |
| `xai/grok-imagine-video-1.5` | 1.20 | xAI |
| `lightricks/audio-to-video` | 0.60 | Lightricks |

### 🔊 AUDIO (5 models)

| Model ID | Cost/credits | Provider |
|----------|-------------|----------|
| `suno/suno` | 0.10 | Suno (music gen) |
| `sync/lipsync-2-pro` | 0.4995 | Sync |
| `pixverse/lipsync` | 0.24 | Pixverse |
| `heygen/lipsync-speed` | 0.1998 | HeyGen |
| `heygen/lipsync-precision` | 0.4002 | HeyGen |

### 📐 UPSCALE-IMAGE (5 models)

| Model ID | Cost/credits | Provider |
|----------|-------------|----------|
| `google/upscaler` | 0.12 | Google |
| `nightmareai/real-esrgan` | 0.012 | Real-ESRGAN |
| `topazlabs/image-upscale` | 0.30 | Topaz Labs |
| `bria/increase-resolution` | 0.24 | Bria |
| `philz1337x/clarity-pro-upscaler` | 0.72 | Clarity |

### 📹 UPSCALE-VIDEO (3 models)

| Model ID | Cost/credits | Provider |
|----------|-------------|----------|
| `topazlabs/video-upscale` | 0.162 | Topaz Labs |
| `runwayml/upscale-v1` | 0.80 | Runway |
| `philz1337x/crystal-video-upscaler` | 1.242 | Crystal |

---

## 11. FITUR-FITUR PENTING

1. **Asynchronous generation** — setiap request langsung balikin `generation_id`, hasil nanti
2. **Webhook support** — pasang URL, dapat notifikasi otomatis pas selesai
3. **Upload file** — upload image/video/audio dulu, baru pakai URL-nya
4. **JSON Schema per model** — tiap model punya `input_schema` sendiri, bisa bangun dynamic form
5. **Pricing public** — endpoint `/api/v1/models/pricing` tanpa auth, tinggal GET
6. **History + pagination** — cek semua generasi, filter by type/status/date

---

## 12. PERBANDINGAN DENGAN VIOSTUDIO

| Aspek | VIOSTUDIO | BUMI Digital |
|-------|-----------|-------------|
| Base URL | `api.viostudio.id` | `bumi.digital` |
| Auth | `vio_sk_...` | `bd_...` |
| Image models | Terbatas (nano-banana, gpt-image) | **29 models** (termasuk Seedream, FLUX, Recraft, dll) |
| Video models | Tidak ada | **45 models** (Kling, Seedance, Veo, Sora, Wan, dll) |
| Audio | Tidak ada | **5 models** (Suno music, lipsync) |
| Upscale | Tidak ada | **8 models** (image + video upscale) |
| Webhook | Ada | Ada |
| Pricing public | Tidak | Ada (endpoint public) |
| Input schema | Tidak | Ada (JSON Schema tiap model) |
| Harga termurah image | 3 credits (~$? ) | 0.072 credits (GPT-Image 2) |

---

*Dipelajari oleh Agustini — 30 Juli 2026*
