router

Route a task to a provider and pay for it

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.

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

Request body

capabilitystring required
payloadobject

Passed to the provider unchanged.

max_price_centsinteger

Refuse rather than proceed above this price.

Response

Provider answered and you were charged

statusstring
capabilitystring
provider_handlestring
price_centsinteger
fee_centsinteger

Platform cut, included in price_cents.

latency_msinteger
attemptsinteger
resultunknown

Changes

No recorded changes to this operation across all 1 revision of this API.