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

# What is Unkey?

> Unkey is a globally distributed API platform that ships a Dockerfile to production with built-in key issuance, rate limiting, and analytics.

**Ship APIs, not infrastructure.**

Push a Dockerfile, get a production API. Unkey builds the image, runs it across your chosen regions, and routes every request through Sentinel for API key authentication, rate limiting, and IP rules before it hits your code. Domains, rollbacks, and analytics are handled. You write the application; we run it.

<CardGroup cols={2}>
  <Card title="Deploy" icon="rocket" href="/build-and-deploy/overview">
    Push to GitHub or run `unkey deploy`. Multi-region, instant rollbacks, automatic domains, preview environments.
  </Card>

  <Card title="Sentinel" icon="shield-halved" href="/platform/sentinel/overview">
    API key authentication, rate limiting, and IP policies running in front of your app. No middleware to write.
  </Card>

  <Card title="API keys" icon="key" href="/platform/apis/introduction">
    Issue, verify, revoke. Usage limits, expiration, metadata, identities. Use standalone or attached to a deployment.
  </Card>

  <Card title="Analytics" icon="chart-line" href="/platform/analytics/overview">
    Who's using your API, how much, when. Built in, queryable, no pipeline to build.
  </Card>
</CardGroup>

## Why Unkey?

Shipping an API used to mean stitching together a runtime, a CDN, a key store, a Redis for rate limits, an analytics pipeline, and the auth middleware to glue them. Unkey is one platform that runs all of it on servers we operate, so you can focus on the actual API.

| Without Unkey                                           | With Unkey                             |
| ------------------------------------------------------- | -------------------------------------- |
| Provision servers, configure load balancers, manage TLS | `git push` or `unkey deploy`           |
| Build key storage, hashing, rotation, revocation        | Attached to your app or called via SDK |
| Stand up Redis for rate limiting                        | `unkey.ratelimit.limit()`              |
| Wire up usage tracking and dashboards                   | Built-in analytics                     |

<Note>
  Unkey never stores API keys in plain text. Keys are SHA-256 hashed before storage, so even if our database were compromised your keys stay safe.
</Note>

## What can you build?

<AccordionGroup>
  <Accordion title="Ship a production API from a Dockerfile" icon="rocket">
    Connect a GitHub repository or run `unkey deploy`. Unkey builds your image, runs it across your chosen regions, and assigns domains automatically. Every push to your default branch goes to production; every other branch gets a preview environment.

    ```bash theme={"theme":"kanagawa-wave"}
    unkey deploy ghcr.io/acme/payments-api:v1.2.3 \
      --project payments \
      --root-key $UNKEY_ROOT_KEY
    ```
  </Accordion>

  <Accordion title="Authenticate every request before it hits your app" icon="shield-halved">
    Sentinel sits in front of your deployment and enforces API key checks, rate limits, and IP rules. No SDK call required from inside your app: invalid requests are rejected before they reach your code.

    ```ts theme={"theme":"kanagawa-wave"}
    // Inside your app, the request is already authenticated.
    // Identity and quota info arrive on request headers.
    const userId = req.headers["x-unkey-identity"];
    ```
  </Accordion>

  <Accordion title="Issue API keys to your customers" icon="key">
    Issue keys with prefixes, expiration, usage credits, rate limits, and arbitrary metadata. Verify them with one SDK call, attached to a deployment or standalone.

    ```ts theme={"theme":"kanagawa-wave"}
    const { meta, data } = await unkey.keys.verifyKey({ key: "sk_..." });
    if (!data.valid) return new Response("Unauthorized", { status: 401 });
    ```
  </Accordion>

  <Accordion title="Rate limit anything" icon="gauge">
    Per-user, per-IP, per-endpoint, per-anything. Globally distributed, no Redis, attached to a key or completely standalone.

    ```ts theme={"theme":"kanagawa-wave"}
    const { success } = await unkey.ratelimit.limit({
      namespace: "api.requests",
      identifier: userId,
      limit: 100,
      duration: 60_000,
    });
    if (!success) return new Response("Too many requests", { status: 429 });
    ```
  </Accordion>

  <Accordion title="Usage-based billing" icon="receipt">
    Issue keys with monthly credits and automatic refills. Verification consumes credits, so usage-based pricing is one config object away.

    ```ts theme={"theme":"kanagawa-wave"}
    const { meta, data } = await unkey.keys.createKey({
      apiId: "api_...",
      credits: {
        remaining: 10000,
        refill: { interval: "monthly", amount: 10000 }
      }
    });
    ```
  </Accordion>
</AccordionGroup>

## Get started

<CardGroup cols={2}>
  <Card title="Deploy your first app" icon="rocket" href="/quickstart/deploy">
    Connect a GitHub repository (or push a Docker image) and have a live URL in minutes.
  </Card>

  <Card title="Issue your first API key" icon="key" href="/quickstart/quickstart">
    Create a keyspace, generate a key, and verify it with curl or your favorite SDK.
  </Card>

  <Card title="Framework guides" icon="code" href="/quickstart/apis/nextjs">
    Step-by-step recipes for Next.js, Bun, Express, Hono, FastAPI, Go.
  </Card>

  <Card title="Cookbook" icon="book" href="/cookbook/index">
    Ready-to-copy patterns: per-user limits, tiered subscriptions, usage billing.
  </Card>
</CardGroup>

## Choose your path

<CardGroup cols={2}>
  <Card title="I want to ship an API" icon="rocket" href="/build-and-deploy/overview">
    Deploy from GitHub or CLI. Multi-region, rollbacks, preview environments, Sentinel in front.
  </Card>

  <Card title="I just need API keys or rate limits" icon="key" href="/platform/apis/introduction">
    Use the SDK directly from any backend, no deployment required.
  </Card>

  <Card title="I'm migrating from another solution" icon="arrows-rotate" href="/platform/apis/migrations/introduction">
    Bring existing keys over without disrupting your users.
  </Card>

  <Card title="I want both" icon="bolt" href="/quickstart/deploy">
    Start by deploying. Add API key auth and rate limits as policies on the deployment.
  </Card>
</CardGroup>

## Join the community

Questions, ideas, or just want to talk to other API builders?

<CardGroup cols={3}>
  <Card title="Discord" icon="discord" href="https://unkey.com/discord">
    Chat with the team and community
  </Card>

  <Card title="GitHub" icon="github" href="https://github.com/unkeyed/unkey">
    Star the repo and file issues
  </Card>

  <Card title="Twitter / X" icon="x-twitter" href="https://x.com/unkeydev">
    Follow for updates
  </Card>
</CardGroup>
