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

> ## Agent Instructions
> For account actions, read https://ohmyho.st/skills/ohmyhost-get-started/SKILL.md and use the authenticated ohmyho.st CLI or local product MCP. Mintlify search only reads documentation. Preserve the customer’s selected project, environment and authentication provider.

# TypeScript SDK

> Call the generated REST client from a trusted server or automation process.

```sh theme={null}
npm install https://ohmyho.st/releases/0.1.28/ohmyhost-sdk-ts-0.1.28.tgz
```

[Release manifest and checksums](https://ohmyho.st/releases/0.1.28/manifest.json)

For the npm package used in the example below, install:

```sh theme={null}
npm install @amerged/ohmyhost-sdk
```

Load `OHMYHOST_TOKEN` from a private environment file or your secret store, then create an explicit client:

```ts theme={null}
import { createClient, listProjects } from "@amerged/ohmyhost-sdk";

const token = process.env.OHMYHOST_TOKEN;
if (!token) throw new Error("OHMYHOST_TOKEN is required");
const client = createClient({
  baseUrl: "https://app.ohmyho.st",
  headers: { Authorization: `Bearer ${token}` },
  throwOnError: true,
});
const page = await listProjects({ limit: 20 }, { client });
console.log(page.items, page.next_cursor);
```

Use the generated operation's parameter types for path, query, headers and body, then pass `{ client }` as the last argument. Each call returns its response body directly, without a `.data` wrapper. With `throwOnError: true`, an API error throws its problem object: act on `code`, `retryable` and `suggested_action`. With `throwOnError: false`, a failed call resolves to `undefined`. Keep this token outside browser bundles and application source. A project or user ID identifies a resource but does not authorize access.

For an asynchronous mutation, retain its idempotency key and observe the returned operation. Handle typed API errors rather than silently returning success. [API contract](/api) · [Authentication](/login-tokens) · [Deployment workflow](/quickstart).


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