---
title: buy_credits
product: vercel
url: /docs/agent-resources/vercel-mcp/tools/billing/buy_credits
canonical_url: "https://vercel.com/docs/agent-resources/vercel-mcp/tools/billing/buy_credits"
last_updated: 2018-10-20
type: reference
prerequisites:
  - /docs/agent-resources/vercel-mcp/tools/billing
  - /docs/agent-resources/vercel-mcp/tools
related:
  - /docs/ai-gateway
  - /docs/agent
  - /docs/plans/pro-plan
summary: Use buy_credits with Vercel MCP.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# buy_credits

Purchase prepaid credits for [v0](https://v0.dev), [AI Gateway](/docs/ai-gateway), or [Vercel Agent](/docs/agent). The amount is quoted directly, since credits cost exactly what you buy.

Some credit types have plan prerequisites: Vercel Agent credits require the team to be on [Vercel Pro](/docs/plans/pro-plan) (upgrade first with `buy_pro`), and v0 credits require a paid v0 plan. AI Gateway credits have no prerequisite. If a required plan is missing, the purchase is rejected with guidance and nothing is charged.

| Parameter        | Type    | Required | Default | Description                                                                                                                                                                                  |
| ---------------- | ------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `creditType`     | string  | Yes      | -       | Which credit balance to top up: `v0`, `gateway` (AI Gateway), or `agent` (Vercel Agent)                                                                                                      |
| `amount`         | number  | Yes      | -       | Amount to purchase, in whole US dollars (1–1000)                                                                                                                                             |
| `teamId`         | string  | Yes      | -       | The team ID to purchase credits for. Alternatively the team slug can be used. Team IDs start with 'team\_' and can be found by reading `.vercel/project.json` (orgId) or using `list_teams`. |
| `confirm`        | boolean | Yes      | -       | Set `true` to execute the charge                                                                                                                                                             |
| `idempotencyKey` | string  | Yes      | -       | The `idempotencyKey` returned by `get_purchase_quote`                                                                                                                                        |

**Sample prompt:** "Buy $25 of AI Gateway credits for my team"


---

[View full sitemap](/docs/sitemap)
