{
  "openapi": "3.1.0",
  "info": {
    "title": "SJI Advisory public health insurance estimates",
    "version": "1.1.0",
    "description": "Free read-only household estimates for people and AI assistants. No authentication, enrollment or lead creation. Cite source, assumptions, requested year and calculation timestamp."
  },
  "servers": [
    {
      "url": "https://sjiadvisory.com"
    }
  ],
  "security": [],
  "paths": {
    "/api/estimate": {
      "get": {
        "operationId": "getHealthInsuranceEstimate",
        "summary": "Get one household estimate; omit all parameters for service instructions",
        "parameters": [
          {
            "name": "zip",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{5}$",
              "description": "Five-digit US ZIP code; retain leading zeroes."
            }
          },
          {
            "name": "countyfips",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{5}$",
              "description": "Required when the ZIP crosses counties. Use a returned candidate; ask the user to choose."
            }
          },
          {
            "name": "age",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 18,
              "maximum": 64,
              "description": "Primary adult age."
            }
          },
          {
            "name": "sex",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "male",
                "female"
              ],
              "description": "Primary adult sex used for rating."
            }
          },
          {
            "name": "spouse_age",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 18,
              "maximum": 64,
              "description": "Optional spouse age; requires spouse_sex."
            }
          },
          {
            "name": "spouse_sex",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "male",
                "female"
              ],
              "description": "Optional spouse sex used for rating; requires spouse_age."
            }
          },
          {
            "name": "kids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6,
              "default": 0,
              "description": "Children to include, approximated at age 10 each."
            }
          },
          {
            "name": "income",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000000,
              "description": "Expected annual tax-household income, in USD for the requested year."
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "enum": [
                2026,
                2027
              ],
              "description": "Explicit coverage year. Unsupported years return unavailable; no year is substituted."
            }
          },
          {
            "name": "affordable_employer_coverage",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "description": "True only if everyone quoted has an affordable qualifying employer offer. Mixed eligibility needs an individual review."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "With inputs: estimate. With no query: service documentation, input definitions and hypothetical example links.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "status",
                        "calculated_at",
                        "inputs",
                        "private",
                        "marketplace",
                        "citation"
                      ],
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "const": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "available",
                            "partial",
                            "unavailable"
                          ]
                        },
                        "calculated_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Original calculation timestamp; successful results may be reused for up to five minutes."
                        },
                        "requested_plan_year": {
                          "type": "integer"
                        },
                        "currency": {
                          "const": "USD"
                        },
                        "payment_period": {
                          "const": "month"
                        },
                        "inputs": {
                          "type": "object",
                          "properties": {
                            "zip": {
                              "type": "string",
                              "pattern": "^[0-9]{5}$",
                              "description": "Five-digit US ZIP code; retain leading zeroes."
                            },
                            "countyfips": {
                              "type": "string",
                              "pattern": "^[0-9]{5}$",
                              "description": "Required when the ZIP crosses counties. Use a returned candidate; ask the user to choose."
                            },
                            "age": {
                              "type": "integer",
                              "minimum": 18,
                              "maximum": 64,
                              "description": "Primary adult age."
                            },
                            "sex": {
                              "type": "string",
                              "enum": [
                                "male",
                                "female"
                              ],
                              "description": "Primary adult sex used for rating."
                            },
                            "spouse_age": {
                              "type": "integer",
                              "minimum": 18,
                              "maximum": 64,
                              "description": "Optional spouse age; requires spouse_sex."
                            },
                            "spouse_sex": {
                              "type": "string",
                              "enum": [
                                "male",
                                "female"
                              ],
                              "description": "Optional spouse sex used for rating; requires spouse_age."
                            },
                            "kids": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 6,
                              "default": 0,
                              "description": "Children to include, approximated at age 10 each."
                            },
                            "income": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000000,
                              "description": "Expected annual tax-household income, in USD for the requested year."
                            },
                            "year": {
                              "type": "integer",
                              "enum": [
                                2026,
                                2027
                              ],
                              "description": "Explicit coverage year. Unsupported years return unavailable; no year is substituted."
                            },
                            "affordable_employer_coverage": {
                              "type": "boolean",
                              "description": "True only if everyone quoted has an affordable qualifying employer offer. Mixed eligibility needs an individual review."
                            }
                          }
                        },
                        "private": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "enum": [
                                "rough_estimate",
                                "unavailable"
                              ]
                            },
                            "estimate_basis_year": {
                              "type": "integer"
                            },
                            "low_monthly_usd": {
                              "type": "number"
                            },
                            "high_monthly_usd": {
                              "type": "number"
                            },
                            "middle_monthly_usd": {
                              "type": "number"
                            },
                            "tiers_monthly_usd": {
                              "type": [
                                "array",
                                "null"
                              ],
                              "items": {
                                "type": "number"
                              }
                            },
                            "method": {
                              "type": "string"
                            },
                            "is_carrier_quote": {
                              "const": false
                            },
                            "reason": {
                              "type": "string"
                            }
                          }
                        },
                        "marketplace": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "enum": [
                                "live_estimate",
                                "reference_estimate",
                                "unavailable"
                              ]
                            },
                            "plan_year": {
                              "type": "integer"
                            },
                            "plans_found": {
                              "type": "integer"
                            },
                            "source": {
                              "type": "string"
                            },
                            "source_url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "lowest": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "issuer": {
                                  "type": "string"
                                },
                                "metal": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "gross_monthly_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Monthly premium before tax credit."
                                },
                                "after_credit_monthly_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Monthly premium after estimated tax credit; null means unavailable, not zero."
                                },
                                "deductible_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Deductible reported by the source, if available."
                                }
                              }
                            },
                            "benchmark_silver": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "issuer": {
                                  "type": "string"
                                },
                                "metal": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "gross_monthly_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Monthly premium before tax credit."
                                },
                                "after_credit_monthly_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Monthly premium after estimated tax credit; null means unavailable, not zero."
                                },
                                "deductible_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Deductible reported by the source, if available."
                                }
                              }
                            },
                            "highest": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "issuer": {
                                  "type": "string"
                                },
                                "metal": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "gross_monthly_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Monthly premium before tax credit."
                                },
                                "after_credit_monthly_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Monthly premium after estimated tax credit; null means unavailable, not zero."
                                },
                                "deductible_usd": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Deductible reported by the source, if available."
                                }
                              }
                            },
                            "estimated_monthly_tax_credit_usd": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "eligibility_status": {
                              "enum": [
                                "estimated",
                                "unavailable"
                              ]
                            },
                            "reason": {
                              "type": "string"
                            }
                          }
                        },
                        "citation": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "methodology_url": {
                              "type": "string",
                              "format": "uri"
                            }
                          }
                        },
                        "assumptions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "limitations": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "status",
                        "required_inputs",
                        "input_definitions",
                        "links"
                      ],
                      "properties": {
                        "ok": {
                          "const": true
                        },
                        "status": {
                          "const": "documentation"
                        },
                        "required_inputs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "input_definitions": {
                          "type": "object"
                        },
                        "links": {
                          "type": "object"
                        },
                        "example": {
                          "type": "object"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid input; no guessed inputs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Choose a county from the returned candidates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "JSON required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "All required query parameters are needed for a calculation. A bare GET with no query instead returns documentation; it never calculates a default household."
      },
      "post": {
        "operationId": "postHealthInsuranceEstimate",
        "summary": "Calculate one household estimate from JSON",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "zip",
                  "age",
                  "sex",
                  "income",
                  "year",
                  "affordable_employer_coverage"
                ],
                "properties": {
                  "zip": {
                    "type": "string",
                    "pattern": "^[0-9]{5}$",
                    "description": "Five-digit US ZIP code; retain leading zeroes."
                  },
                  "countyfips": {
                    "type": "string",
                    "pattern": "^[0-9]{5}$",
                    "description": "Required when the ZIP crosses counties. Use a returned candidate; ask the user to choose."
                  },
                  "age": {
                    "type": "integer",
                    "minimum": 18,
                    "maximum": 64,
                    "description": "Primary adult age."
                  },
                  "sex": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ],
                    "description": "Primary adult sex used for rating."
                  },
                  "spouse_age": {
                    "type": "integer",
                    "minimum": 18,
                    "maximum": 64,
                    "description": "Optional spouse age; requires spouse_sex."
                  },
                  "spouse_sex": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ],
                    "description": "Optional spouse sex used for rating; requires spouse_age."
                  },
                  "kids": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6,
                    "default": 0,
                    "description": "Children to include, approximated at age 10 each."
                  },
                  "income": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000000,
                    "description": "Expected annual tax-household income, in USD for the requested year."
                  },
                  "year": {
                    "type": "integer",
                    "enum": [
                      2026,
                      2027
                    ],
                    "description": "Explicit coverage year. Unsupported years return unavailable; no year is substituted."
                  },
                  "affordable_employer_coverage": {
                    "type": "boolean",
                    "description": "True only if everyone quoted has an affordable qualifying employer offer. Mixed eligibility needs an individual review."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Estimate result; inspect status before citing a number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "status",
                    "calculated_at",
                    "inputs",
                    "private",
                    "marketplace",
                    "citation"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "available",
                        "partial",
                        "unavailable"
                      ]
                    },
                    "calculated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Original calculation timestamp; successful results may be reused for up to five minutes."
                    },
                    "requested_plan_year": {
                      "type": "integer"
                    },
                    "currency": {
                      "const": "USD"
                    },
                    "payment_period": {
                      "const": "month"
                    },
                    "inputs": {
                      "type": "object",
                      "properties": {
                        "zip": {
                          "type": "string",
                          "pattern": "^[0-9]{5}$",
                          "description": "Five-digit US ZIP code; retain leading zeroes."
                        },
                        "countyfips": {
                          "type": "string",
                          "pattern": "^[0-9]{5}$",
                          "description": "Required when the ZIP crosses counties. Use a returned candidate; ask the user to choose."
                        },
                        "age": {
                          "type": "integer",
                          "minimum": 18,
                          "maximum": 64,
                          "description": "Primary adult age."
                        },
                        "sex": {
                          "type": "string",
                          "enum": [
                            "male",
                            "female"
                          ],
                          "description": "Primary adult sex used for rating."
                        },
                        "spouse_age": {
                          "type": "integer",
                          "minimum": 18,
                          "maximum": 64,
                          "description": "Optional spouse age; requires spouse_sex."
                        },
                        "spouse_sex": {
                          "type": "string",
                          "enum": [
                            "male",
                            "female"
                          ],
                          "description": "Optional spouse sex used for rating; requires spouse_age."
                        },
                        "kids": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 6,
                          "default": 0,
                          "description": "Children to include, approximated at age 10 each."
                        },
                        "income": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000000,
                          "description": "Expected annual tax-household income, in USD for the requested year."
                        },
                        "year": {
                          "type": "integer",
                          "enum": [
                            2026,
                            2027
                          ],
                          "description": "Explicit coverage year. Unsupported years return unavailable; no year is substituted."
                        },
                        "affordable_employer_coverage": {
                          "type": "boolean",
                          "description": "True only if everyone quoted has an affordable qualifying employer offer. Mixed eligibility needs an individual review."
                        }
                      }
                    },
                    "private": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "rough_estimate",
                            "unavailable"
                          ]
                        },
                        "estimate_basis_year": {
                          "type": "integer"
                        },
                        "low_monthly_usd": {
                          "type": "number"
                        },
                        "high_monthly_usd": {
                          "type": "number"
                        },
                        "middle_monthly_usd": {
                          "type": "number"
                        },
                        "tiers_monthly_usd": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "number"
                          }
                        },
                        "method": {
                          "type": "string"
                        },
                        "is_carrier_quote": {
                          "const": false
                        },
                        "reason": {
                          "type": "string"
                        }
                      }
                    },
                    "marketplace": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "live_estimate",
                            "reference_estimate",
                            "unavailable"
                          ]
                        },
                        "plan_year": {
                          "type": "integer"
                        },
                        "plans_found": {
                          "type": "integer"
                        },
                        "source": {
                          "type": "string"
                        },
                        "source_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "lowest": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "metal": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "gross_monthly_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Monthly premium before tax credit."
                            },
                            "after_credit_monthly_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Monthly premium after estimated tax credit; null means unavailable, not zero."
                            },
                            "deductible_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Deductible reported by the source, if available."
                            }
                          }
                        },
                        "benchmark_silver": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "metal": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "gross_monthly_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Monthly premium before tax credit."
                            },
                            "after_credit_monthly_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Monthly premium after estimated tax credit; null means unavailable, not zero."
                            },
                            "deductible_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Deductible reported by the source, if available."
                            }
                          }
                        },
                        "highest": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "issuer": {
                              "type": "string"
                            },
                            "metal": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "gross_monthly_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Monthly premium before tax credit."
                            },
                            "after_credit_monthly_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Monthly premium after estimated tax credit; null means unavailable, not zero."
                            },
                            "deductible_usd": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Deductible reported by the source, if available."
                            }
                          }
                        },
                        "estimated_monthly_tax_credit_usd": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "eligibility_status": {
                          "enum": [
                            "estimated",
                            "unavailable"
                          ]
                        },
                        "reason": {
                          "type": "string"
                        }
                      }
                    },
                    "citation": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "methodology_url": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "limitations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid input; no guessed inputs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Choose a county from the returned candidates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body too large.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "JSON required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Upstream unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "input_definitions": {
                      "type": "object",
                      "description": "JSON Schema definitions for missing inputs."
                    },
                    "counties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fips": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "readable_result_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "json_result_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://sjiadvisory.com/estimate/ai-guide.txt"
  }
}
