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

# Overview

> Rate limit anything. That's the whole product. Also: this is ours.

Limitem is Contiguity's internal rate limiting API. You give it a namespace, an identifier, a limit, and a window. It tells you if the request is allowed.

It's fast. It's consistent. It fails open if something goes wrong, so *our* product stays up.

<Warning>
  If you are not Contiguity, this API is not for you. There is no signup, no pricing page, and no "contact sales." Close the tab. We already have a customer.
</Warning>

<Steps>
  <Step title="Get a token" icon="key">
    Use your `limitem_sk_...` token. The JavaScript SDK also reads `LIMITEM_TOKEN` or `LIMITEM_KEY`.
  </Step>

  <Step title="Create a limiter" icon="gauge-high">
    Pick a namespace, a limit, and a duration. Optionally pick an [algorithm](/algorithms/overview).
  </Step>

  <Step title="Check the identifier" icon="user">
    Call `limit("user:123")` — or `POST /limit` — before you do the expensive thing.
  </Step>
</Steps>

## Quick start

<Tabs>
  <Tab title="JavaScript" icon="js">
    ```typescript theme={null}
    import { limit } from "limitem";

    const limiter = new limit.em({
      token: process.env.LIMITEM_TOKEN,
      namespace: "contiguity-api",
      product: "outbound_sms",
      limit: 100,
      duration: "1h",
    });

    const result = await limiter.limit("user:123");

    if (!result.allowed) {
      throw new Error("Rate limit exceeded");
    }
    ```
  </Tab>

  <Tab title="cURL" icon="terminal">
    ```bash theme={null}
    curl -X POST https://api.limitem.com/limit \
      -H "Authorization: Bearer limitem_sk_..." \
      -H "Content-Type: application/json" \
      -d '{
        "namespace": "contiguity-api",
        "product": "outbound_sms",
        "identifier": "user:123",
        "limit": 100,
        "duration": 3600
      }'
    ```
  </Tab>
</Tabs>

## What to read next

<CardGroup cols={2}>
  <Card title="Concepts" icon="layer-group" href="/getting-started/concepts">
    Namespaces, products, identifiers, and fail-open.
  </Card>

  <Card title="JavaScript SDK" icon="js" href="/sdk/js/overview">
    `new limit.em(...)` and `limit(identifier)`.
  </Card>

  <Card title="Algorithms" icon="chart-simple" href="/algorithms/overview">
    Fixed window, sliding window, token bucket, leaky bucket.
  </Card>

  <Card title="API Reference" icon="brackets-curly" href="/api-reference/introduction">
    `POST /limit`. The one endpoint that matters.
  </Card>
</CardGroup>
