TanqoryDocs

tanqoryExtAiCredits

  • Query
  • Other operations

The store's AI credits: balance, reset date, purchased lots with their expiry, packs, purchases, alerts. Any staff member.

Arguments

None.

Returns

TanqoryExtAiCredits! The store's AI credits, from the cell's copy of the ledger (no central call).

FieldTypeDescription
alerts[TanqoryExtAiCreditAlert!]!
balanceFloat!

Credits the store can spend now: included plus purchased (purchased may be below zero after an overrun).

canManageBoolean!

Whether the caller may buy credits and change the spend controls (staff permissions settings.billing_edit and ai.manage; the store owner and admins hold both).

dailyResetsAtDateTime

Trial only: when today's grant is replaced by the next one.

includedCreditsFloat!

The plan's credits for the period; for a trial, the period's maximum of the daily grant.

includedRemainingFloat!
lots[TanqoryExtAiCreditLot!]!
packs[TanqoryExtAiCreditPack!]!
periodStartsAtDateTime
purchasedRemainingFloat!
purchases[TanqoryExtAiCreditPurchase!]!

The latest purchases, newest first (at most 20).

resetsAtDateTime

When the included credits reset (no rollover).

trialBoolean!

True when the store gets the trial's daily grant (20 a day, at most 100 a month) instead of a plan's credits.

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
  -H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"query TanqoryExtAiCredits {\n  tanqoryExtAiCredits {\n    balance\n    canManage\n    dailyResetsAt\n    includedCredits\n    includedRemaining\n    lots { id }\n    periodStartsAt\n    purchasedRemaining\n    purchases { id }\n    resetsAt\n  }\n}","variables":{}}'

Built from commit c0b3fb3fdef7 · API version 2026-10