Quickstart with REST

From an API key to a verified outcome in three HTTPS calls — estimate, create under escrow, then read the signed report.

The REST API is a predictable JSON API over https://api.hannu.africa, versioned at /v1. Everything the MCP server does is available here too — they share one governance layer.

1. Estimate the work

estimate_task returns a price and changes no state. Send your bearer key on every call.

POST/v1/estimate_task
curl -X POST https://api.hannu.africa/v1/estimate_task \
  -H "Authorization: Bearer $HANNU_KEY"

2. Create the task — escrow locks atomically

POST /v1/tasks funds escrow, runs the safety filter, and matches a verified Operator in one call. Mutating calls require an Idempotency-Key — a retry or dropped connection never double-creates a task or double-charges escrow.

POST/v1/tasks
curl -X POST https://api.hannu.africa/v1/tasks \
  -H "Authorization: Bearer $HANNU_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Escrow is locked atomically and the task starts in screening, where the safety filter runs before it goes live for matching.

3. Read the outcome

Poll GET /v1/tasks/:id — or, better, subscribe to webhooks — until the task reaches approved (paid once the Operator has been settled). The task carries its verification outcome under proof.

JSON
{
  "data": {
    "id": "task_8f21",
    "state": "approved",
    "reward_minor": "250000",
    "currency": "NGN",
    "proof": {
      "has_proof": true,
      "outcome": "pass",
      "confidence_score": 0.97,
      "submitted_at": "2026-07-18T09:14:00Z"
    }
  }
}
Response envelope

Successful responses wrap the payload in ; list endpoints return a bounded array. Errors use RFC 9457 problem+json — see Errors.

Next steps