DevelopersAPI Docs
Platform

Webhooks

Generation is asynchronous — a single request can take 2–5 minutes to complete. Rather than polling the status endpoint, you can register a webhook URL to be notified automatically the moment a generation finishes or fails.

Async Processing

Every call to a generation endpoint returns a generation_id immediately. The actual generation runs in the background and is reported later either via polling or via webhook.

Polling the Status Endpoint

http
GET https://bumi.digital/api/v1/generation/{generation_id}
Authorization: Bearer YOUR_API_KEY
json
{
  "generation_id": "...",
  "status": "processing | completed | failed",
  "type": "image" | "video" | "audio",
  "model": "...",
  "prompt": "...",
  "resultUrl": "...",
  "error": "...",
  "created_at": "2025-11-26T...",
  "completed_at": "2025-11-26T...",
  "aspectRatio": "1:1"
}

Setting a Webhook URL

Provide a webhook_url in the generation request body:

json
{
  "model_id": "...",
  "parameters": { ... },
  "webhook_url": "https://your-server.com/webhook"
}

Webhook Payload

When the generation completes (or fails), Bumi Digital will POST a flat JSON payload to your webhook URL:

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"
}

Handling the Payload

  • Respond with an HTTP 2xx status quickly to acknowledge receipt.
  • Inspect the status field — a value of failed means error contains a human-readable message.
  • Some models return multiple assets — use resultUrls when it is present, otherwise resultUrl.