Execution Modes
ModelBeam is an asynchronous API. When you submit a job, you receive arequest_id immediately. The actual processing happens in the background, and you can receive results through three methods.
Job Lifecycle
Every job follows this lifecycle:- pending — Job is queued and waiting for a worker
- processing — Job is being processed by a GPU worker
- done — Job completed successfully, results are available
- error — Job failed (see error code for details)
Result Delivery Methods
1. Polling (Simplest)
Poll the status endpoint until the job is complete.2. Webhooks (Server-to-Server)
Provide awebhook_url parameter in your request. ModelBeam will send HTTP POST callbacks when the job status changes. Best for server-side integrations.
See the Webhooks guide for details.
3. WebSockets (Real-time)
Connect to the Pusher-compatible WebSocket server for real-time status updates. Best for client-side applications that need live progress updates. See the WebSockets guide for details.Response Format
All status responses share this format:| Field | Description |
|---|---|
status | Job status: pending, processing, done, error |
preview | Base64-encoded thumbnail (available during processing and on completion) |
result_url | URL to download the generated file (images, audio, video) |
results_alt_formats | Alternative format URLs (jpg, webp) when available |
result | Text output for transcription/OCR endpoints |
progress | Completion percentage (0-100) |