Billing
Hold then settle, what is charged, balance checks and Monero top-ups.
The balance is prepaid in US dollars and spent per token. Each model has an input price and an output price per million tokens, listed on the pricing page and in GET /v1/models.
Hold, then settle
- Hold. Before a request goes to the model, its worst-case cost is moved out of the balance: the estimated input tokens plus
max_tokensof output. If you send nomax_tokens, 4096 is used. - Settle. When the reply ends, the real cost is computed from the token usage the model reported. That amount is charged and the rest of the hold returns to the balance at once.
The hold is why the balance dips while a request is running. A lower max_tokens means a smaller hold. If the real cost turns out higher than the hold, the difference is taken from the balance, never below zero.
When the balance is short
- If the balance cannot cover the
max_tokensyou asked for, the request still runs. The output cap is lowered to what the balance covers, so the reply may end early with a length stop reason. - If the balance cannot cover the input plus a minimal reply of 16 tokens, the request gets
402 insufficient_balanceand nothing is charged. - Requests in progress hold their worst case. Several large parallel requests on a small balance can push later ones to a lower cap or a 402 until the first ones settle.
What is charged
| Outcome | Charge |
|---|---|
| Reply completed | Reported input and output tokens. |
| Stream broke partway | Tokens delivered up to the break. |
| You closed the stream | Tokens produced up to the disconnect. |
| Error before any reply (4xx, 502, 503) | Nothing. The hold is returned in full. |
- Reasoning tokens are output tokens.
- Cost is input tokens times the input price plus output tokens times the output price, rounded up to a millionth of a dollar.
- If the model does not report usage, for example when a stream breaks, the count is estimated from the length of the text at one token per three characters. Such requests are marked as estimated in your usage.
- The estimate used for the hold counts each image as 2,500 input tokens. A request may carry at most 16 images, each at most 4 MB. The final charge uses reported usage.
Checking balance and usage
curl https://veil.st/api/account \
-H "Authorization: Bearer ak_..."{
"key_hint": "ak_1a2b…9f0e",
"status": "active",
"balance_micro": 9987340,
"held_micro": 0,
"limits": { "requests_per_minute": 60, "concurrent_requests": 8 },
"usage_30d": {
"by_model": [
{
"model_id": "deepseek-v4.1-flash-1017-abliterated",
"requests": 3,
"input_tokens": 42,
"output_tokens": 21,
"cost_micro": 37
}
],
"by_day": [{ "day": "2026-01-01", "requests": 3, "cost_micro": 37 }]
},
"recent": [
{
"created_at": "2026-01-01T12:00:00.000Z",
"model_id": "deepseek-v4.1-flash-1017-abliterated",
"input_tokens": 14,
"output_tokens": 7,
"cost_micro": 13,
"estimated": false,
"outcome": "ok"
}
]
}balance_micro and cost_micro are millionths of a dollar, so 9987340 is $9.98734. held_micro is the total of open holds. The usage records hold counts and cost only. There is no prompt or reply text in them, because we do not store any.
Topping up
Create an invoice in the dashboard or through the API. An invoice fixes the exchange rate and asks for an exact Monero amount.
# Create an invoice for 10 US dollars of credit.
curl -X POST https://veil.st/api/topups \
-H "Authorization: Bearer ak_..." \
-H "Content-Type: application/json" \
-d '{"usd": 10}'
# Check it later, using the id from the reply.
curl https://veil.st/api/topups/123 \
-H "Authorization: Bearer ak_..."{
"id": 123,
"usd": 10,
"amount_xmr": "0.061728395062",
"address": "<our Monero address>",
"uri": "monero:<our Monero address>?tx_amount=0.061728395062",
"status": "pending",
"confirmations": 0,
"confirmations_needed": 10,
"created_at": "2026-01-01T12:00:00.000Z",
"expires_at": "2026-01-01T13:00:00.000Z",
"qr_svg": "<svg ...>"
}- Send exactly
amount_xmr, to the last digit. The amount is how the payment is matched to your account. A different amount is not matched automatically. - Status goes from
pendingtoconfirmingwhen the payment is seen, then topaidafterconfirmations_neededconfirmations. The credit is the US dollar amount of the invoice. - An unpaid invoice expires at
expires_at. An account can have up to five unpaid invoices at once. - The reply states the minimum and maximum amount when you send a value outside them. See the refund policy for payments that went wrong.