---
title: "Topup Ai Balance"
method: POST
path: "/api/billing/ai-balance/topup"
tags: ["billing"]
---

# Topup Ai Balance

`POST /api/billing/ai-balance/topup`

## Request

- Base URL: `https://softkiln.com` (the document declares no server; this is the origin it was published from)
- URL: `https://softkiln.com/api/billing/ai-balance/topup`
- Auth: none declared

Buy AI credit now. Org owner/admin.

Returns the invoice status rather than a success flag, because "charged" and
"credited" are different moments: the balance goes up when the webhook
confirms payment, never here. A caller that renders this response as
"credit added" would be showing money that can still be reversed.

## Query parameters

- `org` string, nullable

## Request body

- TopupRequest
  - `amount_microcents` integer, required

## Response `200`

Successful Response

- TopupOut
  - `status` string, required
  - `hosted_invoice_url` string, nullable, required
  - `balance` AiBalanceOut, required
    - `balance_microcents` integer, required
    - `reserved_microcents` integer, required
    - `available_microcents` integer, required
    - `auto_refill_enabled` boolean, required
    - `low_balance_threshold_microcents` integer, nullable, required
    - `auto_refill_amount_microcents` integer, nullable, required
    - `has_payment_method` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/softkiln/apis/app-manager-api.md) · [All operations](https://skmtc.dev/softkiln/apis/app-manager-api/llms.txt) · [OpenAPI document](https://skmtc.dev/softkiln/apis/app-manager-api/revisions/de2b674a7f21?raw)
