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

# Installation

> Install and configure the official Svelte SDK for Markpdf.

# Installation

Use `@markpdf/svelte` when you want a Svelte store with conversion state, progress, result, and error handling.

## Install

<CodeGroup>
  ```bash npm theme={null}
  npm install @markpdf/svelte
  ```

  ```bash pnpm theme={null}
  pnpm add @markpdf/svelte
  ```

  ```bash yarn theme={null}
  yarn add @markpdf/svelte
  ```

  ```bash bun theme={null}
  bun add @markpdf/svelte
  ```
</CodeGroup>

## Configure the client and store

```svelte theme={null}
<script lang="ts">
  import { MarkpdfClient, createConvertStore } from "@markpdf/svelte";

  const client = new MarkpdfClient({ apiKey: "YOUR_API_KEY" });
  const conversion = createConvertStore(client);
</script>
```

<Warning>
  A key used directly in Svelte client code is visible in the browser. For public SvelteKit apps, call a server route and keep the private API key on the server.
</Warning>

## API endpoint

The production API endpoint is:

```text theme={null}
https://api.markpdf.tech
```

## Next step

Continue with [Quickstart](/docs/sdks/svelte/quickstart).
