Buy Neumann credits with your saved card
buy_creditsBuys Neumann credits by charging the payment card already saved on your account. Credits pay for runs once the free runs for the day are used up, or for a model too large to run free. Use this when an account is low on credits and the user has agreed to the purchase; to see the balance and the live price first, call check_account_and_credits. No saved card is needed to call it: if none is saved yet, it buys nothing and charges nothing: it returns payment_status checkout_required and a checkout_url, which the user opens in a browser to save a card before you call this tool again. It returns the credits bought, the new balance, the payment status and, when a card is needed, the checkout_url. It needs a Neumann account: send your key, or your signed-in token, in the Authorization header as a Bearer credential. No Neumann tool takes an api_key argument. Buying credits needs the neumann:billing scope when you are signed in rather than using a key. Cost: charges the payment card saved on your account for each credit, currently $0.50 per credit (check_account_and_credits shows the live price). It needs an account, and credits are what a run costs once your free runs for the day are gone -- 1 credit for a small run or 5 for a large one.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"credits": "<credits>"
},
"name": "buy_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| credits | Yes | How many credits to buy. At least 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| billing | No | Who you are and what this call cost: principal, auth source, credits debited and balance, or the anonymous allowance left today. | |
| new_balance | Yes | Credit balance after the purchase. | |
| checkout_url | No | Set only when payment_status is checkout_required: a link for the user to open in a browser and save a card. Call buy_credits again afterwards to complete the purchase. Otherwise null. | |
| payment_status | Yes | The card payment's status, for example succeeded. checkout_required means no card was saved, so nothing was bought or charged; open checkout_url to save one. | |
| credits_purchased | Yes | Credits added. |