---
title: "Top up AI Wallet"
method: POST
path: "/ais/{aiId}/billing/wallet-topups"
tags: ["Billing"]
---

# Top up AI Wallet

`POST /ais/{aiId}/billing/wallet-topups`

## Request

- Base URL: `https://api.darwin.so/api/v1`
- URL: `https://api.darwin.so/api/v1/ais/{aiId}/billing/wallet-topups`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Creates a PaymentIntent that adds nonwithdrawable funded money to the AI Wallet after payment succeeds. The response separates the wallet credit, processing cost, and card charge.

## Path parameters

- `aiId` string, required

## Headers

- `Idempotency-Key` string, required

## Request body

- WalletTopupRequest
  - `amountMinor` integer, required: Wallet amount to credit, in USD cents. The returned card charge includes processing costs.

## Response `201`

Client details for confirming the wallet top-up.

- WalletTopupIntent
  - `clientSecret` string, nullable, required
  - `publishableKey` string, required
  - `amountMinor` integer, required
  - `walletCreditAmountMinor` integer, required
  - `currency` 'usd', required

## Other responses

- `400`: The request was invalid.
- `401`: The API key or access token is missing, invalid, expired, or revoked.
- `403`: The principal does not have the required scope or resource access.
- `404`: The resource was not found for this principal.

---

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