> ## Documentation Index
> Fetch the complete documentation index at: https://docs.demomatic.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Generating Demos

> Generate AI-powered demo videos from the dashboard or via the API, with optional personalization for specific recipients.

Demomatic gives you two ways to generate a demo video: interactively through the dashboard, or programmatically through the API.

## From the dashboard

Use the chat interface or the playground to generate demos without writing any code.

<Steps>
  <Step title="Open the playground or chat">
    Navigate to your domain in the dashboard and open the **Playground** tab, or start a new chat session.
  </Step>

  <Step title="Write your prompt">
    Describe the feature or workflow you want to demo. Be specific — include the feature name, the user journey, and any context that helps the AI focus on the right screens.
  </Step>

  <Step title="Configure generation options">
    Choose a font, music track, voice, background, and whether to include captions and B-roll. These settings control the look and feel of the generated video.
  </Step>

  <Step title="Generate">
    Submit your request. Demomatic queues the job and walks through 8 generation steps. You can track progress in real time.
  </Step>

  <Step title="Find your video in the library">
    Once generation completes, the video is saved to your library under the domain it was generated for.
  </Step>
</Steps>

## Via the API

Use the API to trigger demo generation programmatically — for example, from CI/CD pipelines or internal tooling.

<Note>
  API access requires a **starter** or **growth** plan. See [API Keys](/guides/api-keys) for setup instructions.
</Note>

Send a `POST` request to generate a video for a specific domain:

```bash theme={null}
curl -X POST https://api.demomatic.tech/v1/videos/42 \
  -H "Authorization: Bearer dm_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Show how to create and assign a task in the project board",
    "font": "Poppins",
    "music": "observer",
    "captions": true,
    "bRoll": true
  }'
```

### VideoRequest fields

| Field            | Type                      | Required | Description                                                                                                               |
| ---------------- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `prompt`         | `string`                  | No       | Natural-language description of what to demo.                                                                             |
| `font`           | `string`                  | Yes      | Font for on-screen text. Options: `"Inter"`, `"OpenSans"`, `"Playwrite"`, `"Poppins"`, `"Roboto"`.                        |
| `music`          | `string`                  | No       | Background music track. Options: `"observer"`, `"lawrence"`, `"all_i_am"`, `"lust"`, `"denied_access"`, `"75_and_lower"`. |
| `voiceId`        | `string \| null`          | No       | Voice model for narration. Options: `"ash"`, `"onyx"`, `"nova"`, `"fable"`.                                               |
| `backgroundId`   | `string \| null`          | No       | Background style identifier.                                                                                              |
| `captions`       | `boolean`                 | Yes      | Include captions in the video.                                                                                            |
| `bRoll`          | `boolean`                 | Yes      | Include B-roll footage.                                                                                                   |
| `text_animation` | `string \| null`          | No       | Text animation style: `"none"`, `"slide-in"`, `"typewriter"`, or `"focus"`.                                               |
| `contacts`       | `VideoRecipientContact[]` | No       | Recipient contacts for personalization.                                                                                   |

## Writing effective prompts

A well-written prompt leads to a more focused, higher-quality demo. Keep these tips in mind:

<Tip>
  Describe the user journey, not just the feature. Instead of "show the analytics page", write "show how a sales manager reviews monthly revenue trends and exports a report."
</Tip>

**Be specific about the workflow:**

* Include the starting point (e.g. "starting from the dashboard")
* Name the feature or screen (e.g. "the kanban board", "the billing settings")
* Describe the end goal (e.g. "and completes checkout")

**Example prompts:**

```text theme={null}
Show how to invite a team member, assign them a role, and send the invitation from the Settings > Team page.
```

```text theme={null}
Starting from the home dashboard, demonstrate how a user creates a new project, adds a description, and sets a due date.
```

```text theme={null}
Walk through the onboarding flow for a new user signing up with Google and completing their profile.
```

## Personalizing demos with recipient contacts

You can pass recipient information to personalize the narration and on-screen text for specific viewers. Demomatic injects the contact context into the prompt automatically.

Pass a `contacts` array in your request:

```json theme={null}
{
  "prompt": "Show how to connect your CRM and sync contacts",
  "font": "Poppins",
  "captions": true,
  "bRoll": false,
  "contacts": [
    {
      "name": "Sarah Kim",
      "email": "sarah@example.com",
      "jobTitle": "VP of Sales",
      "company": "Acme Corp",
      "industry": "SaaS",
      "additionalNotes": "Focused on reducing manual data entry for her team"
    }
  ]
}
```

### VideoRecipientContact fields

| Field             | Type     | Description                                     |
| ----------------- | -------- | ----------------------------------------------- |
| `name`            | `string` | Recipient's full name.                          |
| `email`           | `string` | Recipient's email address.                      |
| `jobTitle`        | `string` | Recipient's job title.                          |
| `company`         | `string` | Recipient's company name.                       |
| `industry`        | `string` | Recipient's industry.                           |
| `additionalNotes` | `string` | Any extra context to help personalize the demo. |

You can also pull contacts directly from a connected CRM. See [CRM Integrations](/guides/crm-integrations).

## Generation steps

Once queued, your video job moves through 8 steps. Use these step names to display progress in your own UI:

| Step | Description                               |
| ---- | ----------------------------------------- |
| 1    | Researching domain context                |
| 2    | Authenticating                            |
| 3    | Determining actions and recording         |
| 4    | Analyzing and grouping actions into flows |
| 5    | Trimming recorded video                   |
| 6    | Preparing video segments                  |
| 7    | Generating narration and adding effects   |
| 8    | Storing video in library                  |

When step 8 completes, the video is saved and available in your library.
