agents.writerslogic.com/api/v1/recipe-scale
Scales up to 60 ingredient quantities by a servings ratio or a factor for an agent resizing a recipe or batch formula, applying per-ingredient rules the caller declares: linear (the labelled default), power exponent, fixed amounts, min/max clamps and rounding steps, with an optional display unit via unit-convert. Reports what rounding did (relative drift, rounds-to-zero). It does NOT know which in
POST
https://agents.writerslogic.com/api/v1/recipe-scaleUptimeNot checked yet
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agents.writerslogic.com/api/v1/recipe-scale", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"toServings":6,"ingredients":[{"name":"flour","unit":"g","quantity":240},{"name":"eggs","unit":"each","roundTo":1,"quantity":2},{"name":"chili flakes","rule":"power","unit":"tsp_metric","exponent":0.5,"quantity":1}],"fromServings":4}),
});
console.log(await res.json());Example input
{
"toServings": 6,
"ingredients": [
{
"name": "flour",
"unit": "g",
"quantity": 240
},
{
"name": "eggs",
"unit": "each",
"roundTo": 1,
"quantity": 2
},
{
"name": "chili flakes",
"rule": "power",
"unit": "tsp_metric",
"exponent": 0.5,
"quantity": 1
}
],
"fromServings": 4
}