---
name: levanto-sage-mpp
description: Buy, top up and check a prepaid Levanto Sage API key with an MPP (HTTP 402) payment, by card (Stripe) or USDC on Tempo, with no account. The key works for Sage decisions, extraction and streaming. Use when an agent needs a Sage key and can pay with MPP, or the user mentions mpp.levanto.ai.
---

# Sage keys over MPP

Pay with [MPP](https://mpp.dev) and get a Sage API key. No account, no signup.

## Payment methods

Only these two are accepted:

| Method | MPP method | Per payment |
|---|---|---|
| Card (any card Stripe accepts, or Link) | `stripe` | $5–$50 |
| USDC on Tempo mainnet (chain 4217) | `tempo` | $5–$100 |

No other networks or tokens (not Base, Solana or Ethereum; not USDT). Above $50 the `402` offers USDC only.

## Buy a key

```sh
# USDC on Tempo, from an mppx wallet
npx mppx https://mpp.levanto.ai/v1/keys -J '{"amount_usd": 10}'

# Card, through the user's Link wallet (they approve the payment)
npx @stripe/link-cli mpp pay https://mpp.levanto.ai/v1/keys -d '{"amount_usd": 10}' --context "<what the key is for, 100+ characters>"
```

Any MPP client works: `POST /v1/keys` answers `402` with the offers, you pay one, and the same request with `Authorization: Payment …` returns `201`:

```json
{
  "key": "lv_live_…",
  "key_id": "5f5ca681-…",
  "limit_usd": 10,
  "remaining_usd": 10,
  "expires_at": "2027-01-29T11:35:43Z",
  "sage_base_url": "https://sage.levanto.ai",
  "topup_url": "https://mpp.levanto.ai/v1/keys/5f5ca681-…/topup",
  "balance_url": "https://mpp.levanto.ai/v1/keys/5f5ca681-…"
}
```

The key is shown once. Save it straight to a secret store or an environment variable (e.g. `SAGE_API_KEY`), and keep `key_id`. Never log, echo or commit the key. If the response is lost, send the same paid request again within 24 hours: you get the key back and are not charged twice.

## Terms

| | |
|---|---|
| Per payment | $5–$100 (cards up to $50) |
| Per key | $500 in total |
| Expiry | 90 days after the last top-up |
| Rates | Developer plan |
| Refunds | None |

## Use the key

Send it to Sage like any Levanto key: `Authorization: Bearer lv_live_…` on `https://sage.levanto.ai`. One key covers decisions (`POST /decide`), extraction (`POST /v1/extract`) and streaming (`WS /v1/stream`). For requests, answers and errors, install the main Sage skill:

```sh
curl -fsSL --create-dirs https://platform.levanto.ai/api/intelligence/skill \
  -o .claude/skills/levanto-sage-decide/SKILL.md
```

For Cursor, use `.cursor/skills/` in the same layout.

## Top up and balance

- Top up: `POST {topup_url}` with `{"amount_usd": 20}`, paid the same way. Returns the new balance and restarts the 90 days.
- Balance: `GET {balance_url}` with `Authorization: Bearer <key>`. Returns `limit_usd`, `spent_usd`, `remaining_usd`, `expires_at`, `expired`, `disabled`.

When Sage answers `402`, the balance is used up: top up.

## Errors

Every error is `{"error": "<code>", "detail": "…"}`.

| Status | `error` | Do |
|---|---|---|
| 400 | `invalid_amount` | Send $5–$100, whole cents |
| 400 | `over_key_limit` | Top up at most `max_topup_usd`, or buy a new key |
| 404 | `unknown_key` | Check `key_id` and the key |
| 409 | `key_disabled` | Buy a new key |
| 409 | `payment_already_used` | Pay the new `402` |
| 409 | `key_already_issued` | The key was shown and its 24 hours passed; it can't be shown again |
| 410 | `key_expired` | Buy a new key |
| 503 | `fulfilment_pending` | Paid, not yet delivered: resend the same request after `retry_after_seconds` |

Discovery: `https://mpp.levanto.ai/openapi.json`, `https://mpp.levanto.ai/llms.txt`.
