About the AI Credits API

The AI Credits API lets your app read an account's AI credit wallet — the balance of credits used to pay for AI-powered features on Wix.

Each Wix account has an AI credit wallet funded from two sources: recurring (periodic) credits that replenish each period, and one-time top-up credits purchased as needed. The AI Credits API exposes this wallet so that apps and account owners can see how many credits are available before running an AI action, or display the balance in a dashboard.

With the AI Credits API, you can:

  • Retrieve an account's AI credit balance, including recurring credits, one-time top-up credits, and a per-source breakdown.

The AI credit wallet is the foundation for additional credit-management capabilities that may be added over time.

Before you begin

It's important to note the following points before starting to code:

  • A credit is the unit AI features are billed in. Recurring credits replenish each period; top-up credits are one-time and don't reset.
  • An account's available balance combines its recurring credits and any top-up credits.
  • The data returned depends on your access. With account-level access, the response covers all of the account's credits. With site-level access, the response is scoped to the credits and subscription of the site in context. When you have both, the account-level balance is returned.
  • The API is accessed using an API key.

Use cases

Terminology

  • AI credit wallet: An account's balance of AI credits, aggregated across all sources.
  • Credit: The unit AI features are billed in.
  • Recurring (periodic) credits: Credits from a subscription allowance that replenish each period, for example monthly or daily.
  • Top-up credits: One-time credits purchased to supplement the recurring allowance; they don't reset.
  • Cap: The maximum credits available for a given source per period.
  • Credit balance breakdown: A per-source, detailed view of the same credits represented in the aggregate balances.
Did this help?