> ## Documentation Index
> Fetch the complete documentation index at: https://www.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.

# Cookbook

> Recipes for rate limiting, billing, and framework middleware built on Unkey.

Each recipe solves one common problem from start to finish. They assume you already have a keyspace, a root key, and a request handler that calls `keys.verifyKey`. If you don't yet, start with a [framework guide](https://www.unkey.com/docs/api-management/guides/nextjs.md).

> [card] [Per-user rate limits](https://www.unkey.com/docs/api-management/cookbook/per-user-rate-limit.md)
>
> Share one limit across all of a user's keys with identities, and give tiers different limits with overrides.

> [card] [Per-endpoint rate limits](https://www.unkey.com/docs/api-management/cookbook/endpoint-rate-limit.md)
>
> Separate budgets for reads and writes, with named key limits or a namespace per route.

> [card] [Usage-based billing with credits](https://www.unkey.com/docs/api-management/cookbook/usage-billing.md)
>
> Meter requests with credits, refill monthly, charge more for heavy operations, and sell top-ups.

> [card] [Tiered subscriptions](https://www.unkey.com/docs/api-management/cookbook/tiered-subscriptions.md)
>
> Encode free, pro, and enterprise plans in a key's limits, credits, permissions, and metadata, and change plans in place.

> [card] [Go middleware for net/http, Gin, and Echo](https://www.unkey.com/docs/api-management/cookbook/go-middleware.md)
>
> Drop-in authentication middleware for the three common Go HTTP stacks.

> [card] [FastAPI authentication](https://www.unkey.com/docs/api-management/cookbook/fastapi-auth.md)
>
> A typed FastAPI dependency with permission checks and rate limit headers.


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