Skip to content

New: deep research, balance and auto-reload tools in the keyless MCP server. Install in one line

Auto-reload

Off by default. When on, the card saved at checkout buys a pack whenever the balance drops below the threshold (default 1,000), within a monthly cap.

Turn it on when you buy (the switch under the packs on pricing), on the success page, or with the API below. The MCP tools contextfetch_balance and contextfetch_auto_reload call the same endpoints.

POST/v1/billing/auto-reload

Credits: 0

Turn auto-reload on or off, or change it. After a deduction leaves the balance strictly below threshold, the card saved at checkout buys pack once, as long as this UTC month's auto-reload spend plus the pack price stays within monthly_max_usd. Credits arrive when the payment succeeds. A declined payment turns auto-reload off and sets last_error. Through the API a key can turn it off, lower values or change the pack, but monthly_max_usd can never go above $500; a higher cap needs the browser success page. MCP tool: contextfetch_auto_reload.

Parameters

NameInTypeRequiredDescription
Authorization / x-api-keyheaderstringyesThe key to change.
enabledbodyboolyestrue to turn auto-reload on, false to turn it off.
thresholdbodyintnoReload when credits drop below this. 100 to 100,000, default 1,000.
packbody"instant" | "builder" | "scale"noPack to buy on each reload, default builder.
monthly_max_usdbodynumbernoMonthly spending cap in USD, at most 500 through the API. Default 500.

Example request

curl -s https://api.contextfetch.dev/v1/billing/auto-reload \  -H "Authorization: Bearer YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{"enabled":true,"threshold":1000,"pack":"builder","monthly_max_usd":500}'

Example response

{
  "credits": 14873,
  "auto_reload": {
    "enabled": true,
    "threshold": 1000,
    "pack": "builder",
    "monthly_max_usd": 500,
    "spent_this_month_usd": 50,
    "last_error": null
  },
  "burn_rate_per_day": 412
}

Errors

StatusBodyWhen
401{"error": "invalid_api_key"}The key is unknown.
409{"error": "no_payment_method", "message": "..."}Auto-reload requested for a key without a saved card. The message carries a buy link; buy with auto-reload on to save one.
422-Request validation failed, e.g. a query over 2,000 characters or a threshold outside 100 to 100,000.