Chromiumly needs either a hosted API key or a self-hosted endpoint. Environment variables work in all runtimes (Node, Deno, Bun). On Node.js you can also use the config library or Chromiumly.configure().
Hosted API
When using the hosted API at https://api.chromiumly.dev, set your API key. You do not set GOTENBERG_ENDPOINT; the library uses the hosted URL automatically.
Environment variable
Code
Self-hosted endpoint
When running Gotenberg yourself (e.g. via Docker), set the base URL of the Gotenberg API.
dotenv (environment)
config library
Code
Resolution order
The library resolves the endpoint as follows:
- If you called
Chromiumly.configure() with endpoint or apiKey, that is used.
- Otherwise it reads from the environment (e.g.
GOTENBERG_ENDPOINT, CHROMIUMLY_API_KEY) or from the config library.
- If an API key is set (and no endpoint), the endpoint becomes
https://api.chromiumly.dev.
If neither an endpoint nor an API key is configured, conversion calls will
throw when they try to resolve the endpoint.
For authentication (basic auth, custom headers), see Authentication.