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

# Client

> HoneyHive TypeScript Data Plane SDK client class reference

## Constructor

> **new Client**(`options`: `ClientConfig` = `{}`): `Client`

Configuration options for the HoneyHive API client. They extend the options
from openapi-fetch, but replace 'baseUrl' with 'dataPlaneUrl' so the name is
unambiguous now that the SDK can also talk to the HoneyHive control plane.

## Properties

### ~~apiKey?~~

> `optional` **apiKey?**: `string`

#### Deprecated

Use `projectApiKey` instead. The old name will be removed in
the next major version. Setting this option still works but logs a
deprecation warning to stderr on client construction.

***

### dataPlaneApiKey?

> `optional` **dataPlaneApiKey?**: `string`

A fine-grained data plane API key (`hh_fgdp_…`), the credential for the
operations that name a project in their path. Defaults to the
`HH_DATA_PLANE_API_KEY` environment variable. Every other operation
behaves as it does on a client without it.

A value that is set but is not a fine-grained data plane key throws at
construction. Without a data plane key, those operations throw a
`MissingApiKeyError` before sending, whatever other key is configured,
because they refuse the project key. A caller-supplied `Authorization`
header or middleware is sent in its place.

***

### dataPlaneUrl?

> `optional` **dataPlaneUrl?**: `string`

***

### headers?

> `optional` **headers?**: `Record`\<`string`, `string`>

***

### ingestionApiKey?

> `optional` **ingestionApiKey?**: `string`

An ingestion API key (`hh_ingst_…`), the credential for sending traces
and events: creating sessions and writing events. Defaults to the
`HH_INGESTION_API_KEY` environment variable. A process that only sends
traces and events holds this key alone; every other operation then
throws a `MissingApiKeyError`, as it does on a client with no project
API key configured.

A value that is set but is not an ingestion key throws at construction.
For compatibility, a client with a project API key and no ingestion key
sends the project key on the ingestion operations too.

***

### middleware?

> `optional` **middleware?**: `Middleware`\[]

***

### projectApiKey?

> `optional` **projectApiKey?**: `string`

***

### ~~serverUrl?~~

> `optional` **serverUrl?**: `string`

#### Deprecated

Use `dataPlaneUrl` instead. The old name will be removed in
the next major version. Setting this option still works but logs a
deprecation warning to stderr on client construction.

***

### verbose?

> `optional` **verbose?**: `boolean`

When true, logs the resolved API URL, the masked API keys, and the SDK
package + version via `console.error` on client construction (stderr in
Node, devtools in the browser). Useful for confirming which environment,
credentials, and SDK build the client is configured with. Defaults to
true when the `HH_VERBOSE` environment variable is set to `'true'`
(case-insensitive).

***


## Related topics

- [Client](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript/ref/classes/Client.md)
- [Clients](https://docs.honeyhive.ai/v2/changelog/clients.md)
- [Client-Side Evaluators](https://docs.honeyhive.ai/v2/evaluators/client_side.md)


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