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

# Overview

> Copy-paste code recipes for common Unkey integration patterns including authentication middleware, rate limiting, and usage billing.

Real-world examples you can drop into your codebase. Each recipe is self-contained and production-ready.

## API Key Authentication

<CardGroup cols={2}>
  <Card title="Next.js API Routes" icon="react" href="/docs/cookbook/nextjs-api-routes">
    Protect App Router and Pages Router API routes
  </Card>

  <Card title="Express Middleware" icon="node-js" href="/docs/cookbook/express-middleware">
    Reusable auth middleware for Express apps
  </Card>

  <Card title="FastAPI Dependencies" icon="python" href="/docs/cookbook/fastapi-auth">
    Dependency injection pattern for FastAPI
  </Card>

  <Card title="Go Standard Library" icon="code" href="/docs/cookbook/go-stdlib-middleware">
    Production-ready net/http middleware
  </Card>

  <Card title="Go Gin Framework" icon="code" href="/docs/cookbook/go-gin-middleware">
    Middleware for Gin web framework
  </Card>

  <Card title="Go Echo Framework" icon="code" href="/docs/cookbook/go-echo-middleware">
    Middleware for Echo web framework
  </Card>

  <Card title="Cloudflare Workers" icon="cloud" href="/docs/cookbook/cloudflare-workers">
    Globally distributed API authentication
  </Card>
</CardGroup>

## Rate Limiting

<CardGroup cols={2}>
  <Card title="Per-User Rate Limits" icon="user" href="/docs/cookbook/per-user-ratelimit">
    Different limits based on user tier
  </Card>

  <Card title="Endpoint-Specific Limits" icon="route" href="/docs/cookbook/endpoint-ratelimit">
    Tighter limits on expensive operations
  </Card>
</CardGroup>

## Usage & Billing

<CardGroup cols={2}>
  <Card title="Usage-Based Billing" icon="credit-card" href="/docs/cookbook/usage-billing">
    Track and bill based on API usage
  </Card>

  <Card title="Tiered Subscriptions" icon="layer-group" href="/docs/cookbook/tiered-subscriptions">
    Free, Pro, Enterprise with different limits
  </Card>
</CardGroup>
