API reference
Subscriptions
Read the workspace's tier, status, and current period end. Mirror of the workspace billing state — no client-side checkout.
#The Subscription object
| Field | Type | Description |
|---|---|---|
| tier | "free"|"basic"|"pro"|"max"|"enterprise" | |
| status | "active"|"pending"|"cancelling"|"cancelled"|"expired"|"halted"|"past_due" | |
| provider | "razorpay"|"stripe"|null | |
| currentPeriodEnd | ISO 8601 | null | When the active period ends. After this date, status flips per provider rules. |
| tokenAllowance | number | Total token allowance for the current period. |
#Get the current subscription
GET/v1/workspace/subscription
const sub = await client.subscriptions.get();
if (sub.status === 'cancelling') {
console.log('cancels at', sub.currentPeriodEnd);
}#Cancel
POST/v1/workspace/subscription/cancel
Cancel-at-cycle-end. Status flips to cancelling immediately and to cancelled when the period ends. No partial refunds.
#Read daily usage
GET/v1/workspace/usage
Returns today's run counts per kind, the daily caps for the tier, and the next reset timestamp.
| Field | Type | Description |
|---|---|---|
| critique.used | number | |
| critique.limit | number | |
| augmenter.used | number | |
| augmenter.limit | number | |
| resetAt | ISO 8601 |
#Where to go next
PromptFloe developer docs