$0.03
per call · USD Coin on Base
Choose the lowest-cost or highest-value feasible allocation, assignment, selection, or resource mix from caller-supplied options, capacities, budgets, and eligibility rules, with independently verified feasibility evidence and solver optimality/gap information.
Endpoint
POST https://api.vrsai.tech/v1/capabilities/decision_optimization3
Calls / 30d
2
Unique payers / 30d
Sep 3
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://api.vrsai.tech/v1/capabilities/decision_optimization", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"demands": [
{
"id": "warehouse_1",
"requirement": "80",
"satisfaction": "exact"
}
],
"lanes": [
{
"demand_id": "warehouse_1",
"source_id": "supplier_a",
"unit_cost": "2"
},
{
"demand_id": "warehouse_1",
"source_id": "supplier_b",
"unit_cost": "5"
}
],
"objective": "minimize_total_cost",
"problem_type": "allocation",
"sources": [
{
"capacity": "100",
"id": "supplier_a"
},
{
"capacity": "100",
"id": "supplier_b"
}
]
}),
});
const data = await res.json();curl -X POST \
"https://api.vrsai.tech/v1/capabilities/decision_optimization" \
-H "Content-Type: application/json" \
-d '{"demands":[{"id":"warehouse_1","requirement":"80","satisfaction":"exact"}],"lanes":[{"demand_id":"warehouse_1","source_id":"supplier_a","unit_cost":"2"},{"demand_id":"warehouse_1","source_id":"supplier_b","unit_cost":"5"}],"objective":"minimize_total_cost","problem_type":"allocation","sources":[{"capacity":"100","id":"supplier_a"},{"capacity":"100","id":"supplier_b"}]}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"decision": {
"lanes": [
{
"demand_id": "warehouse_1",
"quantity": "80",
"source_id": "supplier_a"
},
{
"demand_id": "warehouse_1",
"quantity": "0",
"source_id": "supplier_b"
}
],
"problem_type": "allocation",
"source_activations": [
{
"active": true,
"source_id": "supplier_a"
},
{
"active": false,
"source_id": "supplier_b"
}
]
},
"diagnostics": {
"binding_constraints": []
},
"economics": {
"objective": "minimize_total_cost",
"objective_value": "160",
"sense": "minimize"
},
"evidence": {
"constraints_checked": 3,
"constraints_violated": 0,
"decision_fingerprint": "v1:43b9ac81c64b8f95e46837a5103ac13d8f27ad829b32ee06463079bf0be83b81",
"input_fingerprint": "v1:23bf4e29934aad481275e4bf38cb45617bbbe664ad3dd5d771af2fe3d4d1c938",
"model_fingerprint": "v1:392d8ab317c91b7339a92c2b9fa4b2b30f326f2175955d6fa362c4b57287c5a5",
"ruleset_version": "decision_optimization_r1",
"solver": "highs",
"solver_version": "1.15.2"
},
"machine_action": "CONSUME_OPTIMAL_DECISION",
"problem_type": "allocation",
"quality": {
"absolute_gap": "0",
"best_bound": "160",
"relative_gap": "0",
"semantic_feasibility_verified": true,
"solution_uniqueness": "unknown",
"solver_optimality": "optimal_within_profile_tolerance"
},
"status": "OPTIMAL"
}Payment details
0x6746dff7bdb1ed4940dbe50024795ad97cba09afUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of AI & Inference and the homepage with a featured placement.
More from vrsai & similar services
vrsai · Capabilities Package Install Preflight
api.vrsai.tech
Check an exact npm or PyPI package version immediately before installation using current registry, vulnerability, malicious-package, withdrawal/deprecation, and verified provenance evidence. Returns ALLOW, REVIEW, BLOCK, or UNKNOWN with machine-readable reasons.
vrsai · Capabilities SQL Preflight
api.vrsai.tech
Check PostgreSQL SQL immediately before execution to prevent destructive or unsafe database changes by AI agents and automated systems.
vrsai · Capabilities Openapi Agent Readiness
api.vrsai.tech
Assess an OpenAPI description for autonomous-agent usability.