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

# Quickstart

Generate and embed your first LittleDemo in a few minutes.

This path uses the CLI because it handles login, project creation, polling, and embed output for you.

**Install the CLI**

```bash
npm install -g @littledemo/cli
littledemo --version
```

  **Sign in**

```bash
littledemo login
```

The command opens a browser page where you approve the device code.

  **Create a demo**

```bash
littledemo init
```

The wizard creates a project, asks what to show, starts generation, and waits for the final demo URL.

  **Embed the result**

```html
<iframe
  src="https://littledemo.com/embed/demo_abc123"
  width="100%"
  height="400"
  frameborder="0"
  allow="autoplay; fullscreen"
  allowfullscreen
></iframe>
```

## Same flow with the API

Use this when you already have an API key and want to wire LittleDemo into another system.

```bash curl
curl -X POST https://littledemo.com/api/v1/projects \
  -H "Authorization: Bearer ld_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme App",
    "url": "https://acme.com",
    "viewport": "desktop"
  }'
```

```javascript node
const project = await fetch("https://littledemo.com/api/v1/projects", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LITTLEDEMO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Acme App",
    url: "https://acme.com",
    viewport: "desktop",
  }),
}).then((res) => res.json());
```

Then start a demo:

```bash curl
curl -X POST https://littledemo.com/api/v1/demos \
  -H "Authorization: Bearer ld_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc123",
    "prompt": "Show creating a workspace and inviting a teammate",
    "duration_target": "10s",
    "presentation": {
      "recordingTemplate": { "id": "auto" }
    }
  }'
```

```javascript node
const demo = await fetch("https://littledemo.com/api/v1/demos", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LITTLEDEMO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    project_id: "proj_abc123",
    prompt: "Show creating a workspace and inviting a teammate",
    duration_target: "10s",
    presentation: {
      recordingTemplate: { id: "auto" },
    },
  }),
}).then((res) => res.json());
```

## Next useful pages

**[Prompting](/guides/prompting)**

Write prompts that produce cleaner, shorter recordings.
  **[Recording templates](/guides/choose-a-recording-template)**

Use auto mode or pick a specific recording style.
  **[Embed overview](/embed/overview)**

Pick the right embed method for your site.
  **[API overview](/api/overview)**

Build the same workflow from your backend.