Home
Logospell · Docs

Credits tools

See where your balance stands with check_credits, and buy more from your agent with buy_credits. Only generations spend credits.

scroll ↓
01 / 02 · How it works
Balance and costs

check_credits

check_credits tells you how many credits are left on your account, and what each generation will cost you. It takes no parameters.

check_credits
# Your AI calls the tool
check_credits()

# It responds with the credits remaining on your account, e.g.:
remaining: 14
"You have 14 credit(s) remaining. Every generation costs 1 credit. Each generation makes up to 16 images, or 6 scenes for an illustration set."

# At 0 credits the reply also points to buy_credits

Every tool's cost is listed in the docs. Top up with buy_credits.

02 / 02 · Buying credits
Top up from your agent

buy_credits

buy_credits returns a Stripe Checkout link for one or more credit packs, already tied to your API key's account, so nobody needs to sign in. Calling it charges nothing; only completing the checkout does. Your agent opens the link or hands it to you, and you pay there with a card or Stripe Link before the checkout link expires; expiresAt says when. The credits land on your key within seconds of payment. Packs can also be bought on your account page.

buy_credits
# Your AI calls the tool
buy_credits(packs: 2)

# It responds with a checkout link for the user, e.g.:
checkoutURL: "https://checkout.stripe.com/c/pay/cs_live_..."
packs: 2
credits: 20
priceUSD: 20
expiresAt: "2026-10-06T18:30:00Z"
packsintegeroptional

How many credit packs to buy, 1 to 10. Each pack is 10 credits for $10.

Default: 1