Documentation

Webhooks

Webhooks enable asynchronous notifications when your generation tasks complete. Instead of polling the API for results, provide a webhook URL to receive POST requests containing generation outcomes.

Using Webhooks

Add the {code} parameter to your generation request. When the task completes (or fails), we'll send a POST request to your endpoint:

{
  "type": "text-to-image",
  "model": "flux-dev",
  "prompt": "A beautiful sunset over mountains",
  "webhook_url": "https://your-app.com/webhooks/renderful"
}

Webhook Payload

Your endpoint receives a POST request with the following JSON payload:

{
  "event": "generation.completed",
  "data": {
    "id": "gen_abc123",
    "status": "completed",
    "model": "flux-dev",
    "outputs": ["https://..."],
    "created_at": "2024-01-15T10:30:00Z",
    "completed_at": "2024-01-15T10:30:15Z"
  }
}