---
title: "Use Your AI Credits"
description: "See how monthly and purchased Gateway credits apply automatically, and distinguish them from credits held in a provider account."
canonical_url: "https://vercel.com/academy/ai-gateway/use-ai-credits"
md_url: "https://vercel.com/academy/ai-gateway/use-ai-credits.md"
docset_id: "vercel-academy"
doc_version: "1.0"
last_updated: "2026-08-08T23:27:13.399Z"
content_type: "lesson"
course: "ai-gateway"
course_title: "Using AI Gateway in Production"
prerequisites:  []
---

<agent-instructions>
Vercel Academy — structured learning, not reference docs.
Lessons are sequenced.
Adapt commands to the human's actual environment (OS, package manager, shell, editor) — detect from project context or ask, don't assume.
The lesson shows one path; if the human's project diverges, adapt concepts to their setup.
Preserve the learning goal over literal steps.
Quizzes are pedagogical — engage, don't spoil.
Quiz answers are included for your reference.
</agent-instructions>

# Use Your AI Credits

# How Do I Use AI Credits I Already Bought?

AI Gateway Credits are prepaid and automatically fund eligible Gateway requests. Start by confirming which balance you have and which traffic uses it.

We will find the balance, run one request, and verify the charge in its request record.

\*\*Note: Quick Answer\*\*

Monthly and purchased AI Gateway credits appear in the Gateway balance and apply to eligible requests automatically. Credits held in an OpenAI, Anthropic, or other provider account require BYOK, which sends matching requests through your provider credential.

Gateway credits and provider credits belong to different accounts. Gateway credits fund requests billed through Vercel. Provider credits apply when a BYOK credential sends the charge to that provider account.

## Outcome

Find your credit balance, make a request, and confirm the exact cost of that request came out of the balance.

## Fast Track

1. Open **AI Gateway** in the Vercel dashboard and locate the balance
2. Run `pnpm cost-check` from the demo app
3. Refresh the usage view and match the charge to the script's receipt

## Hands-on exercise

Use the `cost-check` script from lesson 2.1 as a known request:

- Note whether you're on free credits or purchased credits (the balance display says which)
- Run `pnpm cost-check` and keep the `Actual` line from its receipt
- Find that request in the usage view and confirm the charge matches

The first credit purchase ends eligibility for monthly credits. Review the current tier details, auto top-up setting, and budget controls before adding funds.

\*\*Note: Auto top-up exists, and it's off by default\*\*

Auto top-up can refill the balance after it falls below a threshold. Review this setting with the budget controls in the next lesson before enabling it.

## Try It

After running `pnpm cost-check`:

```
Estimated:     $0.000067
Actual:        $0.0000672
```

Refresh the Usage view in the dashboard. The request should appear with the same cost as the script's `Actual` line and be reflected in the credit balance.

Two issues you may encounter:

**The request returns `429`.** Free-tier limits apply per model. Wait, retry, or use another currently eligible model.

**The model errors instead of answering.** The free tier covers a subset of the catalog. If `openai/gpt-5.4-mini` isn't in it right now, pick any model from the free tier list; the balance mechanics are identical.

## Bookmark It

No code changed here. Bookmark the **AI Gateway** dashboard so the balance, usage, and request records are easy to find.

## Done-When

- [ ] You know your current balance and whether it's free or purchased credits
- [ ] You matched one request's receipt to its charge in the usage view
- [ ] You can explain the difference between AI Gateway Credits and provider credits without looking
- [ ] Auto top-up is in the state you chose on purpose (probably off, for now)

## Solution

The work happened in the dashboard:

1. **AI Gateway** tab → balance (upper right). Free or purchased is labeled on the balance display.
2. Balance button → top-up dialog (purchase amounts, payment, and the auto top-up toggle live here).
3. Usage view → per-request charges, matching `providerMetadata.gateway.cost` from your code.

The request record is the reliable confirmation for a small charge that may not change a rounded balance display.

## Related Questions

- [How do I set a budget so I don't get a surprise bill?](/ai-gateway/save-money/set-a-budget)
- [How do I bring my own provider keys?](/ai-gateway/save-money/bring-your-own-keys)
- [How is AI Gateway priced?](/ai-gateway/save-money/ai-gateway-pricing)


---

[Full course index](/academy/llms.txt) · [Sitemap](/academy/sitemap.md)
