> ## 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

```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
```

## 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](https://docs.chromiumly.dev/v6/reference/pdf-engines.md) for a convenience helper.

## Next steps

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.