---
title: "Purchase Api Credits"
method: POST
path: "/api/wallet/api-credits"
tags: ["wallet"]
---

# Purchase Api Credits

`POST /api/wallet/api-credits`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/wallet/api-credits`
- Auth: HTTP bearer

Creates a Stripe Checkout session that buys AI credits.

The session is a one-time payment on the account's Stripe customer.
``invoice_creation`` is on so the purchase produces a Stripe invoice
(receipt PDF in the portal, a row in the invoice history), tagged
``type=ai_credits`` like the Checkout session itself. The webhook for
``checkout.session.completed`` raises the budget; the invoice events
for this invoice match no billing engine and only sync the receipt.

## Request body

- ApiCreditsRequest
  - `amount_cents` integer, required: AI credits to buy, in cents, minimum $5 (500)

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/maritime/apis/maritime-api.md) - [All operations](https://skmtc.dev/maritime/apis/maritime-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maritime/apis/maritime-api/revisions/acd712090ad6?raw)
