---
title: "Client configuration"
description: "Configure the Admin Base URL, Management Key provider, Fetch implementation, and default headers."
---

> Documentation Index
> Fetch the complete documentation index at: https://nexus.microvoid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Client configuration

## Required options

```ts
import { NexusAdminClient } from '@nexus/sdk-typescript';

const nexus = new NexusAdminClient({
  baseUrl: 'https://nexus.microvoid.io',
  managementKey: () => process.env.NEXUS_MANAGEMENT_KEY,
});
```

`baseUrl` is required and trailing slashes are normalized. `managementKey` can be a string or a synchronous/asynchronous provider, which lets an application retrieve a rotated credential per request.

The SDK adds `Authorization: Bearer <management-key>` only when the request does not already contain Authorization. Keep Management Keys in the application backend; never send one to an end-user client or the Gateway.

## Optional Fetch and headers

```ts
const nexus = new NexusAdminClient({
  baseUrl: 'http://localhost:3000',
  managementKey: process.env.NEXUS_MANAGEMENT_KEY,
  fetch: instrumentedFetch,
  headers: { 'user-agent': 'my-service/1.0' },
});
```

The transport uses Web Standard `Request`, `Response`, `Headers`, and `AbortSignal`. Default headers can be overridden per request. Do not place Provider Secrets or Inference Keys in defaults.

## Per-request control

Every generated method accepts `AdminRequestOptions` with optional `headers`, `idempotencyKey`, and `signal`. The SDK performs no retries automatically; retry policy remains caller-owned.

Source: https://nexus.microvoid.io/management-sdk/client-configuration/index.mdx
