# Listing videos

- **URL**: /documentation/api-reference/listing-videos

Turn a real estate listing into a finished, branded video from your CRM, a spreadsheet or an automation. Save the listing once — its details and photos — then start a video from it. Each video is made in the background and ends as three files from the same script, voice and music:

- `vertical` (9:16) for Reels, TikTok and Shorts;
- `wide` (16:9) for YouTube and the agent’s website;
- `wide_unbranded` (16:9, no agent name, photo or contact) for the MLS.

The branded files carry the agent card from the workspace’s brand kit (Brand Library → Agent profile). Listings and videos made here also show in the dashboard’s Videos tab, and the other way round.

> A video takes a few minutes. Poll [GET /v1/listing-videos/:videoId](#get-video) or subscribe a [workspace webhook](https://buildonce.app/documentation/webhooks) to `listing_video.completed` and `listing_video.failed`.

## POST /v1/listings

### `POST /v1/listings`

Save a listing: either its details with photo URLs, or the agent's own listing page to read them from. Answers 201 with the listing.

Scope: `render:write`

| Name | Type | Description |
| --- | --- | --- |
| `link` | `URL` | The agent's own listing page (their website, brokerage or IDX page). Send it alone. Zillow and Realtor.com are refused. |
| `photoUrls` | `URL[] (up to 60)` | Public photo links in video order; the first one opens the video. Each is copied into the media library. A photo that cannot be fetched is skipped and counted in skippedPhotos. |
| `photos` | `{ assetId, label?, hidden?, motion? }[]` | Photos already in the media library, placed before photoUrls. |
| `headline, description, address` | `string` | The listing’s words. Leave out what you don’t know: nothing is ever made up. |
| `price, currency` | `number, "USD"` | Currency is an ISO 4217 code. |
| `beds, baths, area, areaUnit, yearBuilt` | `number, "sqft" \| "sqm"` | Shown on the details card. |
| `features` | `string[] (up to 20)` | Short highlights, e.g. "Pool". |

**cURL**

```bash
curl -X POST https://buildonce.app/v1/listings \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
```

**From a link**

```bash
curl -X POST https://buildonce.app/v1/listings \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "link": "https://www.youragency.com/listings/42-maple-street" }'
```

**Response (201)**

```json
{
  "listing": {
    "id": "lst_7kq2m9x4b1c8",
    "headline": "Bright family home near the park",
    "address": "42 Maple Street, Austin, TX 78704",
    "price": 625000,
    "currency": "USD",
    "beds": 4,
    "baths": 3,
    "photos": [
      { "assetId": "ast_…", "url": "https://…/front.jpg", "label": null, "hidden": false }
      /* … in video order */
    ],
    "source": "photos",
    "createdAt": "2026-11-25T09:15:00.000Z"
  },
  "skippedPhotos": 0
}
```

A link that can’t be read is 422 with the reason as the code: `SITE_REFUSES_READERS`, `READER_BLOCKED`, `FETCH_FAILED` or `NO_LISTING_DATA`. Nothing is saved; send the details and photo URLs instead.

## GET /v1/listings/:listingId

### `GET /v1/listings/:listingId`

One listing with its photos. GET /v1/listings lists them, newest first (page, limit).

Scope: `render:write`

**cURL**

```bash
curl https://buildonce.app/v1/listings/lst_7kq2m9x4b1c8 \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY"
```

## POST /v1/listing-videos/estimate

### `POST /v1/listing-videos/estimate`

Price a video before making it: render credits for the three files, AI credits for the script, voice and AI scenes. Same body as starting one; nothing is charged.

Scope: `render:write`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `listingId` | `lst_…` | yes | The listing to make the video from. |
| `style` | `"modern" \| "luxury" \| "clean"` | yes | The look: fonts, colours, transitions and pace. |
| `voice` | `boolean` | yes | A spoken voiceover written from the listing (checked for Fair Housing wording). |
| `captions` | `boolean` | yes | Word-by-word captions of the voice. |
| `aiScenes` | `number (0–6)` | yes | How many photos, from the first, get an AI camera move. One that fails falls back to a slow zoom and is refunded. |
| `statusLabel` | `string` | no | A chip on the opening, e.g. "Just Listed" or "Open House". |
| `voiceId` | `string` | no | A voice; the default voice when empty. |
| `musicTrackId` | `mtr_…` | no | A track from the music library; no music when empty. |

**Request body**

```json
{
  "listingId": "lst_7kq2m9x4b1c8",
  "style": "luxury",
  "statusLabel": "Just Listed",
  "voice": true,
  "captions": true,
  "musicTrackId": null,
  "aiScenes": 2
}
```

**Response**

```json
{
  "credits": 57,
  "aiCredits": 52,
  "seconds": 19,
  "breakdown": { "render": 57, "script": 2, "voiceover": 4, "aiScenes": 46, "aiSceneCount": 2 },
  "photoCount": 3,
  "hasAgentProfile": true
}
```

## POST /v1/listing-videos

### `POST /v1/listing-videos`

Start a video. Answers 202 at once with the video (status queued); the three files are made in the background.

Scope: `render:write`

**cURL**

```bash
curl -X POST https://buildonce.app/v1/listing-videos \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d ''
```

**Node**

```js
const headers = {
  Authorization: "Bearer fl_live_YOUR_API_KEY",
  "Content-Type": "application/json",
};
const start = await fetch("https://buildonce.app/v1/listing-videos", {
  method: "POST",
  headers,
  body: JSON.stringify({ listingId, style: "modern", voice: true, captions: true, aiScenes: 0 }),
});
const { data: video } = await start.json(); // 202: video.id is lvd_…

for (;;) {
  await new Promise((r) => setTimeout(r, 30000));
  const res = await fetch(`https://buildonce.app/v1/listing-videos/${video.id}`, { headers });
  const { data } = await res.json();
  if (data.status === "ready" || data.status === "failed") break;
}
```

Both credit pools are checked first: 402 when the workspace is short, and nothing starts. Each part is charged as it is made.

## GET /v1/listing-videos/:videoId

### `GET /v1/listing-videos/:videoId`

A video's status and, when ready, its three files. Poll it while the video is made — it is exempt from the plan's per-minute limit.

Scope: `render:write`

| Name | Type | Description |
| --- | --- | --- |
| `status` | `"queued" \| "making" \| "ready" \| "failed"` | ready: at least one file is ready. failed: none could be made; error says why. |
| `outputs[]` | `{ kind, status, url, error }` | One per file: vertical, wide, wide_unbranded. |
| `warnings` | `string[]` | Never fail a video: VOICEOVER_FAILED, MUSIC_FAILED, AI_SCENE_FALLBACK, SCRIPT_FALLBACK, NO_AGENT_PROFILE (the branded files have no agent card). |

**Response**

```json
{
  "id": "lvd_3n8w2k5r7t1q",
  "listingId": "lst_7kq2m9x4b1c8",
  "title": "42 Maple Street, Austin, TX 78704",
  "style": "luxury",
  "status": "ready",
  "outputs": [
    { "kind": "vertical", "status": "ready", "renderId": "rnd_…", "url": "https://…/vertical.mp4", "error": null },
    { "kind": "wide", "status": "ready", "renderId": "rnd_…", "url": "https://…/wide.mp4", "error": null },
    { "kind": "wide_unbranded", "status": "ready", "renderId": "rnd_…", "url": "https://…/mls.mp4", "error": null }
  ],
  "warnings": [],
  "error": null,
  "thumbnailUrl": "https://…/front.jpg",
  "createdAt": "2026-11-25T09:16:00.000Z",
  "finishedAt": "2026-11-25T09:20:41.000Z"
}
```

## GET /v1/listing-videos

### `GET /v1/listing-videos`

The workspace's listing videos, newest first (page, limit).

Scope: `render:write`

**cURL**

```bash
curl "https://buildonce.app/v1/listing-videos?limit=10" \
  -H "Authorization: Bearer fl_live_YOUR_API_KEY"
```

## Webhooks

`listing_video.completed` is sent when a video is ready, `listing_video.failed` when it could not be made. The data is the video, the same shape as [GET /v1/listing-videos/:videoId](#get-video).

**Payload**

```json
{
  "type": "listing_video.completed",
  "data": {
    "id": "lvd_3n8w2k5r7t1q",
    "listingId": "lst_7kq2m9x4b1c8",
    "status": "ready",
    "outputs": [ /* the three files, as in GET /v1/listing-videos/:videoId */ ],
    "warnings": []
  }
}
```

## Errors

| Name | Type | Description |
| --- | --- | --- |
| `400 LISTING_LINK_WITH_DETAILS` | `create listing` | Send either a link or the details and photos, not both. |
| `422 SITE_REFUSES_READERS / READER_BLOCKED / FETCH_FAILED / NO_LISTING_DATA` | `create listing` | The link could not be read; nothing was saved. |
| `404 LISTING_NOT_FOUND` | `get, estimate, start` | No listing with that id in this workspace. |
| `400 LISTING_HAS_NO_PHOTOS` | `estimate, start` | The listing has no photo that can be used. |
| `402 INSUFFICIENT_CREDITS` | `start` | Not enough render or AI credits. Nothing started. |
| `503 LISTING_VIDEOS_UNAVAILABLE / QUEUE_UNAVAILABLE` | `start` | Videos can’t be started right now. Try again; nothing was charged. |
| `404 LISTING_VIDEO_NOT_FOUND` | `get video` | No video with that id in this workspace. |
