# Renders and status

> Status, ?wait=, files, billing, cancel and rebuild.

Source: https://flow-marketing.org/en/help/api-renders-and-status · Question: How do I follow a render to the finished file?

A render is a job of its own (rnd_…) that turns a video into finished files. It is the billing unit: in live mode the price is reserved at the start and booked at the end.

You ask for the status – also as a long poll with ?wait= – or get notified by webhook. An event stream does not exist yet.

## Render statuses {#render-status}

`progress` is rough: 0 at `queued`, 0.5 at `rendering`, 0.9 at `checking`, 1 at the end. For the duration use the video’s `estimate.ready_in_s`. The video takes over the status (`succeeded` becomes `ready`).

| Status | Meaning |
| --- | --- |
| `queued` | accepted; in live mode the price is reserved |
| `rendering` | being built; automatic repairs run in the same job |
| `checking` | the finished files are being checked |
| `succeeded` | done, files in `files` |
| `failed` | still red after repairs, or the start failed on our side |
| `canceled` | canceled |

## The render object {#render-objekt}

| Field | Meaning |
| --- | --- |
| `id` | `rnd_` plus 20 characters |
| `mode`, `status` | mode and status |
| `video_id`, `video_revision` | video and its revision at the start (`video_id` is `null` once the video was deleted) |
| `image_id`, `batch_id` | always `null` – images and batches do not exist yet |
| `progress` | 0 to 1, rough |
| `is_correction` | `true` for the included correction after `ready` |
| `is_free_rebuild` | `true` for the free rebuild after red |
| `formats`, `duration_s` | formats and length |
| `files` | only on `succeeded`, otherwise `null` |
| `quality` | the video’s quality traffic light |
| `reserved_cents` | live: amount reserved until the end, then 0 |
| `charge` | booked amount or `null` |
| `error` | `code`, `message`, `charged`, `retryable` – on `failed` and `canceled` |
| `created_at`, `started_at`, `finished_at` | timestamps (ISO 8601, UTC) |

**Response 200 (test mode)**

```json
{
  "id": "rnd_9KpQ2wErT5yU7iO1aS3d",
  "object": "render",
  "mode": "test",
  "status": "succeeded",
  "video_id": "vid_7Hq2LmN0pQrS3tUv4WxY",
  "image_id": null,
  "batch_id": null,
  "video_revision": 1,
  "progress": 1,
  "is_correction": false,
  "is_free_rebuild": false,
  "formats": ["16x9"],
  "duration_s": 24.6,
  "files": {
    "master_16x9": { "url": "https://...", "expires_at": "2026-11-23T09:05:00.000Z", "content_type": "video/mp4" },
    "captions_de": { "url": "https://...", "expires_at": "2026-11-23T09:05:00.000Z", "content_type": "text/vtt" },
    "thumbnail": { "url": "https://...", "expires_at": "2026-11-23T09:05:00.000Z", "content_type": "image/jpeg" },
    "report_pdf": { "url": "https://...", "expires_at": "2026-11-23T09:05:00.000Z", "content_type": "application/pdf" }
  },
  "quality": { "overall": "green", "checks": [] },
  "reserved_cents": 0,
  "charge": { "amount_cents": 0, "currency": "eur", "billable_seconds": 25, "source": null },
  "error": null,
  "created_at": "2026-11-22T09:01:10.000Z",
  "started_at": "2026-11-22T09:01:40.000Z",
  "finished_at": "2026-11-22T09:03:05.000Z"
}
```

## Files: files {#dateien}

Each file has `url` (signed), `expires_at` (24 hours after the request) and `content_type`. Every call to `GET /renders/{id}` creates fresh links.

Anyone can open the links while they are valid. Only pass them on when that is intended, and store the file on your side if you need it longer.

| Key | Content |
| --- | --- |
| `master_16x9`, `master_9x16`, `master_1x1` | the video per chosen format (MP4); in test mode the 720p preview with watermark |
| `captions_de`, `captions_en` | captions (WebVTT), depending on the video; more languages if present |
| `thumbnail` | thumbnail image |
| `report_pdf` | quality report as PDF |

**curl**

```bash
# FILE_URL = files.master_16x9.url from the render (valid for 24 h)
curl -L -o video.mp4 "$FILE_URL"
```

**JavaScript**

```js
import { writeFile } from 'node:fs/promises'

const file = render.files.master_16x9 // { url, expires_at, content_type }
const res = await fetch(file.url)
await writeFile('video.mp4', Buffer.from(await res.arrayBuffer()))
```

**Python**

```python
import requests

url = render["files"]["master_16x9"]["url"]
with requests.get(url, stream=True, timeout=120) as r:
    r.raise_for_status()
    with open("video.mp4", "wb") as f:
        for teil in r.iter_content(chunk_size=1 << 20):
            f.write(teil)
```

## Waiting: long poll or webhook {#warten}

Long poll: `GET /renders/{id}?wait=30` (1 to 30 seconds) answers as soon as the status changes, at the latest after the wait time. Per account at most 10 such requests wait at the same time; more answer at once. Each request counts as a read request for rate limiting. `GET /videos/{id}?wait=30` works the same way.

Webhook: subscribe to `video.ready`, `video.failed` and `video.canceled`. The body contains the video with `latest_render` including files. This is the best way for many videos.

Safest is both: the webhook as the main path, an occasional `GET /renders/{id}` as a fallback in case a delivery fails.

**curl**

```bash
# waits up to 30 s for a status change
curl -s "https://flow-marketing.org/api/turbo/v1/renders/rnd_9KpQ2wErT5yU7iO1aS3d?wait=30" \
  -H "Authorization: Bearer $FLOW_API_KEY"
```

**JavaScript**

```js
const H = { Authorization: 'Bearer ' + process.env.FLOW_API_KEY }
let r
do {
  const res = await fetch('https://flow-marketing.org/api/turbo/v1/renders/' + renderId + '?wait=30', { headers: H })
  r = await res.json()
} while (['queued', 'rendering', 'checking'].includes(r.status))
console.log(r.status, r.files, r.error)
```

**Python**

```python
import os, requests

BASE = "https://flow-marketing.org/api/turbo/v1"
H = {"Authorization": "Bearer " + os.environ["FLOW_API_KEY"]}

while True:
    r = requests.get(BASE + "/renders/" + render_id, params={"wait": 30}, headers=H, timeout=40).json()
    if r["status"] not in ("queued", "rendering", "checking"):
        break
print(r["status"], r["files"], r["error"])
```

> **Note:** An event stream (`/renders/{id}/events`) does not exist yet, even though the OpenAPI description mentions it.

## Listing renders: GET /renders {#liste}

Newest first. Parameters: `limit` (1–100, default 20), `cursor`, `status` and `video_id`. Answer: `object: "list"`, `data`, `has_more`, `next_cursor`. Renders of deleted videos stay in the list (without `video_id`).

**curl**

```bash
curl "https://flow-marketing.org/api/turbo/v1/renders?video_id=vid_7Hq2LmN0pQrS3tUv4WxY&status=succeeded&limit=10" \
  -H "Authorization: Bearer $FLOW_API_KEY"
```

**JavaScript**

```js
const H = { Authorization: 'Bearer ' + process.env.FLOW_API_KEY }
let cursor = null
do {
  const q = new URLSearchParams({ limit: '100', ...(cursor ? { cursor } : {}) })
  const res = await fetch('https://flow-marketing.org/api/turbo/v1/renders?' + q, { headers: H })
  const page = await res.json()
  for (const r of page.data) console.log(r.id, r.status, r.charge && r.charge.amount_cents)
  cursor = page.has_more ? page.next_cursor : null
} while (cursor)
```

**Python**

```python
import os, requests

BASE = "https://flow-marketing.org/api/turbo/v1"
H = {"Authorization": "Bearer " + os.environ["FLOW_API_KEY"]}
cursor = None
while True:
    params = {"limit": 100, **({"cursor": cursor} if cursor else {})}
    page = requests.get(BASE + "/renders", params=params, headers=H, timeout=30).json()
    for r in page["data"]:
        print(r["id"], r["status"], (r["charge"] or {}).get("amount_cents"))
    if not page["has_more"]:
        break
    cursor = page["next_cursor"]
```

## Starting a render: body {#starten}

`POST /videos/{id}/render` answers 202 with the render object. Allowed body fields (all optional, an empty body works):

| Field | Meaning |
| --- | --- |
| `max_price_cents` | ceiling in cents; if the price is higher: 402 `price_above_max` |
| `free_rebuild` | `true` = free rebuild after red (only when the video’s `free_rebuild_available` is `true`) |
| `priority` | `normal` or `low`; accepted, but has no effect yet |
| `formats` | not allowed (422): change formats on the video with PATCH |

## When the start fails {#start-fehler}

In all these cases nothing starts and nothing is charged.

| Status | Code | Meaning |
| --- | --- | --- |
| 409 | `video_busy` | a render is already running for this video |
| 409 | `not_renderable` | the video is already `ready` – use PATCH for the correction |
| 409 | `no_free_rebuild` | no free rebuild available |
| 422 | `pre_render_check_red` | traffic light red; `failed_checks` lists the checks |
| 429 | `daily_test_limit` | the 25 test renders of the last 24 hours are used up |
| 409 | `pricing_not_set` | no price is set for live renders yet |
| 402 | `price_above_max` | price above `max_price_cents` |
| 402 | `spending_limit_reached` | monthly limit of the account or key reached |
| 402 | `insufficient_balance` | balance too low; `missing_cents` names the gap |
| 402 | `insufficient_credits` | only for accounts billed in credits (MCP) |
| 503 | `render_failed` | the start failed on our side |
| 503 | `stylefilm_render_unavailable` | style film renderer unreachable |

## Billing: charge and reserved_cents {#abrechnung}

`charge` has `amount_cents`, `currency` (`eur`), `billable_seconds` and `source` (`balance` or `null`). As long as nothing is booked, `charge` is `null`.

- Live: the price is reserved at the start (`reserved_cents`). At the end it is booked – on `succeeded` and also on final red (`failed`).
- If a paid render stays red, the video shows `free_rebuild_available: true`. Then `POST /videos/{id}/render` with `{"free_rebuild": true}` renders once without a new charge. If the rebuild stays red too, the amount of that round is credited back to your balance. Consumers can request a refund to their original payment method instead (portal → Billing).
- Cancel while the render waits: the reservation is released. If it has already begun, it may stay charged depending on the configured billing.
- Errors at the start on our side: nothing is charged.
- Test mode: always free; `charge.amount_cents` is 0, `source` is `null`.

**Red render, live (shortened)**

```json
{
  "id": "rnd_9KpQ2wErT5yU7iO1aS3d",
  "object": "render",
  "mode": "live",
  "status": "failed",
  "files": null,
  "reserved_cents": 0,
  "charge": { "amount_cents": 260, "currency": "eur", "billable_seconds": 26, "source": "balance" },
  "error": {
    "code": "render_failed",
    "message": "The video did not pass all quality checks after automatic repairs. It stays charged – rebuild it once for free with free_rebuild: true (see free_rebuild_available on the video).",
    "charged": true,
    "retryable": true
  }
}
```

## Cancel: POST /renders/{id}/cancel {#abbrechen}

Cancels a waiting or running render. Answer: the render object with `status: "canceled"`. The video is then `canceled` and can be rendered again.

Canceling only works while the video is being built. If the film is already finished and being checked, you get 409 `video_busy` – wait for the result. If the render has ended: 409 `nothing_to_cancel`. `POST /videos/{id}/cancel` does the same via the video id.

**curl**

```bash
# after a paid render stayed red: free_rebuild_available = true on the video
curl -X POST https://flow-marketing.org/api/turbo/v1/videos/vid_7Hq2LmN0pQrS3tUv4WxY/render \
  -H "Authorization: Bearer $FLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"free_rebuild": true}'

# cancel a queued or running render
curl -X POST https://flow-marketing.org/api/turbo/v1/renders/rnd_9KpQ2wErT5yU7iO1aS3d/cancel \
  -H "Authorization: Bearer $FLOW_API_KEY"
```

**JavaScript**

```js
const H = { Authorization: 'Bearer ' + process.env.FLOW_API_KEY, 'Content-Type': 'application/json' }
const BASE = 'https://flow-marketing.org/api/turbo/v1'

// free rebuild after red
await fetch(BASE + '/videos/' + videoId + '/render', { method: 'POST', headers: H, body: JSON.stringify({ free_rebuild: true }) })

// cancel
const res = await fetch(BASE + '/renders/' + renderId + '/cancel', { method: 'POST', headers: H })
const r = await res.json() // status 'canceled' or 409 nothing_to_cancel / video_busy
```

**Python**

```python
import os, requests

BASE = "https://flow-marketing.org/api/turbo/v1"
H = {"Authorization": "Bearer " + os.environ["FLOW_API_KEY"]}

# free rebuild after red
requests.post(BASE + "/videos/" + video_id + "/render", headers=H, json={"free_rebuild": True}, timeout=30)

# cancel
r = requests.post(BASE + "/renders/" + render_id + "/cancel", headers=H, timeout=30)
print(r.status_code, r.json().get("status") or r.json().get("code"))
```

## See also

- [Webhooks reference](https://flow-marketing.org/en/help/api-webhooks-reference)
- [Videos](https://flow-marketing.org/en/help/api-videos)
- [Costs and balance](https://flow-marketing.org/en/help/api-costs-and-balance)
- [Error codes](https://flow-marketing.org/en/help/api-error-codes)
