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

# Quickstart

> Minimal setup to convert a URL to PDF with Chromiumly.

Run a URL-to-PDF conversion using the hosted API or a local Gotenberg instance.

## Prerequisites

* A supported runtime: **Node.js** 18+, **Deno** 1.x, or **Bun**
* For **hosted API**: an API key from [chromiumly.dev](https://chromiumly.dev)
* For **self-hosted**: [Docker](https://www.docker.com/) and a running [Gotenberg](https://gotenberg.dev/) container (e.g. `docker run --rm -p 3000:3000 gotenberg/gotenberg:8`)

## Step 1: Install

<CodeGroup>
  ```bash npm theme={null}
  npm install chromiumly
  ```

  ```bash yarn theme={null}
  yarn add chromiumly
  ```

  ```bash bun theme={null}
  bun add chromiumly
  ```

  ```bash deno theme={null}
  deno add npm:chromiumly
  ```
</CodeGroup>

## Step 2: Configure (pick one)

**Hosted API** — set your API key so requests go to `https://api.chromiumly.dev`:

```bash theme={null}
export CHROMIUMLY_API_KEY=your-api-key
```

Or in code:

```typescript theme={null}
import { Chromiumly } from "chromiumly";

Chromiumly.configure({ apiKey: "your-api-key" });
```

**Self-hosted** — point to your Gotenberg URL:

```bash theme={null}
export GOTENBERG_ENDPOINT=http://localhost:3000
```

Or in code:

```typescript theme={null}
import { Chromiumly } from "chromiumly";

Chromiumly.configure({ endpoint: "http://localhost:3000" });
```

## Step 3: Convert a URL to PDF

```typescript theme={null}
import { UrlConverter } from "chromiumly";

async function run() {
  const urlConverter = new UrlConverter();
  const buffer = await urlConverter.convert({
    url: "https://www.example.com/",
  });
  // Use buffer: write to disk, send in HTTP response, etc.
}

run();
```

The `buffer` contains the PDF bytes (a `Buffer` in Node, or the runtime’s equivalent). Write it to a file, pipe it to a response, or pass it to [PDFEngines.generate](/reference/pdf-engines) for a convenience helper.

## Next steps

* [Installation](/installation) — package managers and prerequisites
* [Configuration](/configuration) — dotenv, config lib, and `Chromiumly.configure()`
* [Chromium](/chromium/overview) — HTML and Markdown conversion, screenshots, and options
