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

# TypeScript SDK

> Install and use the official @kmerhosting/sdk package.

The official SDK is published from the `KmerHosting/kmerhosting_sdk` monorepo.

## Install

```bash theme={null}
npm install @kmerhosting/sdk
```

## Create a client

```ts theme={null}
import { KmerHostingClient } from "@kmerhosting/sdk"

const client = new KmerHostingClient({
  apiKey: process.env.KMERHOSTING_API_KEY!,
})

const account = await client.account.get()
const services = await client.services.list()
```

<Frame caption="Run SDK examples with a test key and sanitized output.">
  <img src="https://mintcdn.com/kmerhosting-a736a8a9/qmzUGdL1AajWuhXn/images/screenshots/sdk-terminal.png?fit=max&auto=format&n=qmzUGdL1AajWuhXn&q=85&s=5ee1e2f9ff798b254276e457ea576acc" alt="Run SDK examples with a test key and sanitized output." width="1600" height="900" data-path="images/screenshots/sdk-terminal.png" />
</Frame>

## Available client areas

* `account.get()`
* `services.list()`, `services.get()`, and `services.setAutoRenew()`
* `domains.list()`
* `invoices.list()`
* `orders.list()`
* `notifications.list()`, `update()`, and `delete()`
* `aiAgent.stream()` and conversation operations

## Error handling

Catch `KmerHostingApiError` and inspect its HTTP status, code, and message. Do not log the API key or complete sensitive response data.
