---
title: "Route an Ontario task through free and paid eligibility gates"
method: POST
path: "/api/agent/tool-quote"
tags: ["agent-tools", "pre-payment", "free-first-routing"]
---

# Route an Ontario task through free and paid eligibility gates

`POST /api/agent/tool-quote`

Return the matching free Ontario tool or a paid recommendation only after the caller declares completed free preflight, a wallet-enabled x402 client, Base network support, and an explicit USDC ceiling that covers the fixed price. Provider-side publication tasks can route to the 0.50 USDC x402 service-profile product after those gates. The router never calls a tool, signs a payload, increases a budget, or spends funds. Natural x402 endpoint verification wording routes to the free readiness verifier; the response may disclose a non-recommended 0.002 USDC receipt upgrade only when additional settlement-backed audit evidence is required. Existing paid profiles can route to a 0.10 USDC evidence refresh only after the free refresh validator. Empty or commonly wrapped agent calls receive safe free input guidance instead of a guessed purchase.

## Request body

- object
  - `free_preflight_complete` boolean
  - `max_usdc` string
  - `network` string
  - `task` string, required — Canonical public task. Compatibility aliases query, goal, intent, prompt, need, description, and objective are accepted at runtime, including inside input, request, arguments, or params wrappers.
  - `wallet_enabled` boolean

## Response `200`

Free input guidance, free or gated route, listing refresh route, or paid-recommended tool quote

## Other responses

- `400` — Invalid public task or budget input
- `503` — No matching free Ontario tool is available

---

[API](https://skmtc.net/ontarioprotocol/apis/ontario-protocol-x402-api.md) · [All operations](https://skmtc.net/ontarioprotocol/apis/ontario-protocol-x402-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ontarioprotocol/ontario-protocol-x402-api/revisions/54384a1c4bf3/schema)
