# vrsai Decision Optimization

> vrsai Decision Optimization is a paid API for AI agents from api.vrsai.tech, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-09).

Solves allocation, assignment, selection, and resource-mix problems to find the lowest-cost or highest-value feasible solution given caller-supplied options, capacities, budgets, and eligibility rules.

## Facts

- Endpoint: POST https://api.vrsai.tech/v1/capabilities/decision_optimization?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vrsai-decision-optimization-bb23734c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YTN8dMBb_vMFcR93lig4v

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability vrsai-decision-optimization-bb23734c -d '<json body>'
```

Example prompt: I need to figure out the cheapest way to fulfill 80 units of demand at warehouse_1 — I have two suppliers: supplier_a at $2/unit with capacity 80 and supplier_b at $3/unit with capacity 80. Can you run an allocation optimization to minimize total cost and tell me the optimal quantities and whether the solution is provably optimal?

## When to prefer this

Choose this endpoint when you need a mathematically verified, cost- or value-optimal allocation, assignment, or selection decision with proof of optimality (gap = 0) and auditable fingerprints — not just a heuristic or greedy approximation. Ideal when you have structured supply/demand, capacity, budget, or eligibility constraints and need a defensible, reproducible decision. Prefer over custom code when you want built-in feasibility verification and solver metadata without standing up your own OR infrastructure.

## Known failure modes

- Infeasible problem (conflicting constraints or demand exceeding total capacity) — returns INFEASIBLE status
- Unbounded problem (missing bound constraints) — returns UNBOUNDED status
- Malformed input body (missing required fields) — returns HTTP 400 with validation error
- Solver timeout on very large problems — may return a non-optimal solution with gap information
- Ambiguous eligibility rules that cannot be expressed as linear constraints — may silently drop or misapply rules

## How this service works

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.

## Output

Returns a JSON object with: (1) a status field (e.g. OPTIMAL), (2) the full decision object showing quantities or assignments per option, (3) economics including the objective value and optimization sense, (4) quality metrics including absolute/relative gap and solver optimality rating, (5) evidence including solver name/version, constraint counts, input and model fingerprints for auditability, and (6) diagnostics listing any binding constraints.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "OPTIMAL",
  "quality": {
   "best_bound": "160",
   "absolute_gap": "0",
   "relative_gap": "0",
   "solver_optimality": "optimal_within_profile_tolerance",
   "solution_uniqueness": "unknown",
   "semantic_feasibility_verified": true
  },
  "decision": {
   "lanes": [
    {
     "quantity": "80",
     "demand_id": "warehouse_1",
     "source_id": "supplier_a"
    },
    {
     "quantity": "0",
     "demand_id": "warehouse_1",
     "source_id": "supplier_b"
    }
   ],
   "problem_type": "allocation",
   "source_activations": [
    {
     "active": true,
     "source_id": "supplier_a"
    },
    {
     "active": false,
     "source_id": "supplier_b"
    }
   ]
  },
  "evidence": {
   "solver": "highs",
   "solver_version": "1.15.2",
   "ruleset_version": "decision_optimization_r1",
   "input_fingerprint": "v1:23bf4e29934aad481275e4bf38cb45617bbbe664ad3dd5d771af2fe3d4d1c938",
   "model_fingerprint": "v1:392d8ab317c91b7339a92c2b9fa4b2b30f326f2175955d6fa362c4b57287c5a5",
   "constraints_checked": 3,
   "constraints_violated": 0,
   "decision_fingerprint": "v1:43b9ac81c64b8f95e46837a5103ac13d8f27ad829b32ee06463079bf0be83b81"
  },
  "economics": {
   "sense": "minimize",
   "objective": "minimize_total_cost",
   "objective_value": "160"
  },
  "diagnostics": {
   "binding_constraints": []
  },
  "problem_type": "allocation",
  "machine_action": "CONSUME_OPTIMAL_DECISION"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vrsai-decision-optimization-bb23734c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vrsai.tech](https://www.zero.xyz/host/api.vrsai.tech/llms.txt)
