> ## 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 React SDK for Markpdf.

# Installation

Use `@markpdf/react` when you want React hooks and upload progress in a controlled client-side app. For public production apps, prefer calling your own backend so the private API key stays server-side.

## Install

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

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

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

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

## Configure the provider

```tsx theme={null}
import { MarkpdfProvider } from "@markpdf/react";

export function App() {
  return (
    <MarkpdfProvider apiKey="YOUR_API_KEY">
      <YourUploader />
    </MarkpdfProvider>
  );
}
```

<Warning>
  A key used directly in React is visible in the browser. Use this only for prototypes, internal tools, or restricted public keys. For Next.js, use `@markpdf/nextjs`.
</Warning>

## API endpoint

The production API endpoint is:

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

## Next step

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