Billing
beginnerPlans, subscriptions, invoices, upgrades, downgrades, and payment management endpoints.
List plans
/v1/billing/plansList all available plans with features and pricing.
[
{
"id": "free",
"name": "Free",
"price_monthly": 0,
"price_yearly": 0,
"price_monthly_cents": 0,
"price_annual_cents": 0,
"max_patterns": 5000,
"max_queries_day": 1000,
"compose_per_day": 100,
"max_api_keys": 2,
"max_members": 1,
"retention_days": 30,
"features": [
"text_api",
"vector_api",
"causal",
"consolidation"
]
},
{
"id": "starter",
"name": "Starter",
"price_monthly": 29,
"price_yearly": 278.4,
"price_monthly_cents": 2900,
"price_annual_cents": 27840,
"max_patterns": 10000,
"max_queries_day": 10000,
"compose_per_day": 500,
"max_api_keys": 5,
"max_members": 3,
"retention_days": 90,
"features": [
"text_api",
"vector_api",
"causal",
"consolidation",
"webhooks",
"hdc"
]
},
{
"id": "pro",
"name": "Pro",
"price_monthly": 79,
"price_yearly": 758.4,
"price_monthly_cents": 7900,
"price_annual_cents": 75840,
"max_patterns": 100000,
"max_queries_day": -1,
"compose_per_day": -1,
"max_api_keys": 20,
"max_members": 10,
"retention_days": 365,
"features": [
"text_api",
"vector_api",
"causal",
"consolidation",
"webhooks",
"hdc",
"xai",
"tiered_storage"
]
},
{
"id": "scale",
"name": "Scale",
"price_monthly": 249,
"price_yearly": 2390.4,
"price_monthly_cents": 24900,
"price_annual_cents": 239040,
"max_patterns": 1000000,
"max_queries_day": -1,
"compose_per_day": -1,
"max_api_keys": 100,
"max_members": 50,
"retention_days": -1,
"features": [
"text_api",
"vector_api",
"causal",
"consolidation",
"webhooks",
"hdc",
"xai",
"tiered_storage",
"priority_support"
]
}
]A max_queries_day of -1 means unlimited. Prices in EUR.
Get subscription
/v1/billing/subscriptionGet current subscription details for your organization (resolved from JWT/API key).
{
"subscription_id": "sub_abc123",
"plan_id": "pro",
"status": "active",
"current_period_start": "2026-01-15T00:00:00Z",
"current_period_end": "2026-02-15T00:00:00Z",
"cancel_at": null,
"trial_end": null,
"dunning_state": null
}Create checkout session
/v1/billing/checkoutCreate a Stripe checkout session to subscribe or change plan.
plan_idstringrequiredPlan to subscribe to: starter, pro, scale.
intervalstringDefault: monthBilling interval: month or year.
{
"checkout_url": "https://checkout.stripe.com/c/pay/cs_...",
"session_id": "cs_abc123"
}Customer portal
/v1/billing/portalCreate a Stripe customer portal session for managing payment methods and invoices.
{
"portal_url": "https://billing.stripe.com/p/session/..."
}Upgrade plan
/v1/billing/upgradeUpgrade to a higher plan. Takes effect immediately with prorated charge.
plan_idstringrequiredTarget plan (must be higher than current).
intervalstringDefault: monthBilling interval: month or year.
{
"subscription_id": "sub_abc123",
"plan_id": "scale",
"status": "active",
"current_period_start": "2026-01-15T00:00:00Z",
"current_period_end": "2026-02-15T00:00:00Z",
"cancel_at": null,
"trial_end": null,
"dunning_state": null
}Downgrade plan
/v1/billing/downgradeDowngrade to a lower plan. Takes effect at the end of the current billing period.
plan_idstringrequiredTarget plan (must be lower than current).
{
"subscription_id": "sub_abc123",
"plan_id": "starter",
"status": "active",
"current_period_start": "2026-01-15T00:00:00Z",
"current_period_end": "2026-02-15T00:00:00Z",
"cancel_at": null,
"trial_end": null,
"dunning_state": null
}If your current usage exceeds the new plan's limits, you won't lose data but new stores will be blocked until you reduce pattern count.
Cancel subscription
/v1/billing/cancelCancel the subscription.
reasonstring | nullOptional cancellation reason.
immediatebooleanDefault: falseIf true, cancel immediately instead of at period end.
{
"status": "cancelling",
"cancel_at": "2026-02-15T00:00:00Z",
"message": "Subscription will end at the current period end"
}Reactivate subscription
/v1/billing/reactivateReactivate a cancelled subscription before it expires.
{
"subscription_id": "sub_abc123",
"plan_id": "pro",
"status": "active",
"cancel_at": null
}List invoices
/v1/billing/invoicesList all invoices.
[
{
"invoice_id": "inv_abc123",
"amount_due": 7900,
"amount_paid": 7900,
"currency": "eur",
"status": "paid",
"period_start": "2026-01-15T00:00:00Z",
"period_end": "2026-02-15T00:00:00Z",
"pdf_url": "https://pay.stripe.com/invoice/...",
"hosted_invoice_url": "https://invoice.stripe.com/i/..."
}
]Upcoming invoice
/v1/billing/upcoming-invoicePreview the next invoice.
{
"amount_due": 7900,
"currency": "eur",
"period_start": "2026-02-15T00:00:00Z",
"period_end": "2026-03-15T00:00:00Z",
"lines": []
}Retry payment
/v1/billing/retry-paymentRetry a failed payment.
{
"message": "Payment retry initiated"
}Next steps
- Usage — Monitor consumption and limits
- Organizations — Manage org members and keys