{"openapi":"3.1.0","info":{"title":"EveryCalc API","version":"1.0.0","description":"Machine-readable versions of the EveryCalc calculators. Each endpoint mirrors an interactive calculator at everycalc.xyz and returns a calculator_url deep link to it."},"servers":[{"url":"https://everycalc.xyz"}],"paths":{"/api/v1/health":{"get":{"summary":"Liveness check","operationId":"health","responses":{"200":{"description":"Service is up."}}}},"/api/v1/calculate/mortgage":{"get":{"summary":"Mortgage payment breakdown","description":"Monthly P&I via the amortization formula, plus tax, insurance, PMI, and HOA. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_mortgage","parameters":[{"name":"home_price","in":"query","required":true,"description":"Purchase price in USD.","schema":{"type":"number"}},{"name":"down_payment_usd","in":"query","required":false,"description":"Down payment in USD (wins over down_payment_pct).","schema":{"type":"number"}},{"name":"down_payment_pct","in":"query","required":false,"description":"Down payment percent; default 20.","schema":{"type":"number"}},{"name":"annual_rate_pct","in":"query","required":true,"description":"Annual rate percent, e.g. 6.5.","schema":{"type":"number"}},{"name":"term_years","in":"query","required":false,"description":"Loan term in years; default 30.","schema":{"type":"number"}},{"name":"property_tax_annual","in":"query","required":false,"description":"Yearly property tax in USD.","schema":{"type":"number"}},{"name":"home_insurance_annual","in":"query","required":false,"description":"Yearly homeowner insurance in USD.","schema":{"type":"number"}},{"name":"pmi_rate_pct","in":"query","required":false,"description":"Annual PMI rate percent; default 0.5.","schema":{"type":"number"}},{"name":"hoa_monthly","in":"query","required":false,"description":"Monthly HOA dues in USD.","schema":{"type":"number"}},{"name":"include_schedule","in":"query","description":"Set to true to include the yearly amortization schedule.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/calculate/refinance":{"get":{"summary":"Refinance break-even","description":"Break-even month and lifetime savings of refinancing. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_refinance","parameters":[{"name":"balance","in":"query","required":true,"description":"Current loan balance in USD.","schema":{"type":"number"}},{"name":"current_rate_pct","in":"query","required":true,"description":"Current annual rate percent.","schema":{"type":"number"}},{"name":"years_left","in":"query","required":true,"description":"Years remaining on current loan.","schema":{"type":"number"}},{"name":"new_rate_pct","in":"query","required":true,"description":"Offered annual rate percent.","schema":{"type":"number"}},{"name":"new_term_years","in":"query","required":false,"description":"New loan term in years; default 30.","schema":{"type":"number"}},{"name":"closing_costs","in":"query","required":false,"description":"Closing costs in USD.","schema":{"type":"number"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/calculate/affordability":{"get":{"summary":"Home affordability","description":"Maximum home price from income using the 28/36 rule. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_affordability","parameters":[{"name":"annual_income","in":"query","required":true,"description":"Gross yearly household income in USD.","schema":{"type":"number"}},{"name":"monthly_debts","in":"query","required":false,"description":"Existing monthly debt payments in USD.","schema":{"type":"number"}},{"name":"down_payment","in":"query","required":false,"description":"Cash available for down payment in USD.","schema":{"type":"number"}},{"name":"annual_rate_pct","in":"query","required":true,"description":"Expected mortgage rate percent.","schema":{"type":"number"}},{"name":"term_years","in":"query","required":false,"description":"Loan term in years; default 30.","schema":{"type":"number"}},{"name":"front_ratio_pct","in":"query","required":false,"description":"Front-end ratio percent; default 28.","schema":{"type":"number"}},{"name":"back_ratio_pct","in":"query","required":false,"description":"Back-end ratio percent; default 36.","schema":{"type":"number"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/calculate/loan":{"get":{"summary":"Loan payment","description":"Monthly payment, total interest, and schedule for an amortizing loan. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_loan","parameters":[{"name":"principal","in":"query","required":true,"description":"Amount borrowed in USD.","schema":{"type":"number"}},{"name":"annual_rate_pct","in":"query","required":true,"description":"Annual rate percent.","schema":{"type":"number"}},{"name":"term_years","in":"query","required":true,"description":"Term in years.","schema":{"type":"number"}},{"name":"include_schedule","in":"query","description":"Set to true to include the yearly amortization schedule.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/calculate/compound-interest":{"get":{"summary":"Compound interest projection","description":"Future value with monthly contributions and monthly compounding. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_compound_interest","parameters":[{"name":"principal","in":"query","required":false,"description":"Starting balance in USD.","schema":{"type":"number"}},{"name":"monthly_contribution","in":"query","required":false,"description":"Added at the end of each month in USD.","schema":{"type":"number"}},{"name":"annual_rate_pct","in":"query","required":true,"description":"Annual return percent.","schema":{"type":"number"}},{"name":"years","in":"query","required":false,"description":"Projection horizon; default 30, max 100.","schema":{"type":"number"}},{"name":"include_schedule","in":"query","description":"Set to true to include the yearly growth schedule.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/calculate/percentage":{"get":{"summary":"Percentage calculations","description":"Three modes: percent_of (x percent of y), what_percent (x is what percent of y), percent_change (change from old to new). Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_percentage","parameters":[{"name":"mode","in":"query","required":true,"description":"One of percent_of, what_percent, percent_change.","schema":{"type":"string","enum":["percent_of","what_percent","percent_change"]}},{"name":"x","in":"query","required":false,"description":"For percent_of: the percent. For what_percent: the part.","schema":{"type":"number"}},{"name":"y","in":"query","required":false,"description":"For percent_of: the whole. For what_percent: the whole.","schema":{"type":"number"}},{"name":"old","in":"query","required":false,"description":"For percent_change: the starting value.","schema":{"type":"number"}},{"name":"new","in":"query","required":false,"description":"For percent_change: the ending value.","schema":{"type":"number"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/calculate/tip":{"get":{"summary":"Tip and bill split","description":"Tip amount, total, and per-person split. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_tip","parameters":[{"name":"bill","in":"query","required":true,"description":"Bill amount in USD.","schema":{"type":"number"}},{"name":"tip_pct","in":"query","required":false,"description":"Tip percent; default 20.","schema":{"type":"number"}},{"name":"people","in":"query","required":false,"description":"Number of people; default 1.","schema":{"type":"number"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/calculate/salary":{"get":{"summary":"Salary conversions","description":"Convert between hourly, daily, weekly, biweekly, monthly, and annual pay. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.","operationId":"calculate_salary","parameters":[{"name":"mode","in":"query","description":"hourly (default) or annual.","schema":{"type":"string","enum":["hourly","annual"]}},{"name":"hourly","in":"query","required":false,"description":"Hourly rate in USD (hourly mode).","schema":{"type":"number"}},{"name":"annual","in":"query","required":false,"description":"Annual salary in USD (annual mode).","schema":{"type":"number"}},{"name":"hours_per_week","in":"query","required":false,"description":"Hours worked per week; default 40.","schema":{"type":"number"}}],"responses":{"200":{"description":"Calculation result."},"400":{"description":"Invalid input."}}}},"/api/v1/openapi.json":{"get":{"summary":"OpenAPI schema","operationId":"openapi","description":"This document; importable into ChatGPT GPT Actions.","responses":{"200":{"description":"The OpenAPI 3.1 document."}}}}}}