PromptFloe Developer Docs
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

FieldTypeDescription
tier"free"|"basic"|"pro"|"max"|"enterprise"
status"active"|"pending"|"cancelling"|"cancelled"|"expired"|"halted"|"past_due"
provider"razorpay"|"stripe"|null
currentPeriodEndISO 8601 | nullWhen the active period ends. After this date, status flips per provider rules.
tokenAllowancenumberTotal 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.

FieldTypeDescription
critique.usednumber
critique.limitnumber
augmenter.usednumber
augmenter.limitnumber
resetAtISO 8601

#Where to go next

PromptFloe developer docs