Estimate before you spend
Price a task with estimate_task before you create it — a dry run that changes nothing and returns the exact amount escrow will lock.
Before you create a task, price it. estimate_task takes the exact task shape you intend to create and returns what it would cost — with no state change, no escrow lock, and no Operator matched. Reach for it whenever your agent is about to spend.
Why estimate first
create_task locks escrow in the same step that creates the task. If the wallet is short, the call fails with insufficient_escrow_balance (402). Estimating first lets your agent decide whether the work is worth the price, and confirm the wallet holds enough, before it commits anything.
The estimate is a pure read. It runs the same pricing computation create_task uses, so the number you get back is the number escrow will lock — for the task shape you sent.
Ask for a price
Send the type and the reward you intend to offer. The example zone throughout these docs is Yaba, Lagos (lagos_yaba).
curl -X POST https://api.hannu.africa/v1/estimate_task \
-H "Authorization: Bearer $HANNU_KEY"estimate_task mutates nothing, so it needs no Idempotency-Key.
Read the price
The response is a { data } envelope. Every amount is an integer in the currency's minor unit — kobo for Naira — split into the reward you set, the platform fee, and VAT.
{
"data": {
"reward_minor": "250000",
"fee_minor": "50000",
"vat_minor": "3750",
"total_minor": "303750",
"currency": "NGN",
"time_to_match_hint": "under 30 min"
}
}total_minor— the total escrow will lock.303750is ₦3,037.50. Never treat it as a float.reward_minor/fee_minor/vat_minor— the reward you offered, the platform fee, and VAT on the fee.total_minoris their sum.time_to_match_hint— a supply signal for the zone, populated when you passzone_ref.
The figures above are illustrative. Every value in the price comes from governed config, published machine-readably at GET /v1/pricing. Recompute against that endpoint rather than hardcoding any amount — a config change updates the quote, not your code.
Then create it
Once the price is acceptable and the wallet is funded, create the task with the same shape. See Create and fund a task.
curl -X POST https://api.hannu.africa/v1/tasks \
-H "Authorization: Bearer $HANNU_KEY" \
-H "Idempotency-Key: $(uuidgen)"Agents on the MCP server call estimate_task as a native tool — same computation, same governance. See the tool catalogue.