---
title: Your first Slidev integration
description: Connect a Slidev deck to your Inalia talk and display a live poll.
---

Use the **Getting to know the room** talk and poll from [Your first interactive talk](/docs/getting-started/first-talk). By the end, an audience response will update the poll in your slides.

## Before you start

- Have an existing [Slidev](https://sli.dev) project and access to its files.
- Use Slidev 0.49.29 or newer, as declared by the add-on's current compatibility requirement.
- Have an eligible, verified Inalia account with access to [Tokens](/profile/tokens).
- Use a trusted local presentation environment with internet access.

**Security warning:** the current add-on uses `VITE_INALIA_API_KEY` in browser-side requests. Treat anyone who can access the served deck or its JavaScript as potentially able to obtain the token. A gitignored `.env` prevents committing that file, but does not hide the token in served or built JavaScript. Do not publicly host a live-configured deck. Use a dedicated, least-privilege token and delete it after use. For sharing afterward, follow [Publish slides with saved results](/docs/slidev/publishing).

## 1. Create a dedicated token

Open [Tokens](/profile/tokens), enter a descriptive name such as **Practice Slidev deck**, and create a token with **read** permission.

Read is enough to retrieve your talk and questions when you run the talk from the app. Only add **write** if you need integration controls that run a talk or change demo mode.

Copy the token when it is shown and store it securely. Do not paste it into slides, screenshots, issues, or source control.

## 2. Install and configure

In your Slidev project's directory:

```sh
pnpm add slidev-addon-inalia
```

Add the add-on to the existing frontmatter at the top of `slides.md`. Keep any other add-ons and settings:

```yaml
---
addons:
  - slidev-addon-inalia
---
```

Merge these entries into the project's `.env`, replacing the placeholders:

```dotenv
VITE_INALIA_API_KEY=YOUR_DEDICATED_TOKEN
VITE_INALIA_TALK_NUMBER=YOUR_TALK_NUMBER
```

Use the talk's number within your account, not the title or an internal database ID. Your workspace URL contains the talk number. The add-on automatically retrieves your username from the API token.

Ensure `.env` is excluded by your project's `.gitignore`. Restart Slidev using your project's usual development command after changing environment settings.

### Optional setup CLI

Instead of the manual setup, the add-on offers:

```sh
npx slidev-addon-inalia
```

Run it inside the Slidev project containing `slides.md`. It prompts for your talk number (currently labeled “talk ID”) and token, installs the package, and updates frontmatter.

The CLI merges its settings into `.env`, preserving unrelated entries and comments. Review the resulting files. If dependency installation fails, install the package manually. Use [Tokens](/profile/tokens) even if an older CLI message shows a different settings URL.

### Choose or switch a talk interactively

To avoid looking up a talk number, run this inside your Slidev project with Node.js 20.12 or newer:

```sh
npx slidev-addon-inalia select-talk
```

The command reuses `VITE_INALIA_API_KEY` from your shell environment or the project's `.env` (shell values take precedence), prompting if the token is missing. It does not read `~/.inaliarc`. Use a dedicated token with **read** permission.

Choose from all talks belonging to that account, listed by title and talk number, newest number first. The command saves the selected number as `VITE_INALIA_TALK_NUMBER`, along with the token, in `.env`. Other entries and comments are preserved. Restart Slidev afterward.

Cancelling, a failed request, or an empty talk list does not change `.env`. If no talks exist, create one in Inalia and run the command again. If listing fails, check your endpoint, token's read permission, and verified account access. Self-hosted servers must provide `GET /api/{username}/talks`; update the server if that endpoint is missing.

This command only configures the connection; it does not install the add-on, edit `slides.md`, or run a talk. Complete the installation and frontmatter steps above first, or use the setup CLI. Keep `.env` gitignored and follow the token security warning above.

## 3. Add the poll to your slides

In Inalia's talk question list, open your poll's output menu and choose **Slidev**. Copy the generated HTML into a slide in `slides.md`.

For an unfinished talk, it looks like this:

```vue
<Inalia questionId="1" />
```

Use your generated snippet, not the example number. The question number is scoped to the configured talk.

If you finished the tutorial talk, choose **Run** again before copying live output. Finishing changes newly generated output to static snapshots.

You should see the poll's wording and chart in Slidev. If the component is unknown, check the install and deck frontmatter, then restart Slidev.

## 4. Receive an answer

1. Choose **Run** in the Inalia talk workspace.
2. Confirm demo mode is off if you want to save this answer.
3. Open the question's **Audience short link** on another device, or scan the QR code shown with the live question.
4. Submit a choice while the poll slide is visible.

The chart should update. You can also confirm the saved answer in Inalia's question workspace. A working static chart alone does not confirm your live connection.

If it does not update, see [Troubleshooting](/docs/help/troubleshooting) and the [connection settings](/docs/slidev/reference#connection-settings).

## 5. Add opening and feedback slides

Add these as separate slides:

```md
---
layout: inalia-overview
---

---
layout: inalia-feedback
---
```

The overview helps attendees join. Enable **Feedback** in Inalia and keep the talk running through feedback collection; the closing slide does not override the talk's status.

## Next steps

- [Rehearse safely before presenting](/docs/presenting/rehearsal).
- [Look up components, configuration, and customization](/docs/slidev/reference).
- [Publish a token-free deck with saved results](/docs/slidev/publishing).
