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

# Chromiumly

> Configuration API: Chromiumly.configure() and endpoint resolution.

Static configuration class. Call `Chromiumly.configure()` once to set the Gotenberg endpoint or hosted API key and optional auth.

## configure(config)

Sets endpoint, API key, basic auth, and custom headers. All keys are optional.

```typescript theme={null}
Chromiumly.configure({
  endpoint?: string;       // e.g. "http://localhost:3000"
  username?: string;        // basic auth
  password?: string;       // basic auth
  apiKey?: string;        // hosted API; sets endpoint to https://api.chromiumly.dev if endpoint not set
  customHttpHeaders?: Record<string, string>;
}): void
```

* If only `apiKey` is set, the library uses `https://api.chromiumly.dev` as the endpoint.
* Environment variables (`GOTENBERG_ENDPOINT`, `CHROMIUMLY_API_KEY`, `GOTENBERG_API_BASIC_AUTH_USERNAME`, `GOTENBERG_API_BASIC_AUTH_PASSWORD`) are used when no value was set via `configure()`.

## Static constants (internal use)

* `Chromiumly.CHROMIUM_CONVERT_PATH` — `'forms/chromium/convert'`
* `Chromiumly.CHROMIUM_SCREENSHOT_PATH` — `'forms/chromium/screenshot'`
* `Chromiumly.PDF_ENGINES_PATH` — `'forms/pdfengines'`
* `Chromiumly.LIBRE_OFFICE_PATH` — `'forms/libreoffice'`
* `Chromiumly.TEMPLATES_PATH` — `'/templates'` (hosted API)
* `Chromiumly.CHROMIUM_ROUTES`, `PDF_ENGINE_ROUTES`, `LIBRE_OFFICE_ROUTES`, `SYSTEM_ROUTES` — route names for each engine

Conversion and screenshot classes call `Chromiumly.getGotenbergEndpoint()` (and auth getters) internally; you do not need to call these directly unless you are extending the library.

## Hosted templates

`Templates.generate()` uses the configured endpoint and requires an API key. If no `endpoint` is set and `apiKey` is provided, Chromiumly points to `https://api.chromiumly.dev`.
