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

# @unkey/api

> Reference for the @unkey/api TypeScript SDK. Create, verify, update, and revoke API keys programmatically from your Node.js application.

## SDK Installation

The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.

<CodeGroup>
  ```bash npm theme={"theme":"kanagawa-wave"}
  npm add @unkey/api
  ```

  ```bash pnpm theme={"theme":"kanagawa-wave"}
  pnpm add @unkey/api
  ```

  ```bash bun theme={"theme":"kanagawa-wave"}
  bun add @unkey/api
  ```

  ```bash yarn theme={"theme":"kanagawa-wave"}
  yarn add @unkey/api zod

  # Note that Yarn does not install peer dependencies automatically. You will need
  # to install zod as shown above.
  ```
</CodeGroup>

<Note>
  This package is published with CommonJS and ES Modules (ESM) support.
</Note>

## Requirements

For supported JavaScript runtimes, please consult [RUNTIMES.md](https://github.com/unkeyed/sdks/blob/main/api/ts/RUNTIMES.md).

## SDK Example Usage

### Example

```typescript theme={"theme":"kanagawa-wave"}
import { Unkey } from "@unkey/api";

const unkey = new Unkey({
  rootKey: process.env["UNKEY_ROOT_KEY"],
});

async function run() {
  const { meta, data } = await unkey.apis.createApi({
    name: "payment-service-production",
  });

  console.log(data);
}

run();
```

## Repository

<Card title="GitHub" icon="github" href="https://github.com/unkeyed/sdks/blob/main/api/ts/README.md" cta="README">
  The full autogenerated documentation can be found on GitHub.
</Card>
