Schedule of Reductions calculation API
A public, source labeled implementation of the federal Direct Loan Schedule of Reductions calculation. Use it to inspect inputs, replay published scenarios, compare your own implementation, and challenge the math with a citation.
curl https://sor.myproduct.life/api/public/v1/healthThe API is anonymous, requires no key, and returns JSON for every successful response and handled error.
Quickstart
curl -X POST https://sor.myproduct.life/api/public/v1/calculate \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Request-Id: demo-sor-001" \
-d "$(curl -s https://sor.myproduct.life/api/public/v1/scenarios | jq '.scenarios[0].input')"const scenarios = await fetch("https://sor.myproduct.life/api/public/v1/scenarios")
.then((response) => response.json());
const calculation = await fetch("https://sor.myproduct.life/api/public/v1/calculate", {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"X-Request-Id": "demo-sor-001",
},
body: JSON.stringify(scenarios.scenarios[0].input),
}).then((response) => response.json());
console.log(calculation.data);import requests
base = "https://sor.myproduct.life/api/public/v1"
scenarios = requests.get(f"{base}/scenarios", timeout=20).json()
response = requests.post(
f"{base}/calculate",
json=scenarios["scenarios"][0]["input"],
headers={"X-Request-Id": "demo-sor-001"},
timeout=20,
)
print(response.status_code)
print(response.json()["data"])Developer Tools
Use this as the source contract for tooling, SDK review, and automated checks.
Open Swagger Editor, choose Import URL, and paste the OpenAPI JSON URL.
Import the OpenAPI URL, or run the exported collection from the repo with Newman.
Use this when a response appears wrong and you have a public citation.
https://sor.myproduct.life/api/public/v2/openapi.jsonhttps://sor.myproduct.life/mcp. It exposes list_scenarios, calculate_sor, compare_sor, advanced_student_estimate, and check_loan_limit_exception, including the optional child/module allocation layer in calculation requests. MCP clients must support remote MCP and may require workspace or administrator approval. Streamable HTTP clients should send Accept: application/json, text/event-stream and retain the MCP session identifier when returned during initialization. Parent PLUS aggregate usage must be supplied by the caller for the adverse-credit path; remaining aggregate eligibility still needs school verification.Endpoint Reference
| Method | Path | Purpose |
|---|---|---|
| GET | /api/public/v2/health | Check liveness, current engine and MCP versions, release, policy snapshot, and source marker. |
| GET | /api/public/v2/scenarios | Fetch the public parity fixture catalog with inputs, expected outputs, and source IDs. |
| POST | /api/public/v2/calculate | Run the current SOR engine with calculation stages, warnings, and release metadata. |
| POST | /api/public/v2/student-estimate | Estimate a standard two-term student scenario with explicit school-review boundaries. |
| POST | /api/public/v2/compare | Compare two complete scenarios through independent shared-engine runs. |
| POST | /api/public/v2/student-advanced | Run an institution-specific advanced student projection with stages, warnings, and external checks. |
| POST | /api/public/v2/migration-compare | Compare an approved V55 baseline fixture with the current V56 result. |
| GET | /api/public/v2/openapi.json | Read the V2 OpenAPI 3.1 contract for tooling and integration review. |
| POST | /mcp | Use the read-only remote MCP server to discover scenarios and run the current engine with follow-up questions and explanations. |
Response Contract
Successful calculations return a `data` block from the shared engine and a `meta` block with `engineVersion`, `policyYear`, `policySnapshotDate`, `deploymentMarker`, `sourceCommit` (null), `sourceCommitStatus`, `policyStatus`, `sourceSet`, `citations`, `computedAt`, and `requestId`.
The live API sets `Cache-Control: no-store` and supports a caller supplied `X-Request-Id` for reproducible issue reports.
Rate Limits And Safety
The public API is free and anonymous with a best effort limit of 30 requests per minute per client fingerprint. The limiter uses a daily salted hash so raw IPs are not stored by the application.
This is an educational and validation tool, not an official ED calculator, legal advice, or an institutional policy substitute.
The SOR API does not calculate NSLDS remaining aggregate limits, lifetime maximum eligibility, Parent PLUS remaining eligibility, or consolidation allocation. Apply those ceilings before relying on a graduate, professional, or Grad PLUS result.
Validation Codes
Source Status
Final regulation or stable public guidance supports the rule.
The behavior is supported by current public guidance, but may change after final federal guidance.
Challenge The Calculation
If a published scenario or API response looks wrong, open a Scenario Challenge with the exact input JSON, observed output, expected output, and a public regulatory citation. Accepted challenges become fixtures first, then code changes.