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

# AI setup

> Paste your pricing page URL and let Asterix draft your catalog — products, plans, and credits — in your sandbox.

Setting up a billing catalog by hand — products, plans, features, credit currencies, grant rules, packages — is the slow part of adopting any billing engine. **Asterix**, UnitPay's onboarding agent, does the first draft for you: give it your pricing page and it builds a working catalog in your **sandbox**.

## What it does

You give Asterix a **URL** (your pricing or plans page). It reads the page, extracts the pricing into a structured catalog, and **creates the objects live in your sandbox org** — in dependency order:

```
product → credit currencies → billable metrics → features →
plan tiers → plans (charges · entitlements · grant rules) → credit packages
```

Credit setup is first-class: Asterix chooses the right [denomination](/documentation/credits/denominations) (`unit` vs fiat) per wallet, attaches recurring/one-time [grant rules](/documentation/credits/grants-and-priority) to plans, and creates [credit packages](/documentation/credits/top-ups) for top-ups — the same shapes you'd model by hand.

It also returns a **tracking contract**: the exact `eventName`s to send to [`track`](/documentation/how-it-works#the-two-verbs) so your usage lines up with the catalog it built.

## Run it

<Tabs>
  <Tab title="Dashboard">
    In the [dashboard](https://app.useunitpay.com), open **Import pricing**, paste your pricing URL, and watch Asterix build the catalog live. This is the easiest way to start.
  </Tab>

  <Tab title="API">
    Kick off a run and poll for the result:

    ```bash theme={null}
    curl https://api.useunitpay.com/v1/onboarding \
      -H "x-api-key: $UNITPAY_SECRET_KEY" \
      -H "content-type: application/json" \
      -d '{ "url": "https://yourcompany.com/pricing" }'
    ```

    ```json Response theme={null}
    { "id": "onb_...", "status": "queued" }
    ```

    ```bash theme={null}
    curl https://api.useunitpay.com/v1/onboarding/onb_... \
      -H "x-api-key: $UNITPAY_SECRET_KEY"
    ```

    The result reports what was `created`, `skipped`, and `failed`, plus the `productId` and the tracking contract. Prefer a live stream? `POST /v1/onboarding/stream` returns server-sent events as the agent works.
  </Tab>
</Tabs>

## It's a first draft — verify it

<Warning>
  Asterix applies changes **autonomously to your sandbox** — there's no approval step before objects are created. Nothing goes live: sandbox is a safe, throwaway copy. Always review the drafted catalog before you rely on it.
</Warning>

Treat the output as a fast starting point, not a final answer:

* **It reads a URL, not prose or screenshots.** Point it at a real pricing page.
* **Obscured pages extract poorly.** Prices hidden behind JavaScript or rendered as images may be missed — check them.
* **Review before going live.** Confirm prices, credit amounts, and grant cadences, then promote to live yourself.
* **Prefer to build by hand?** Every object Asterix creates, you can create directly — see [Billing](/documentation/billing) for the catalog API and [Credits](/documentation/credits/overview) for the credit side.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/documentation/getting-started/setup">
    With a catalog in place, subscribe a customer and run credits end to end.
  </Card>

  <Card title="Credits" icon="coins" href="/documentation/credits/overview">
    Understand the grants, denominations, and packages Asterix set up.
  </Card>
</CardGroup>
