Documentation

vaaya / docs / reference

Errors & billing

The billing rule is simple: you pay only for calls that succeed. Everything else returns a typed error and charges nothing.

Status codes

StatusMeaning
400 bad_requestParams failed the action’s schema — the response lists the exact issues.
401 invalid_tokenMissing or revoked key. Check /api-keys.
402Out of credit (top up at /balance), or the price exceeded your max_cost_cents ceiling.
404 unknown_service_actionNo such {service}/{action} — check GET /api/run or vaaya/discover.
429Too many concurrent jobs, or the LLM router’s daily cap — retry after the Retry-After header.
503 upstream_not_configuredThe vendor behind this action isn’t provisioned right now. Nothing charged; try an alternative from the same service page.

What gets billed

  • Success (ok: true) — you pay the action’s price; charged_cents reports it.
  • Upstream failure (vendor 4xx/5xx) — charged nothing.
  • Rejected calls (schema, credit, max_cost_cents) — nothing ran, nothing charged.
  • Free actions (status polling, vaaya/discover) — always 0¢.

Seeing your spend

Every call — success or failure — appears with its price and result on your transactions. The transaction_id in each response envelope links the API result to that ledger row.