Listings with an agent on camera feel more personal than a photo carousel, but most agents will not film a new video for every property, and the ones who do rarely keep it up. If you run a real estate platform, CRM or listing tool, you already have the structured data for every listing. The missing piece is the agent's face and voice.
This post walks through building AI listing videos: one short recording per agent, a script generated from listing fields, and a final video that combines the agent with property photos. It also covers the guardrails that matter in housing specifically.
The workflow in one picture
The pipeline has four stages, and only one of them involves the avatar API:
- Onboard the agent once. The agent records a 30–60 second clip on their phone. You create an avatar from it.
- Build the script from listing data. Address, price, bedrooms, standout features, open house time.
- Generate the avatar video. The agent presents the listing in their own cloned voice.
- Composite. Place the avatar video over or next to the listing photos and publish.
Stages 2 and 4 are your product. That is where you differentiate: better templates, better layouts, brokerage branding.
Onboarding the agent
Agents are busy, so make the recording step hard to get wrong. Our guide on recording a source clip has the full checklist; the short version is face the camera, even light, a quiet room, and talk naturally for the whole clip.
The source clip must be 10–120 seconds. If it contains at least 10 seconds of speech, PitchTwin clones the voice from the clip itself. A separate 1–2 minute voice sample gives the best clone if the agent is willing to read one. Phone footage is fine: rotation, HEVC and frame rate are normalized on input.
curl -X POST https://pitchtwin.ai/api/v1/avatars \
-H "Authorization: Bearer pt_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Jordan Lee - Northside Realty",
"video_url": "upload:file_abc123"
}'
The response is 202 with status processing. Poll GET /avatars/:id until it is ready, then store the avatar ID on the agent's profile.
The avatar is built from the agent's real video and keeps that footage, so it looks 1:1 like them. That matters in real estate: buyers who watch the video and then meet the agent at a showing should see the same person, not a smoothed-over version. The avatar from video page explains the approach.
Every person in an avatar has to have agreed to it under PitchTwin's Terms. In your product, record the agent's consent explicitly, and if an agent leaves the brokerage, delete their avatar with DELETE /avatars/:id, which also removes the cloned voice.
Turning listing data into a script
Use a template, not free-form generation. A template keeps every claim tied to a field you actually have:
function listingScript(l: Listing, agent: Agent) {
const script = [
{ text: `Hi, I'm ${agent.firstName} with ${agent.brokerage}.`, pause_after_ms: 300 },
{ text: `This is ${l.streetAddress} in ${l.neighborhood}: ${l.beds} bedrooms, ${l.baths} baths, about ${l.sqft.toLocaleString("en-US")} square feet.`, pause_after_ms: 500 },
];
for (const f of l.highlights.slice(0, 3)) {
script.push({ text: f, pause_after_ms: 300 });
}
if (l.openHouse) {
script.push({ text: `Come see it at the open house on ${l.openHouse}.`, pause_after_ms: 300 });
}
script.push({ text: "Details and photos are below. Reach out with any questions." });
return script;
}
Write prices, square footage and dates the way they should be spoken. "$1,250,000" and "1.25M" can be read differently, so it is safer to format numbers in words or a consistent spoken style before sending. Our post on writing scripts for AI avatars covers pauses and pacing.
If you use an LLM to write the highlights, constrain it to the listing's own fields and the agent's notes, and show the agent the final script before generating. A model that invents a renovated kitchen creates a real problem for the agent.
Keeping scripts fair
Housing advertising has rules about what an ad can say. In the US, the Fair Housing Act makes it unlawful to publish a housing advertisement that indicates a preference, limitation or discrimination based on race, color, religion, sex, handicap, familial status or national origin (42 U.S.C. 3604(c)). HUD's regulation lists, among prohibited practices, using words, phrases, photographs or illustrations that convey a dwelling is or is not available to a particular group (24 CFR 100.75). Other countries and states have their own rules.
This is not legal advice, but a few product decisions follow naturally:
- Describe the property, not the buyer. Templates and LLM prompts should talk about rooms, features, location facts and amenities, never about who the home is "perfect for".
- Run a check on generated text. Flag phrases that describe people rather than the property and send them to the agent for review before generation.
- Do not vary content by audience. If you generate several versions of a listing video, base the variation on the listing and the channel, not on characteristics of who will see it.
- Let brokerages review templates. Their compliance staff will know the local rules better than a generic default.
Because the generated speech follows your script exactly, the script is the control point. Get it right there and the video follows.
Generating and compositing
Send the script to POST /generations with a webhook:
{
"avatar_id": "av_3f9c1e7a2b4d6e80",
"script": [
{ "text": "Hi, I'm Jordan with Northside Realty.", "pause_after_ms": 300 },
{ "text": "This is 14 Alder Lane: three bedrooms, two baths.", "pause_after_ms": 500 },
{ "text": "Details and photos are below." }
],
"voice": { "speed": 1.0 },
"webhook_url": "https://app.example.com/webhooks/pitchtwin"
}
When the generation.succeeded event arrives, verify the PitchTwin-Signature header, then download the MP4 right away: the video_url is a signed link that expires after 24 hours. The webhooks docs show the signature format.
PitchTwin returns the agent on their original background, so the layout is up to you. A simple picture-in-picture over a listing photo with ffmpeg:
ffmpeg -loop 1 -i photo.jpg -i avatar.mp4 \
-filter_complex "[0:v]scale=1920:1080:force_original_aspect_ratio=increase,crop=1920:1080[bg];[1:v]scale=-2:420[pip];[bg][pip]overlay=W-w-40:H-h-40:shortest=1[v]" \
-map "[v]" -map 1:a -c:v libx264 -pix_fmt yuv420p -c:a aac listing.mp4
For a slideshow, build the photo track first and overlay the avatar on it. The words array in the generation gives word-level timings, so you can switch photos when the agent mentions "kitchen" or "backyard", and burn in captions for viewers on mute.
What it costs
A 45-second listing video voiced in the agent's cloned voice uses 67.5 tokens (1.5 tokens per second). On the Scale pack ($149 for 12,000 tokens), that is about $0.84 per video. Tokens are prepaid and never expire, there are no seats, and failed generations are refunded automatically. The pricing page has the other packs.
Videos are white-label, with no watermark and no PitchTwin branding, so they can carry the brokerage's brand alone.
Try it
Create a free account at /signup to get 60 tokens with no card. Upload an agent clip in the dashboard and use the Playground to generate a test listing video before you write any code.