ZapAPI Docs
Get StartedConceptsAI GatewayGuidesPayment GatewaySDKAPI ReferenceResources
ApiAi account

Create a Lightning topup invoice for AI credits

POST
/api/v1/ai/topup

Authorization

bearer

Header Parameters

X-API-Version?string

API version for header-based versioning

Default"1"
Value in"1""2"

Request Body

application/json
  1. body
amountSats*number

Sats to top up. The Lightning invoice is created for exactly this amount; on payment the balance is credited amount + bonus (default +5%).

Range100 <= value <= 10000000

Response Body

BOLT11 invoice created

Example Request
curl -X POST 'http://localhost:3001/api/v1/ai/topup' \  -H 'Content-Type: application/json' \  -d '{  "amountSats": 5000}'
Example Response201
Empty