Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

balance

Free tool for a workspace's available and reserved balance, plus the top-up link and its minimum.

Available and reserved balance for a workspace. Free and read-only, takes no arguments. Checking the balance never opens a Stripe Checkout session on its own; call top_up for that. topUpLink always carries this gateway’s minimum top-up (minimumUsd) and dashboardUrl (the usage page with the top-up form); while the balance is below the minimum it also carries checkoutUrl when a session is already open for this workspace.

Inputs

This tool takes no arguments.

Example call

{}

Example answer

Abridged: a full answer also carries holds, trialCreditMicros and recentSpendMicros.

{
  "workspaceId": "3720e84a-577e-4f47-8ed0-dae5a5a601fd",
  "currency": "USD",
  "available": 94.628918,
  "reserved": 0,
  "topUpLink": {
    "minimumUsd": 5,
    "suggestedUsd": 5,
    "checkoutUrl": null,
    "dashboardUrl": "https://looot.ai/usage?top_up=1",
    "message": "Your looot balance is $94.63. Add credits (at least $5) at: https://looot.ai/usage?top_up=1",
    "reason": "balance_sufficient"
  }
}

Errors

Free and read-only; takes no arguments, so there is nothing to validate. An unexpected argument is refused with validation_error naming it, listing balance’s empty acceptedArguments.

REST and CLI

Was this page helpful?