---
title: "Buy a prepaid credit bundle (x402, USDC)"
method: POST
path: "/v1/credits/buy/{bundle}"
tags: ["Credits"]
---

# Buy a prepaid credit bundle (x402, USDC)

`POST /v1/credits/buy/{bundle}`

Pay once via x402 (USDC on Base) and receive a fresh API key preloaded with the bundle credits. Bundles: 1k = $5, 5k = $20, 25k = $80. Credits never expire. Optionally pass {"email": "..."} in the body to attach the key to an email — anonymous keys are fully functional too. Check the balance with GET /v1/credits/balance.

## Path parameters

- `bundle` '1k' | '5k' | '25k', required

## Request body

- object
  - `email` string, email — Optional — attach the key to an email address

## Response `201`

Credit key minted (shown only once — save it)

- object
  - `api_key` string, required — Full API key — shown only once
  - `key_prefix` string
  - `credits` integer, required
  - `bundle` string, required
  - `price_paid_usdc` number
  - `price_per_call_usdc` number
  - `usage_hint` string
  - `balance_endpoint` string
  - `message` string

## Other responses

- `402` — Payment required (x402) — bundle price in USDC
- `404` — Unknown bundle slug — choose 1k, 5k or 25k

---

[API](https://skmtc.dev/ibanforge/apis/ibanforge-api.md) · [All operations](https://skmtc.dev/ibanforge/apis/ibanforge-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ibanforge/ibanforge-api/revisions/43464a65312b/schema)
