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

# Environment Variables

> Configure the HoneyHive TypeScript Control Plane client with environment variables for fine-grained API keys, control plane URLs, and verbose logging.

The SDK reads the following environment variables. Each can be overridden by the equivalent `Client` constructor option, which takes precedence over its environment variable.

## Configuration

| Variable                   | Description                                                                                                                      | Default                                                  | Override option   |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ----------------- |
| `HH_CONTROL_PLANE_API_KEY` | Fine-grained control-plane API key (`hh_fgcp_…`) for authenticating with the HoneyHive Control Plane.                            | None (required unless middleware handles authentication) | `apiKey`          |
| `HH_CONTROL_PLANE_URL`     | Base URL for the Control Plane API.                                                                                              | `https://api.cp.us.honeyhive.ai`                         | `controlPlaneUrl` |
| `HH_VERBOSE`               | Set to `"true"` (case-insensitive) to log the resolved control plane URL, a masked API key, and the SDK version on construction. | `false`                                                  | `verbose`         |

An empty string is treated the same as unset. `HH_CONTROL_PLANE_API_KEY= node script.js` therefore fails construction exactly as an unset key would, and an empty `HH_CONTROL_PLANE_URL` falls back to the default.

<Note>
  The API key is only required when no middleware is supplied. A client that authenticates entirely through [custom middleware](/v2/control-plane-sdk-reference/typescript#custom-middleware) can be constructed with no key at all.
</Note>

<Note>
  These names are distinct from the data plane SDK's `HH_PROJECT_API_KEY` and `HH_DATA_PLANE_URL` (see [its environment variables](/v2/sdk-reference/typescript/environment-variables)), so both clients can be configured in the same process without collision. `HH_VERBOSE` is the one variable they share.
</Note>
