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

> ## Agent Instructions
> Unkey is two separate products. Compute builds, deploys, and runs apps behind a gateway. API Management issues API keys, enforces rate limits, manages identities and permissions, and reports usage. Say which product a page belongs to; a reader can use either without the other.
> Every Unkey API endpoint is an HTTP POST to https://api.unkey.com/v2/{service}.{procedure} with a root key in the Authorization: Bearer header. Root keys are workspace scoped.
> Error codes have the form err:{system}:{category}:{specific} and each has a page at /errors/{system}/{category}/{specific}.
> The word environment means production or preview in Compute. Rate limiting has four meanings on this site; the glossary lists them.

# SDKs

> Official libraries for TypeScript, Go, and Python, plus a community Nuxt module.

export const versions = {
  cli: "2.0.150",
  tsApi: "2.5.1",
  tsRatelimit: "2.1.4",
  tsHono: "2.0.0",
  tsNextjs: "2.0.0",
  tsCache: "1.5.0",
  tsNuxt: "1.1.15",
  goSdk: "v3.0.1",
  pySdk: "3.0.3"
};

Use an SDK to call the Unkey API from your code. We publish clients for TypeScript, Go, and Python that cover every endpoint, plus smaller TypeScript packages for one job each, such as verifying keys in a Hono route. The community maintains a Nuxt module. Every package that calls the API needs a root key.

<Note>
  You need a root key with the permissions listed on this page. Create one in the dashboard under **Settings > Root Keys**. See [Permission reference](/docs/platform/root-keys/permissions-legacy) for every permission.
</Note>

## Packages

| Package | Language | Current version | What it is |
| - | - | - | - |
| [@unkey/api](/docs/api-management/sdks/typescript/api) | TypeScript | {versions.tsApi} | Generated client for the whole API |
| [@unkey/ratelimit](/docs/api-management/sdks/typescript/ratelimit) | TypeScript | {versions.tsRatelimit} | Standalone rate limiting with timeouts and fallbacks |
| [@unkey/hono](/docs/api-management/sdks/typescript/hono) | TypeScript | {versions.tsHono} | Hono middleware that verifies the bearer key |
| [@unkey/nextjs](/docs/api-management/sdks/typescript/nextjs) | TypeScript | {versions.tsNextjs} | `withUnkey` wrapper for Next.js route handlers |
| [@unkey/cache](/docs/api-management/sdks/typescript/cache) | TypeScript | {versions.tsCache} | Typed tiered cache with stale-while-revalidate |
| [Go SDK](/docs/api-management/sdks/go) | Go | {versions.goSdk} | Generated client, module `github.com/unkeyed/sdks/api/go/v3` |
| [Python SDK](/docs/api-management/sdks/python) | Python | {versions.pySdk} | Generated client `unkey.py`, sync and async |
| [Nuxt module](/docs/api-management/sdks/community/nuxt) | TypeScript | {versions.tsNuxt} | Community-maintained Nuxt integration |

The TypeScript, Go, and Python clients match the [API reference](/docs/api-management/api-reference/keys/verify-api-key), so method names and fields line up across languages. The Python client ({versions.pySdk}) covers API Management only. The TypeScript and Go clients also cover Compute.

## Which package to use

* **`@unkey/api`, the Go SDK, or the Python SDK** when you call several endpoints or want full types.
* **`@unkey/hono` or `@unkey/nextjs`** when you only need to check incoming requests for a valid key. They call `keys.verifyKey` and give your handler the result.
* **`@unkey/ratelimit`** to rate limit user IDs or IP addresses without issuing keys. It adds a timeout and fallback so a network problem can't block your function.
* **`@unkey/cache`** for typed caching in your own services. It doesn't call the Unkey API.

## One client, both products

The TypeScript and Go clients cover Compute too, so the same `Unkey` instance that <Tooltip tip="Here: checking an API key on a request with keys.verifyKey. Not domain verification.">verifies</Tooltip> a key can create a deployment for a Compute <Tooltip tip="A Compute app: a deployable service inside a project. Not 'your application' in general.">app</Tooltip>. The [Go SDK](/docs/api-management/sdks/go) page shows the same pair in Go. From Python, call Compute endpoints over HTTP. The endpoints are [keys.verifyKey](/docs/api-management/api-reference/keys/verify-api-key) and [deployments.createDeploymentV3](/docs/compute/api-reference/deployments/create-deployment).

<CodeGroup>
  ```typescript Verify a key theme={"system"}
  import { Unkey } from "@unkey/api";

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

  const result = await unkey.keys.verifyKey({ key: "prod_abc123" });

  if (!result.data.valid) {
    // result.data.code says why: NOT_FOUND, DISABLED, EXPIRED, RATE_LIMITED, ...
  }
  ```

  ```typescript Create a deployment theme={"system"}
  import { Unkey } from "@unkey/api";

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

  const result = await unkey.deployments.createDeploymentV3({
    project: "my-project",
    app: "api",
    environment: "production",
    oci: { image: "ghcr.io/acme/api:v1.0.0" },
  });

  console.log(result.data.deploymentId);
  ```
</CodeGroup>

For Compute concepts such as projects, apps, and <Tooltip tip="A production or preview environment of a Compute app, not the dashboard label on a key.">environments</Tooltip>, see [Projects, apps, and environments](/docs/compute/concepts/projects-apps-environments).

## Response shape

Every successful response has `meta.requestId` (quote it when you contact support) and `data`, the result. Errors are thrown or returned as typed errors per HTTP status. Each SDK page shows how to catch them. See [API overview](/docs/platform/api/overview) for the raw format.

## Next steps

<Columns cols={2}>
  <Card title="@unkey/api" icon="js" href="/docs/api-management/sdks/typescript/api">
    Install, construct, verify and create keys, handle errors.
  </Card>

  <Card title="Go SDK" icon="golang" href="/docs/api-management/sdks/go">
    `go get` the v3 module the CLI uses.
  </Card>

  <Card title="Python SDK" icon="python" href="/docs/api-management/sdks/python">
    `unkey.py` with sync and async clients.
  </Card>
</Columns>
