Core API
Tasks & polling
Every job is a task. Poll it until it reaches a terminal state — succeeded or failed.
GET/v1/tasks/{id}
Statuses#
| Field | Type | Description |
|---|---|---|
| queued | status | Accepted, waiting to start. |
| running | status | The engine is working. |
| succeeded | status | Done — output[] holds the result URLs; cost_usd is billed. |
| failed | status | The job errored. Not billed — error explains why. |
Response · succeeded#
200
{
"id": "8f3c…",
"status": "succeeded",
"output": [{ "url": "https://…/result.mp4", "type": "video" }],
"cost_usd": "0.30"
}A polling loop#
Poll every few seconds until terminal. Renders and reels can take from seconds to a few minutes.
async function wait(id, key) {
while (true) {
const r = await fetch(`https://www.reelestateboss.com/v1/tasks/${id}`, {
headers: { Authorization: `Bearer ${key}` },
});
const t = await r.json();
if (t.status === "succeeded") return t.output;
if (t.status === "failed") throw new Error(t.error);
await new Promise((r) => setTimeout(r, 3000));
}
}Billing is metered exactly once, on the first terminal read — a succeeded job bills
cost_usd; a failed job bills nothing. Your key's running spend shows in Settings → API keys.