Scrub API
POST/v1/tools/quotefree

Price work before it runs

Prices one call or a whole chain of calls before anything runs, with the workspace spending cap. Writes nothing and charges nothing. Where Scrub can tell, it also says about how big a file would come out.

Fields

FieldTypeDefaultWhat it is
stepsarrayRequiredThe calls, in the order they would run, each priced on its own. A chain run as one job is one step, {tool: "run_flow", arguments} as run_flow takes them, priced once on the whole chain.
recommendarrayNoneSettings, by name, such as voice or quality, to recommend a value for where a step leaves one out: that step answers recommended, the best for its material first, each with why where Scrub gives one. A step that sets it answers none. Free.

Call it

Request

curl -X POST https://app.scrub.app/v1/tools/quote \
  -H "Authorization: Bearer $SCRUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"steps":[{"tool":"…","arguments":{}}]}'

Answer

{
  "ok": true,
  "result": {
    "steps": [
      {
        "tool": "text_to_speech",
        "price_usd": "$…",
        "workings": "…",
        "defaults": {
          "voice": "Kore"
        }
      }
    ],
    "total_usd": "$…",
    "cap": {
      "…": "…"
    },
    "balance": {
      "…": "…"
    }
  }
}

What result holds is said above.

Every call can also answer an error: what comes back. Try it with your key from Account.