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_KEYjson
{
"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
statusfield — a value offailedmeanserrorcontains a human-readable message. - Some models return multiple assets — use
resultUrlswhen it is present, otherwiseresultUrl.