> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gloo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepaid Credits

> Buy credits up front, watch your balance, and keep it topped up automatically.

## Overview

Pay-as-you-go API access is funded with **prepaid credits**. You buy credit before you use it, every request draws down the balance at the model's published rate, and there is no invoice at the end of the week. You have already paid.

<Note>
  Prepaid credits pay for API usage only. [Gloo Code](/studio/billing#the-one-rule-that-surprises-people) is billed separately, through its own monthly allowance and top-ups, and does not draw from these credits. Enterprise organizations are invoiced under their agreement and do not use prepaid credits.
</Note>

<CardGroup cols={2}>
  <Card title="Add credits" icon="credit-card">
    Buy \$10 to \$100 at a time from the Billing page. Credit is available within seconds of payment.
  </Card>

  <Card title="Auto-refill" icon="rotate">
    Optionally let Gloo top you up automatically before you run dry, up to \$100 of automatic charges per week.
  </Card>
</CardGroup>

<Note>
  Credits belong to your organization, not to a product. Adding or removing Gloo Code, or changing tiers, leaves your balance untouched.
</Note>

## Adding credits

<Note>
  You need to fund your credits at least once before you can create an API key. Until then, the [API Keys](/studio/manage-api-credentials) page sends you here to add credits first. Signing in to Gloo Code from the terminal is separate: it needs a Gloo Code plan, not credits.
</Note>

1. Go to the [Studio Billing page](https://studio.ai.gloo.com/billing)
2. On the **Overview** tab, click **Add credits**
3. Choose \$10, \$25, \$50 or \$100, or enter a custom amount between \$10 and \$100
4. Complete payment on the checkout page

New organizations choose their first credit amount during onboarding.

The card you pay with is saved so it can be used for auto-refill later. You can remove it at any time from the **Payment Methods** tab.

**When the credit appears.** Fulfilment happens when your payment confirms, not when your browser returns. In practice credit lands within a few seconds and the page updates on its own. If it takes longer than about 90 seconds the page will say so and offer **Continue anyway**. Your payment went through, and the credit will appear without you doing anything.

<Info>
  Gloo does not email a purchase receipt. Your receipt is the invoice from our payment processor, and every purchase is also listed in **Billing History** in the Studio with the amount and a link to the invoice.
</Info>

## Auto-refill

Auto-refill charges your saved card automatically when your balance drops below **\$5**, or when a request would need more credit than you have left, so requests do not start failing mid-workload. The charge is your chosen amount, applied to the card on file.

**Turning it on:**

1. On the Billing page, find the **Auto-refill** switch on the Wallet card
2. Set the amount to add each time (\$10 to \$100)
3. Flip the switch on and confirm in the dialog

Nothing is saved until you confirm. Closing the dialog leaves auto-refill off. Turning it off later takes effect immediately.

**How it decides to charge.** Auto-refill is not on a fixed schedule. It checks your balance on every request and charges as soon as either condition above is met.

**The weekly charge cap.** Auto-refill will charge at most **\$100 per rolling 7 days**. This is a cap on money charged to your card, not on usage. When you reach it:

* Auto-refill pauses and the Wallet card shows **Paused, weekly cap reached**
* You get one email telling you auto-refill is paused
* **Manual top-ups still work.** The cap applies only to automatic charges
* Headroom returns gradually as older charges age past 7 days

If the amount you configured would not fit in the remaining headroom, Gloo charges the part that fits rather than skipping the top-up entirely.

<Note>
  This charge cap is separate from the **\$100 weekly usage limit** covered below, which pauses your API access rather than your card. Adding credits manually is always allowed, even at the usage limit. The purchase raises your balance, but access still resumes only when the window resets.
</Note>

## When you run out

There are two different limits, they produce two different errors, and the fix for one does nothing for the other.

|                                   | Out of credits                          | Weekly usage limit                                                              |
| --------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------- |
| **Error**                         | `402 INSUFFICIENT_CREDIT`               | `429 SPENDING_LIMIT_EXCEEDED`                                                   |
| **What happened**                 | Your balance reached zero               | You used \$100 of API usage this week                                           |
| **Can you still have a balance?** | No                                      | **Yes**. This fires even with credit remaining                                  |
| **What fixes it**                 | Add credits; access resumes immediately | Wait for your weekly window to reset                                            |
| **Can you add credits now?**      | Yes                                     | Yes. Your balance goes up, but access still resumes only when the window resets |

<Warning>
  The weekly usage limit is not the same as the auto-refill charge cap. One limits how much you can **spend**; the other limits how much Gloo will **charge your card automatically**. It is possible to be stopped by one while the other has room.
</Warning>

**When the weekly limit resets.** Your weekly window is anchored to when your account was first funded, not to Monday and not to UTC midnight. Usage drops to zero all at once at the boundary rather than rolling off gradually, so access returns in one step.

The Wallet card and the weekly limit banner both show the date and time your window resets.

<Note>
  Only usage paid from credit counts toward the weekly limit. Work done inside Gloo Code draws on your Gloo Code allowance and does not count. If your organization needs a higher weekly limit, contact support.
</Note>

## If your card is declined

If an automatic top-up is declined:

* **No credit is added, and your existing balance is untouched.** Nothing is lost.
* You get one email, *"Your card was declined"*, with a link to update your payment method.
* Gloo waits before retrying rather than re-attempting immediately, so a declined card does not generate repeated charges.
* Your existing credit keeps working until it runs out, at which point requests return `402`.

Update your card on the **Payment Methods** tab and auto-refill resumes on the next top-up.

<Info>
  Decline emails are limited to one per organization per day, and are sent to the email address on your payment profile.
</Info>

## If you also use Gloo Code

A Gloo Code plan includes its own usage allowance, and **that allowance and your credits are separate pools that cannot substitute for each other**. Gloo Code work draws on the Gloo Code allowance; direct API calls draw on your credits. See [Billing & Plans](/studio/billing#the-one-rule-that-surprises-people).

## Promotional credits

If your organization has promotional credit, it is shown alongside your paid balance and is **always spent first**. Only once promotional credit reaches zero does usage begin drawing on credit you paid for.

## Who can see and change this

Billing surfaces are restricted to members who can manage billing. Everyone else sees *"Billing is managed by your organization admins"* in place of the Wallet card, payment methods and plan changes.

## Frequently asked questions

**Do my credits expire?**

No expiry is applied to purchased credit today. Credit is consumed by usage and survives plan changes. If that changes, it will be announced and reflected in the [Terms of Service](https://gloo.com/legal/ai-studio-supplemental-terms-of-service) before it takes effect.

**Can I get a refund on unused credits?**

Credit purchases are final. Buy in the amount you expect to use. You can always add more. If something went wrong with a purchase, contact support.

**Why was my top-up refused?**

A manual top-up is only refused if the amount is outside the \$10 to \$100 range. Being at the weekly usage limit does not stop it: the purchase goes through and raises your balance, though your access will not resume until the window resets. Auto-refill is different: it pauses once it reaches its own weekly charge cap, but you can still add credits manually while it is paused.

**Why did auto-refill not fire before I ran out?**

Auto-refill charges when your balance drops below \$5 or a request needs more credit than you have left, and the charge takes a few seconds to land. A burst of large requests arriving in that window can briefly outrun it. If that happens regularly, raise your auto-refill amount so each top-up lasts longer.
