---
title: "Purchase credits with a saved card (agent auto-recharge)"
method: POST
path: "/api/v1/billing/purchase-credits"
tags: ["Billing", "Billing"]
---

# Purchase credits with a saved card (agent auto-recharge)

`POST /api/v1/billing/purchase-credits`

## Request

- Base URL: `https://fermi.kromatic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://fermi.kromatic.com/api/v1/billing/purchase-credits`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Use a previously saved payment method to buy credits without a checkout redirect. Requires a prior checkout session to have saved a card. Designed for agent auto-recharge flows.

## Request body

- PurchaseCreditsRequest
  - `credits` integer, required: Number of credits to purchase

## Response `200`

Successful Response

- PurchaseCreditsResponse
  - `credits_purchased` integer, required
  - `new_balance` integer, required
  - `payment_status` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kromatic/apis/fermi.md) · [All operations](https://skmtc.dev/kromatic/apis/fermi/llms.txt) · [OpenAPI document](https://skmtc.dev/kromatic/apis/fermi/revisions/75a37f8067c2?raw)
