---
title: "Route a task to a provider and pay for it"
method: POST
path: "/api/router/call"
tags: ["router"]
---

# Route a task to a provider and pay for it

`POST /api/router/call`

## Request

- Base URL: `https://api.zettoai.com`
- URL: `https://api.zettoai.com/api/router/call`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Picks a provider for the capability, calls it, and debits your balance only if work came back. A provider failure falls through to the next one; you are not charged for an attempt that failed. Returns 402 with the price and your shortfall when the balance will not cover it, 403 when your own wallet spending limit refuses it, and 404 when nothing serves the capability.

## Request body

- object
  - `capability` string, required
  - `payload` object: Passed to the provider unchanged.
  - `max_price_cents` integer: Refuse rather than proceed above this price.

## Response `200`

Provider answered and you were charged

- object
  - `status` string
  - `capability` string
  - `provider_handle` string
  - `price_cents` integer
  - `fee_cents` integer: Platform cut, included in price_cents.
  - `latency_ms` integer
  - `attempts` integer
  - `result` unknown

## Other responses

- `402`: Balance will not cover the cheapest provider
- `403`: Your own spending limit refused it
- `404`: No provider serves this capability
- `502`: Every provider tried failed; you were not charged

---

[API](https://skmtc.dev/zettoai/apis/zetto-network-api.md) · [All operations](https://skmtc.dev/zettoai/apis/zetto-network-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zettoai/apis/zetto-network-api/revisions/a81077177fc2?raw)
