{
    "openapi": "3.0.3",
    "info": {
        "title": "Compound Mint Money Calculator API",
        "version": "1.5.0",
        "description": "Free, read-only money math (compound interest, Rule of 72, FIRE number, Coast FIRE, 401(k) match, debt payoff, savings goal) from compoundmint.com, plus /answer for a plain question. No key; 500 calls per IP per day. MCP server: https://compoundmint.com/wp-json/mint/v1/mcp. Educational content only. Not financial advice. Examples are hypothetical, not guaranteed.",
        "contact": {
            "url": "https://compoundmint.com/contact/"
        },
        "termsOfService": "https://compoundmint.com/terms-of-use/"
    },
    "servers": [
        {
            "url": "https://compoundmint.com/wp-json/mint/v1"
        }
    ],
    "paths": {
        "/compound-interest": {
            "get": {
                "operationId": "calculate_compound_interest",
                "summary": "Compound interest calculator",
                "description": "Use when a user asks how much money will grow, e.g. \"how much will $500 a month grow in 20 years?\", \"what will $10,000 be worth in 10 years at 7%?\" or \"how much interest will I earn?\". Future value of a starting amount plus optional monthly contributions at a yearly rate, with total contributed and total interest. Compounding is monthly by default (annually, quarterly, semiannually or daily on request). Returns a plain-English explanation, the assumptions and the matching Compound Mint calculator page. Example: $10,000 at 7% for 10 years compounded annually = $19,671.51.",
                "parameters": [
                    {
                        "name": "principal",
                        "in": "query",
                        "required": false,
                        "description": "Starting amount in USD (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000,
                            "default": 0
                        },
                        "example": 10000
                    },
                    {
                        "name": "monthly_contribution",
                        "in": "query",
                        "required": false,
                        "description": "USD added every month (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10000000,
                            "default": 0
                        },
                        "example": 500
                    },
                    {
                        "name": "annual_rate",
                        "in": "query",
                        "required": false,
                        "description": "Yearly rate in percent, e.g. 7 (default 8).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 50,
                            "default": 8
                        },
                        "example": 7
                    },
                    {
                        "name": "years",
                        "in": "query",
                        "required": true,
                        "description": "Years, up to 100.",
                        "schema": {
                            "type": "number",
                            "minimum": 0.0833,
                            "maximum": 100
                        },
                        "example": 20
                    },
                    {
                        "name": "compounding",
                        "in": "query",
                        "required": false,
                        "description": "How often interest compounds (default monthly).",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "monthly",
                                "annually",
                                "quarterly",
                                "semiannually",
                                "daily"
                            ],
                            "default": "monthly"
                        }
                    },
                    {
                        "name": "contribution_timing",
                        "in": "query",
                        "required": false,
                        "description": "Deposits at the end (default) or beginning of each month.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "end",
                                "beginning"
                            ],
                            "default": "end"
                        }
                    },
                    {
                        "name": "show_yearly",
                        "in": "query",
                        "required": false,
                        "description": "Include a year by year table.",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/rule-of-72": {
            "get": {
                "operationId": "rule_of_72",
                "summary": "Rule of 72 (years to double money)",
                "description": "Use when a user asks how long it takes to double money (\"how long to double my money at 8%?\") or what return doubles it in a number of years. How long money takes to double at a yearly rate (send annual_rate), or the rate needed to double in a number of years (send years). Gives the Rule of 72 estimate and the exact figure. Example: at 8% money doubles in about 9 years.",
                "parameters": [
                    {
                        "name": "annual_rate",
                        "in": "query",
                        "required": false,
                        "description": "Yearly return in percent, e.g. 8.",
                        "schema": {
                            "type": "number",
                            "minimum": 0.01,
                            "maximum": 100
                        },
                        "example": 8
                    },
                    {
                        "name": "years",
                        "in": "query",
                        "required": false,
                        "description": "Years to double, to get the rate needed.",
                        "schema": {
                            "type": "number",
                            "minimum": 0.1,
                            "maximum": 200
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/coast-fire": {
            "get": {
                "operationId": "calculate_coast_fire",
                "summary": "Coast FIRE calculator",
                "description": "Use when a user asks about Coast FIRE, e.g. \"what is my Coast FIRE number at 30?\" or \"can I stop saving for retirement and let it grow?\". FIRE number (yearly spending / withdrawal rate) and Coast FIRE number: what you need invested now so growth alone reaches your FIRE number by retirement age. Add current savings and a monthly contribution to see the gap and the age you reach Coast FIRE. Uses a real (after inflation) return, 7% by default; same math as the Compound Mint Coast FIRE calculator.",
                "parameters": [
                    {
                        "name": "current_age",
                        "in": "query",
                        "required": true,
                        "description": "Age now.",
                        "schema": {
                            "type": "number",
                            "minimum": 14,
                            "maximum": 99
                        },
                        "example": 30
                    },
                    {
                        "name": "retirement_age",
                        "in": "query",
                        "required": true,
                        "description": "Age you want to retire.",
                        "schema": {
                            "type": "number",
                            "minimum": 15,
                            "maximum": 100
                        },
                        "example": 65
                    },
                    {
                        "name": "annual_spending",
                        "in": "query",
                        "required": false,
                        "description": "Yearly spending in retirement in today's USD (or send fire_number).",
                        "schema": {
                            "type": "number",
                            "minimum": 1000,
                            "maximum": 10000000
                        },
                        "example": 50000
                    },
                    {
                        "name": "fire_number",
                        "in": "query",
                        "required": false,
                        "description": "Total needed to retire in USD (instead of annual_spending).",
                        "schema": {
                            "type": "number",
                            "minimum": 10000,
                            "maximum": 1000000000
                        }
                    },
                    {
                        "name": "withdrawal_rate",
                        "in": "query",
                        "required": false,
                        "description": "Safe withdrawal rate percent (default 4).",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 10,
                            "default": 4
                        }
                    },
                    {
                        "name": "annual_return",
                        "in": "query",
                        "required": false,
                        "description": "Real yearly return percent after inflation (default 7).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 20,
                            "default": 7
                        }
                    },
                    {
                        "name": "current_savings",
                        "in": "query",
                        "required": false,
                        "description": "USD invested now (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000,
                            "default": 0
                        },
                        "example": 40000
                    },
                    {
                        "name": "monthly_contribution",
                        "in": "query",
                        "required": false,
                        "description": "USD invested each month (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10000000,
                            "default": 0
                        },
                        "example": 500
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/fire-number": {
            "get": {
                "operationId": "calculate_fire_number",
                "summary": "FIRE number and when you can retire",
                "description": "Use when a user asks when they can retire or how much they need to retire, e.g. \"when can I retire if I invest $1,500 a month?\", \"what is my FIRE number if I spend $40,000 a year?\" or \"how many years until I can stop working?\". Returns the FIRE number (yearly spending / withdrawal rate, 25 times spending at 4%) and, from current savings and a monthly contribution, the months and years to reach it and the age if current_age is given. Uses a real (after inflation) return, 7% by default; same math as the Compound Mint FIRE number calculator.",
                "parameters": [
                    {
                        "name": "annual_spending",
                        "in": "query",
                        "required": false,
                        "description": "Yearly spending in retirement in today's USD (or send fire_number).",
                        "schema": {
                            "type": "number",
                            "minimum": 1000,
                            "maximum": 10000000
                        },
                        "example": 40000
                    },
                    {
                        "name": "fire_number",
                        "in": "query",
                        "required": false,
                        "description": "Total needed to retire in USD (instead of annual_spending).",
                        "schema": {
                            "type": "number",
                            "minimum": 10000,
                            "maximum": 1000000000
                        }
                    },
                    {
                        "name": "current_savings",
                        "in": "query",
                        "required": false,
                        "description": "USD invested now (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000,
                            "default": 0
                        },
                        "example": 50000
                    },
                    {
                        "name": "monthly_contribution",
                        "in": "query",
                        "required": false,
                        "description": "USD invested each month (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10000000,
                            "default": 0
                        },
                        "example": 1500
                    },
                    {
                        "name": "withdrawal_rate",
                        "in": "query",
                        "required": false,
                        "description": "Safe withdrawal rate percent (default 4).",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 10,
                            "default": 4
                        }
                    },
                    {
                        "name": "annual_return",
                        "in": "query",
                        "required": false,
                        "description": "Real yearly return percent after inflation (default 7).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 20,
                            "default": 7
                        }
                    },
                    {
                        "name": "current_age",
                        "in": "query",
                        "required": false,
                        "description": "Optional age now, to show the age you reach it.",
                        "schema": {
                            "type": "number",
                            "minimum": 14,
                            "maximum": 99
                        },
                        "example": 30
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/holiday-budget": {
            "get": {
                "operationId": "calculate_holiday_budget",
                "summary": "Holiday budget calculator",
                "description": "Use when a user asks how much to spend on the holidays or on Christmas gifts, e.g. \"how much should I budget for Christmas?\", \"can I afford $50 gifts for 8 people?\" or \"how much do I need to save each week for the holidays?\". Adds gifts (people x budget per person), travel, food and decor; returns the total, its share of monthly take-home pay, weeks of saving needed, cash by the holidays and a spend limit (spend this, not more), plus the per-person gift budget that fits. Same math as the compoundmint.com holiday budget calculator. Educational only, not financial advice.",
                "parameters": [
                    {
                        "name": "people",
                        "in": "query",
                        "required": true,
                        "description": "People on the gift list.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 500
                        },
                        "example": 8
                    },
                    {
                        "name": "per_person_budget",
                        "in": "query",
                        "required": true,
                        "description": "Gift budget per person in USD.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100000
                        },
                        "example": 50
                    },
                    {
                        "name": "travel",
                        "in": "query",
                        "required": false,
                        "description": "Travel in USD (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000,
                            "default": 0
                        },
                        "example": 300
                    },
                    {
                        "name": "food",
                        "in": "query",
                        "required": false,
                        "description": "Food and hosting in USD (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000,
                            "default": 0
                        },
                        "example": 250
                    },
                    {
                        "name": "decor",
                        "in": "query",
                        "required": false,
                        "description": "Decor, wrapping and cards in USD (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000,
                            "default": 0
                        },
                        "example": 100
                    },
                    {
                        "name": "monthly_income",
                        "in": "query",
                        "required": false,
                        "description": "Monthly take-home pay in USD (optional, for the percent of income).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100000000
                        },
                        "example": 4500
                    },
                    {
                        "name": "already_saved",
                        "in": "query",
                        "required": false,
                        "description": "USD already saved for the holidays (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100000000,
                            "default": 0
                        },
                        "example": 200
                    },
                    {
                        "name": "weekly_savings",
                        "in": "query",
                        "required": false,
                        "description": "USD you can save each week (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000,
                            "default": 0
                        },
                        "example": 125
                    },
                    {
                        "name": "weeks_left",
                        "in": "query",
                        "required": false,
                        "description": "Weeks until the holidays (default: full weeks until December 25).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 104
                        },
                        "example": 7
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/gift-budget": {
            "get": {
                "operationId": "calculate_gift_budget",
                "summary": "Christmas gift budget calculator",
                "description": "Use when a user asks how to split a Christmas or holiday gift budget between people, how much to spend on each person, or what it costs to put gifts on a credit card, e.g. \"split $800 for gifts between 5 people\", \"I have $600: Mom 30%, Dad 30%, my sister 40%\", \"is $150 for mom and $100 for dad within my $300 budget?\" or \"how much interest if I put $800 of gifts on a 22% card for 6 months?\". Budget comes from total_budget, or monthly_income x percent_of_income, or already_saved + monthly_savings x months_until_shopping. Splits it evenly, by percent or by a set amount per person; returns each person's amount, the total, what is left or over budget and, with card_apr, the monthly payment and interest. Same math as the compoundmint.com Christmas gift budget calculator. For a whole holiday plan with travel, food and decor use calculate_holiday_budget. Educational only, not financial advice.",
                "parameters": [
                    {
                        "name": "total_budget",
                        "in": "query",
                        "required": false,
                        "description": "Total gift budget in USD, e.g. 800. Or send monthly_income + percent_of_income, or monthly_savings + months_until_shopping.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10000000
                        },
                        "example": 800
                    },
                    {
                        "name": "people",
                        "in": "query",
                        "required": true,
                        "description": "People on the gift list, up to 100. Each item: a name, plus percent (for a percent split) or amount in USD (for an amount split). Names alone give an even split. Text also works: \"Mom:30%, Dad:30%, Sister:40%\" (percents) or \"Mom:150, Dad:100\" (USD). As a JSON string in a GET query, or a JSON array in a POST body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "[{\"name\":\"Mom\",\"percent\":30},{\"name\":\"Dad\",\"percent\":30},{\"name\":\"Sister\",\"percent\":40}]"
                    },
                    {
                        "name": "number_of_people",
                        "in": "query",
                        "required": false,
                        "description": "Instead of people: how many people, for an even split.",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "split",
                        "in": "query",
                        "required": false,
                        "description": "How to split the budget. Default: percent if people carry percents, amount if they carry amounts, else equal.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "equal",
                                "percent",
                                "amount"
                            ]
                        }
                    },
                    {
                        "name": "monthly_income",
                        "in": "query",
                        "required": false,
                        "description": "Monthly take-home pay in USD, used with percent_of_income when there is no total_budget.",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 100000000
                        }
                    },
                    {
                        "name": "percent_of_income",
                        "in": "query",
                        "required": false,
                        "description": "Percent of one month of take-home pay for gifts, e.g. 10 for 10%.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "already_saved",
                        "in": "query",
                        "required": false,
                        "description": "USD already saved for gifts (savings route, default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100000000,
                            "default": 0
                        }
                    },
                    {
                        "name": "monthly_savings",
                        "in": "query",
                        "required": false,
                        "description": "USD you can save each month before you shop (savings route).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000
                        }
                    },
                    {
                        "name": "months_until_shopping",
                        "in": "query",
                        "required": false,
                        "description": "Months you can save before you shop (needed with monthly_savings).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 24
                        }
                    },
                    {
                        "name": "card_apr",
                        "in": "query",
                        "required": false,
                        "description": "Optional: credit card APR in percent, e.g. 22, to see the interest if the gifts go on a card.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                        },
                        "example": 22
                    },
                    {
                        "name": "payoff_months",
                        "in": "query",
                        "required": false,
                        "description": "Optional: months to pay the card off, e.g. 6. Without it you get 3, 6 and 12 months.",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 120
                        },
                        "example": 6
                    },
                    {
                        "name": "amount_on_card",
                        "in": "query",
                        "required": false,
                        "description": "Optional: USD put on the card (default: all planned gifts).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10000000
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/401k-match": {
            "get": {
                "operationId": "calculate_401k_match",
                "summary": "401(k) employer match calculator",
                "description": "Use when a user asks about a 401(k) employer match, e.g. \"am I getting my full 401(k) match?\", \"how much is my employer match worth?\" or \"what percent should I put in to get the full match?\". Your yearly 401(k) contribution, the employer match, the percent needed for the full match and any match left unclaimed, using 2026 IRS limits ($24,500 employee, catch-up at 50 and over and at 60 to 63, $72,000 overall, $360,000 pay cap). Supports a two tier formula such as 100% up to 3% then 50% of the next 2%. Optional years and annual_return project the balance.",
                "parameters": [
                    {
                        "name": "salary",
                        "in": "query",
                        "required": true,
                        "description": "Yearly pay in USD.",
                        "schema": {
                            "type": "number",
                            "minimum": 1000,
                            "maximum": 10000000
                        },
                        "example": 60000
                    },
                    {
                        "name": "contribution_percent",
                        "in": "query",
                        "required": true,
                        "description": "Percent of pay you contribute, e.g. 4.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                        },
                        "example": 4
                    },
                    {
                        "name": "match_percent",
                        "in": "query",
                        "required": false,
                        "description": "Employer match rate percent, e.g. 50 for 50 cents per dollar (default 50).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 200,
                            "default": 50
                        },
                        "example": 50
                    },
                    {
                        "name": "match_up_to_percent",
                        "in": "query",
                        "required": false,
                        "description": "Percent of pay the match applies to (default 6).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100,
                            "default": 6
                        },
                        "example": 6
                    },
                    {
                        "name": "tier2_match_percent",
                        "in": "query",
                        "required": false,
                        "description": "Optional second tier match rate percent.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 200,
                            "default": 0
                        }
                    },
                    {
                        "name": "tier2_up_to_percent",
                        "in": "query",
                        "required": false,
                        "description": "Optional second tier size, percent of pay.",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100,
                            "default": 0
                        }
                    },
                    {
                        "name": "age",
                        "in": "query",
                        "required": false,
                        "description": "Optional age, for catch-up limits.",
                        "schema": {
                            "type": "number",
                            "minimum": 14,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "years",
                        "in": "query",
                        "required": false,
                        "description": "Optional years to project.",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 60
                        }
                    },
                    {
                        "name": "annual_return",
                        "in": "query",
                        "required": false,
                        "description": "Yearly return percent for the projection (default 7).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 20,
                            "default": 7
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/debt-payoff": {
            "get": {
                "operationId": "calculate_debt_payoff",
                "summary": "Debt payoff calculator",
                "description": "Use when a user asks how long it takes to pay off a credit card or loan, what payment clears it by a date, or avalanche vs snowball, e.g. \"how long to pay off $5,000 at 24% paying $200 a month?\" or \"what payment pays off my credit card in 2 years?\". One debt: months to pay off and total interest at a monthly payment, or the payment needed to be debt free in target_months. Several debts: send debts (each with name, balance, apr, min_payment) and extra_payment to compare the avalanche and snowball methods.",
                "parameters": [
                    {
                        "name": "balance",
                        "in": "query",
                        "required": false,
                        "description": "What you owe in USD (one debt).",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 100000000
                        },
                        "example": 10000
                    },
                    {
                        "name": "apr",
                        "in": "query",
                        "required": false,
                        "description": "Yearly interest rate percent (one debt).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                        },
                        "example": 18
                    },
                    {
                        "name": "monthly_payment",
                        "in": "query",
                        "required": false,
                        "description": "USD paid each month (or send target_months).",
                        "schema": {
                            "type": "number",
                            "minimum": 0.01,
                            "maximum": 100000000
                        }
                    },
                    {
                        "name": "target_months",
                        "in": "query",
                        "required": false,
                        "description": "Months to be debt free (or send monthly_payment).",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 600
                        },
                        "example": 36
                    },
                    {
                        "name": "debts",
                        "in": "query",
                        "required": false,
                        "description": "Several debts, up to 20. As a JSON string in a GET query, or a JSON array in a POST body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "[{\"name\":\"Visa\",\"balance\":5000,\"apr\":24,\"min_payment\":150},{\"name\":\"Car loan\",\"balance\":12000,\"apr\":7,\"min_payment\":300}]"
                    },
                    {
                        "name": "extra_payment",
                        "in": "query",
                        "required": false,
                        "description": "USD a month on top of all minimums (several debts).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10000000,
                            "default": 0
                        }
                    },
                    {
                        "name": "strategy",
                        "in": "query",
                        "required": false,
                        "description": "Several debts: which method (default compare).",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "avalanche",
                                "snowball",
                                "compare"
                            ],
                            "default": "compare"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/savings-goal": {
            "get": {
                "operationId": "calculate_savings_goal",
                "summary": "Savings goal calculator",
                "description": "Use when a user asks how much to save each month for a goal, e.g. \"how much do I need to save each month to have $50,000 in 5 years?\" or \"how much a month to reach $1 million in 30 years?\". Monthly amount to save to reach a target in a number of years at a yearly rate, counting money already saved. Example: $1,000,000 in 30 years at 8% needs about $671 a month.",
                "parameters": [
                    {
                        "name": "target_amount",
                        "in": "query",
                        "required": true,
                        "description": "Goal in USD.",
                        "schema": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 1000000000
                        },
                        "example": 50000
                    },
                    {
                        "name": "years",
                        "in": "query",
                        "required": true,
                        "description": "Years to reach it.",
                        "schema": {
                            "type": "number",
                            "minimum": 0.0833,
                            "maximum": 100
                        },
                        "example": 5
                    },
                    {
                        "name": "annual_rate",
                        "in": "query",
                        "required": false,
                        "description": "Yearly return percent (default 0, no growth).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 50,
                            "default": 0
                        },
                        "example": 4
                    },
                    {
                        "name": "current_savings",
                        "in": "query",
                        "required": false,
                        "description": "USD already saved (default 0).",
                        "schema": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1000000000,
                            "default": 0
                        },
                        "example": 5000
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with explanation, assumptions, source_page and disclaimer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Result"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or invalid input; the body names the parameter and gives an example call."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/answer": {
            "get": {
                "operationId": "answer_money_question",
                "summary": "Answer a money question in plain words",
                "description": "Use first when a user asks a money math question in plain words, such as \"how much will $500 a month grow in 20 years?\", \"when can I retire if I spend $40,000 a year?\", \"how long to pay off $5,000 on my credit card at 24% paying $200 a month?\", \"how much do I need to save each month to have $50,000 in 5 years?\", \"how long to double my money at 8%?\" or \"am I getting my full 401(k) match?\". Reads the amounts, rates, ages and years from the question, picks the matching Compound Mint calculator (compound interest, Rule of 72, FIRE number, Coast FIRE, 401(k) match, debt payoff, savings goal), runs it and returns the answer with what it understood, the explanation, the assumptions, source_page to cite and related_reading. When a needed number is missing it returns status need_more_info with the exact question to ask the user.",
                "parameters": [
                    {
                        "name": "question",
                        "in": "query",
                        "required": true,
                        "description": "The money question in plain words.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "status answered (the calculator result with explanation, assumptions, source_page, related_reading and disclaimer), need_more_info (missing and ask_user), no_match or no_question (example questions)."
                    },
                    "429": {
                        "description": "Daily limit reached."
                    }
                }
            }
        },
        "/calculators": {
            "get": {
                "operationId": "list_calculators",
                "summary": "List calculators with parameters and example calls",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/health": {
            "get": {
                "operationId": "health",
                "summary": "Service status",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Result": {
                "type": "object",
                "properties": {
                    "calculator": {
                        "type": "string"
                    },
                    "inputs": {
                        "type": "object"
                    },
                    "result": {
                        "type": "object"
                    },
                    "explanation": {
                        "type": "string"
                    },
                    "assumptions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "source_page": {
                        "type": "string",
                        "format": "uri"
                    },
                    "learn_more": {
                        "type": "string",
                        "format": "uri",
                        "description": "The matching compoundmint.com calculator or guide page, to try other numbers."
                    },
                    "learn_more_text": {
                        "type": "string"
                    },
                    "open_in_calculator": {
                        "type": "string",
                        "format": "uri"
                    },
                    "related_guide": {
                        "type": "string",
                        "format": "uri"
                    },
                    "related_reading": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "title": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "why": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "disclaimer": {
                        "type": "string"
                    }
                }
            }
        }
    }
}