# Get started with Limitr Cloud

> Sign up for Limitr Cloud, build your first policy with a template or the Analyst, connect your app with an API key, and find your way around the app: workspaces, test and live, and the segment filter.

# Get started with Limitr Cloud

Limitr Cloud is where you run Limitr for a product: you write the policy (your plans, credits, limits, and prices),
publish it to the Limitr engine inside your app, and see and manage the customers it meters, what they use, what it
costs you, and what they're billed. Limitr Analyst, the agent, works alongside you on every page.

The engine itself is open source and runs in your app. Cloud keeps its policy and customers in sync, so every server
running your app decides with the same, current state. See [how it works](/docs/how-it-works) for the engine side.

## 1. Sign up

Go to [cloud.limitr.dev](https://cloud.limitr.dev) and create an account with Google or an email and password. Your
first workspace, "My product", is made for you on the Free plan.

## 2. Build a policy

Open **Policy**. An empty policy offers a few **starter templates** (an AI app, an API, seats and features, and
credits): pick the one closest to your product, then edit it. Or describe your pricing to the Analyst ("a free plan
with 50k tokens a month, and Pro at $20 with 2M tokens and overage at $15 per million") and it writes the draft.

Either way, the policy is a draft until you publish it. Look through the **Entitlements**, **Plans**, and **Credits**
tabs, or the **Code** tab for the policy as Stof. Ask the Analyst to simulate a customer to see what they'd be allowed
and billed. See [Policies](./policies).

## 3. Publish and connect your app

Publishing and connecting an app start on [Pay as you go](./plans-and-billing). Then:

1. **Publish to test** on the Policy page.
2. In **Developers**, make a test key.
3. In your app:

<Tabs groupId="lang" queryString>
<TabItem value="typescript" label="TypeScript">

```ts
const limitr = await Limitr.cloud({ token: process.env.LIMITR_KEY! });
if (!limitr) throw new Error('Limitr Cloud refused the key');

await limitr.ensureCustomer('user_123'); // on the default plan, unless they exist already
if (await limitr.allow('user_123', 'chat', 1200)) {
    // the call is allowed, and its usage is metered
}
```

</TabItem>
<TabItem value="python" label="Python">

```python norun
from limitr import Limitr

limitr = Limitr.cloud(os.environ['LIMITR_KEY'])
if not limitr:
    raise RuntimeError('Limitr Cloud refused the key')

limitr.ensure_customer('user_123')  # on the default plan, unless they exist already
if limitr.allow('user_123', 'chat', 1200):
    ...  # the call is allowed, and its usage is metered
```

</TabItem>
</Tabs>

Customers show up in **Customers** as your app creates and meters them. Your coding agent can do this step for you
with the Limitr skills. See [Connect your app](./connect-your-app).

## Find your way around

- **Workspaces.** A workspace is one product: its own policy, customers, keys, and team. Switch or make one with the
  menu at the top left. Each new workspace starts on Free.
- **Test and live.** Every workspace has a test mode and a live mode, each with its own policy and customers. The
  **Test** / **Live** switch in the top bar changes which one the pages show (the event log shows both). A test key
  reads the test policy and test customers; a live key, the live ones. When test looks right, **Copy to live** puts it in the live draft.
- **The segment filter.** Pick a [segment](./segments) in the top bar to see only its customers: in Customers, in
  dashboard panels about customers, and in what the Analyst looks at.
- **Limitr Analyst.** It's on the right of every page, and **Ctrl K** (**Cmd K**) opens it from anywhere. See
  [Limitr Analyst](./agent).
- **Alerts.** The count on **Events** is new alerts your [notifications](./notifications) raised.

## Next

- [Customers](./customers): plans, overrides, caps, top-ups, and invoices for one customer.
- [Dashboards](./dashboards): usage, cost, value, and margin, including by your calls' metadata.
- [Stripe](./stripe): charge your customers through your own Stripe account.
- [Team](./team): invite teammates and choose what they can do.
