24trust / 100

Safe Weekly Spend

by safe-weekly-spend-api-production.nickjcrouse.workers.dev in Markets & finance

x402 APIFailing, checked 4 h ago

Safe weekly spend for gig workers with irregular income: from recent payouts and fixed bills, returns discretionary $/week after tax set-aside, savings and bills, plus tax set-aside % and buffer days. Same math as the Gig Worker Irregular Income Budget spreadsheet.

POST
https://safe-weekly-spend-api-production.nickjcrouse.workers.dev/v1/safe-weekly-spend
Price
$0.01
per call in USDC
Uptime
22.2%
last 30 days
Response time
362 ms
464 ms slowest 5%
Last check
Failed
4 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 4 h ago: Connection failed (ENOTFOUND)

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://safe-weekly-spend-api-production.nickjcrouse.workers.dev/v1/safe-weekly-spend

Each call costs $0.01 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://safe-weekly-spend-api-production.nickjcrouse.workers.dev/v1/safe-weekly-spend
content-type: application/json

{
  "bills": [
    {
      "amount": 1100,
      "frequency": "Monthly",
      "name": "Rent"
    },
    {
      "amount": 70,
      "frequency": "Monthly",
      "name": "Phone"
    },
    {
      "amount": 100,
      "frequency": "Weekly",
      "name": "Groceries"
    },
    {
      "amount": 240,
      "frequency": "Annual",
      "name": "Car registration"
    }
  ],
  "payouts": [
    {
      "amount": 1200,
      "date": "2026-07-10",
      "platform": "DoorDash"
    },
    {
      "amount": 1500,
      "date": "2026-07-24",
      "platform": "Uber"
    },
    {
      "amount": 900,
      "date": "2026-08-07",
      "platform": "DoorDash"
    },
    {
      "amount": 1100,
      "date": "2026-08-21",
      "platform": "Instacart"
    },
    {
      "amount": 2000,
      "date": "2026-09-04",
      "platform": "Uber"
    },
    {
      "amount": 1800,
      "date": "2026-09-18"
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
billsarray of objectYesFixed bills / bare-bones essentials.
payoutsarray of objectYesRecent gig payouts (gross + tips). Ideally 2-6 months.
settingsobjectNo

Example response

The provider's example. We can't check it without paying.

Example response, 63 lines
{
  "breakdown": {
    "avg_monthly_available": 1841.67,
    "avg_monthly_income": 2833.33,
    "avg_monthly_savings": 283.33,
    "avg_monthly_tax_set_aside": 708.33,
    "buffer_balance": 846.67,
    "buffer_months_covered": 0.52,
    "buffer_target": 4870,
    "fixed_bills_monthly": 1623.33,
    "monthly": [
      {
        "available": 1755,
        "buffer_end": 131.67,
        "extra": 0,
        "from_buffer": 0,
        "income": 2700,
        "month": "2026-07",
        "savings": 270,
        "steady_salary": 1623.33,
        "surplus": 131.67,
        "tax_set_aside": 675,
        "to_buffer": 131.67,
        "unfunded_gap": 0
      },
      {
        "available": 1300,
        "buffer_end": 0,
        "extra": 0,
        "from_buffer": 131.67,
        "income": 2000,
        "month": "2026-08",
        "savings": 200,
        "steady_salary": 1623.33,
        "surplus": -323.33,
        "tax_set_aside": 500,
        "to_buffer": 0,
        "unfunded_gap": 191.67
      },
      {
        "available": 2470,
        "buffer_end": 846.67,
        "extra": 0,
        "from_buffer": 0,
        "income": 3800,
        "month": "2026-09",
        "savings": 380,
        "steady_salary": 1623.33,
        "surplus": 846.67,
        "tax_set_aside": 950,
        "to_buffer": 846.67,
        "unfunded_gap": 0
      }
    ],
    "months_with_income": 3,
    "safe_monthly_spend": 218.33,
    "savings_pct": 0.1,
    "steady_salary_monthly": 1623.33
  },
  "buffer_days": 15,
  "safe_weekly_spend": 50.38,
  "tax_set_aside_pct": 0.25
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.01.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://safe-weekly-spend-api-production.nickjcrouse.workers.dev/v1/safe-weekly-spend' \
  -H 'content-type: application/json' \
  --data-raw '{"bills":[{"amount":1100,"frequency":"Monthly","name":"Rent"},{"amount":70,"frequency":"Monthly","name":"Phone"},{"amount":100,"frequency":"Weekly","name":"Groceries"},{"amount":240,"frequency":"Annual","name":"Car registration"}],"payouts":[{"amount":1200,"date":"2026-07-10","platform":"DoorDash"},{"amount":1500,"date":"2026-07-24","platform":"Uber"},{"amount":900,"date":"2026-08-07","platform":"DoorDash"},{"amount":1100,"date":"2026-08-21","platform":"Instacart"},{"amount":2000,"date":"2026-09-04","platform":"Uber"},{"amount":1800,"date":"2026-09-18"}]}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://safe-weekly-spend-api-production.nickjcrouse.workers.dev/v1/safe-weekly-spend' \
  -H 'content-type: application/json' \
  --data-raw '{"bills":[{"amount":1100,"frequency":"Monthly","name":"Rent"},{"amount":70,"frequency":"Monthly","name":"Phone"},{"amount":100,"frequency":"Weekly","name":"Groceries"},{"amount":240,"frequency":"Annual","name":"Car registration"}],"payouts":[{"amount":1200,"date":"2026-07-10","platform":"DoorDash"},{"amount":1500,"date":"2026-07-24","platform":"Uber"},{"amount":900,"date":"2026-08-07","platform":"DoorDash"},{"amount":1100,"date":"2026-08-21","platform":"Instacart"},{"amount":2000,"date":"2026-09-04","platform":"Uber"},{"amount":1800,"date":"2026-09-18"}]}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fsafe-weekly-spend-api-production.nickjcrouse.workers.dev%2Fv1%2Fsafe-weekly-spend&method=POST
const res = await pay("https://safe-weekly-spend-api-production.nickjcrouse.workers.dev/v1/safe-weekly-spend", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "bills": [
      {
        "amount": 1100,
        "frequency": "Monthly",
        "name": "Rent"
      },
      {
        "amount": 70,
        "frequency": "Monthly",
        "name": "Phone"
      },
      {
        "amount": 100,
        "frequency": "Weekly",
        "name": "Groceries"
      },
      {
        "amount": 240,
        "frequency": "Annual",
        "name": "Car registration"
      }
    ],
    "payouts": [
      {
        "amount": 1200,
        "date": "2026-07-10",
        "platform": "DoorDash"
      },
      {
        "amount": 1500,
        "date": "2026-07-24",
        "platform": "Uber"
      },
      {
        "amount": 900,
        "date": "2026-08-07",
        "platform": "DoorDash"
      },
      {
        "amount": 1100,
        "date": "2026-08-21",
        "platform": "Instacart"
      },
      {
        "amount": 2000,
        "date": "2026-09-04",
        "platform": "Uber"
      },
      {
        "amount": 1800,
        "date": "2026-09-18"
      }
    ]
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://safe-weekly-spend-api-production.nickjcrouse.workers.dev/v1/safe-weekly-spend",
        json={
            "bills": [
                {
                    "amount": 1100,
                    "frequency": "Monthly",
                    "name": "Rent",
                },
                {
                    "amount": 70,
                    "frequency": "Monthly",
                    "name": "Phone",
                },
                {
                    "amount": 100,
                    "frequency": "Weekly",
                    "name": "Groceries",
                },
                {
                    "amount": 240,
                    "frequency": "Annual",
                    "name": "Car registration",
                },
            ],
            "payouts": [
                {
                    "amount": 1200,
                    "date": "2026-07-10",
                    "platform": "DoorDash",
                },
                {
                    "amount": 1500,
                    "date": "2026-07-24",
                    "platform": "Uber",
                },
                {
                    "amount": 900,
                    "date": "2026-08-07",
                    "platform": "DoorDash",
                },
                {
                    "amount": 1100,
                    "date": "2026-08-21",
                    "platform": "Instacart",
                },
                {
                    "amount": 2000,
                    "date": "2026-09-04",
                    "platform": "Uber",
                },
                {
                    "amount": 1800,
                    "date": "2026-09-18",
                },
            ],
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoConnection failed (ENOTFOUND)---
10 h agoConnection failed (ENOTFOUND)---
16 h agoConnection failed (ENOTFOUND)---
22 h agoConnection failed (ENOTFOUND)---
27 h agoConnection failed (ENOTFOUND)---
Show 4 older checks
32 h agoConnection failed (ENOTFOUND)---
37 h agoConnection failed (ENOTFOUND)---
42 h agoPassed402362 ms$0.01
47 h agoPassed402464 ms$0.01