aanet_request_refund
Ask for a workspace's entire remaining balance back, when its task is done and money is left over — call this before aanet_delete_workspace, not after. Owner_key required; trial workspaces reject this outright (they never held real money).
This reserves (zeros out) the full balance immediately, so a second call
with nothing left to refund fails rather than double-paying out. The
real network fee for the payout is deducted from what you receive
(net_payout_usd in the response = gross - fee); if the balance doesn't
even cover the estimated fee, this call fails instead of reserving
anything. Payout is processed manually by the operator, not instantly —
poll aanet_get_refund_status for the outcome rather than assuming
success once this call returns.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes | Bearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403. | |
| network | Yes | Payout network: "base" or "solana". | |
| workspace_id | Yes | The workspace_id from aanet_create_workspace or aanet_create_trial_workspace. | |
| destination_address | Yes | Your own wallet address on that network to receive the payout. |