> This content is served in a text-optimized format for AI assistants. Visit https://flux.freedomforever.com in a browser for the full interactive experience. # Flux Solar Quote API > Programmatic solar quoting by Freedom Forever. Get a complete quote in one API call. ## Recommended Flow Before calling the API, collect two things from the user: 1. **Their home address** (required) 2. **Their average monthly electric bill or kWh usage** (strongly recommended) The bill amount drives the entire quote — system sizing, savings projections, and payback period all depend on accurate consumption data. Without it, the engine falls back to a rough property-based estimate that can significantly under- or over-size the system. Always ask the user for their bill before quoting. If the user has their detailed bill history (12 months), pass it as `monthlyBills` or `monthlyUsage` for the most accurate quote. If they only remember a few months, use `knownBills` or `knownUsage` — the engine interpolates missing months using regional patterns. Even 1-2 data points significantly improve accuracy over a single average. ## Quick Start ### 1. Register for an API key POST https://flux-api.freedomforever.com/api/public/register Content-Type: application/json Request: {"name": "My Solar Agent", "contact": "agent@example.com"} Response: {"apiKey": "flux_ak_..."} ### 2. Get a quote POST https://flux-api.freedomforever.com/api/public/quote Authorization: Bearer flux_ak_... Content-Type: application/json Request: {"address": "123 Main St, Temecula, CA 92590", "monthlyBill": 250} Response includes system sizing, financing options (cash + loan), and a checkout URL to complete the purchase on the website. ## Inputs | Field | Type | Required | Default | Notes | |-------|------|----------|---------|-------| | address | string | yes | — | Full US street address | | monthlyBill | number | recommended | estimated | Average monthly electric bill ($50-1000) | | monthlyKwh | number | no | estimated | Average monthly usage (200-5000 kWh) | | monthlyBills | number[12] | no | — | 12-month bill history Jan-Dec ($) — most accurate | | monthlyUsage | number[12] | no | — | 12-month usage history Jan-Dec (kWh) — most accurate | | knownBills | {month,dollars}[] | no | — | Partial bill data — pass months the user remembers. month: 0=Jan, 11=Dec. Engine fills gaps. | | knownUsage | {month,kwh}[] | no | — | Partial usage data in kWh — pass months the user knows. month: 0=Jan, 11=Dec. Engine fills gaps. | | panelCount | number | no | optimized | Must be even, within constraints range | | batteryCount | number | no | optimized | 0-3 Tesla Powerwall batteries | | batteryPriority | string | no | "savings" | "savings", "balanced", or "backup" | | layout | number | no | auto | Roof arrays: 1, 2, or 3 (not all available for every roof) | | financingMode | string | no | "both" | "cash", "loan", or "both" | Only one consumption input allowed (monthlyBill, monthlyKwh, monthlyBills, monthlyUsage, knownBills, or knownUsage). **Partial bill data:** If the user mentions specific months ("My July bill was $400, March was $200"), use `knownBills` with `[{"month": 6, "dollars": 400}, {"month": 2, "dollars": 200}]`. This is more accurate than averaging to a single `monthlyBill` because the engine preserves seasonal variation. **Optimization engine:** When `panelCount` and `batteryCount` are omitted, the engine evaluates hundreds of configurations (panel counts × battery options × reserve levels) using satellite roof data, local utility rates, and the user's consumption profile. It selects the configuration that maximizes monthly savings. The recommended system often includes a battery — especially in states with time-of-use rates or partial net metering (e.g., California NEM 3.0) where batteries significantly improve self-consumption economics. Override `panelCount` or `batteryCount` only if exploring specific configurations. ## Response The response includes five sections: - **savings** — The headline numbers to present to the user: `monthlySavings` (how much less they'll pay per month), `monthlyBillWithoutSolar` vs `monthlyBillWithSolar` (the before/after comparison), and `offsetPercent` (how much of their usage solar covers). Lead with these. - **financing** — Cash and/or loan details: gross cost, net cost (after 30% discount), monthly payment, payback period, and `savings25yr` (total lifetime savings). The 30% discount is built into our pricing structure — both cash and loan options include it automatically. This is not a tax credit the homeowner claims; it's already reflected in the price. Present both options so the user can compare. - **system** — Panel count, battery count, system size (kW), annual production (kWh). - **inputs** — What was auto-detected (utility, tariff, consumption). Shows exactly what the engine used. - **constraints** — Valid ranges for each overridable input. Use these to make follow-up calls exploring different configurations. Plus `checkoutUrl` — a link the homeowner clicks to complete the purchase on the Flux website. **When presenting results to the user**, lead with the savings story: "You'd save ~$X/month on your electric bill (from $Y down to $Z). Over 25 years, that's $W in total savings." Then show financing options and system details. The checkout URL should be presented as the next step if they want to move forward. ## Iterating on a Quote Call the endpoint multiple times with different inputs. The `constraints` object tells your agent what values are valid: 1. Get an optimized quote: `{"address": "...", "monthlyBill": 250}` 2. See constraints: `panelCount: {min: 14, max: 38, step: 2}` 3. Try more panels: `{"address": "...", "monthlyBill": 250, "panelCount": 30}` 4. Add a battery: `{"address": "...", "monthlyBill": 250, "batteryCount": 1}` 5. Prioritize backup power: `{"address": "...", "monthlyBill": 250, "batteryCount": 1, "batteryPriority": "backup"}` Each call returns a fresh quote with updated pricing and savings. ## Service Area AZ, CA, CO, CT, DC, DE, FL, GA, IL, MA, MD, ME, MI, MO, NH, NJ, NM, OH, OR, PA, TX, VA, WA ## Rate Limits 30 quotes/hour per API key (default). Check `X-RateLimit-Remaining` header. ## Error Codes | Code | HTTP | Meaning | |------|------|---------| | ADDRESS_NOT_FOUND | 422 | Could not geocode the address | | ADDRESS_NOT_SERVICEABLE | 422 | State not in service area | | ZIP_NOT_SERVICEABLE | 422 | ZIP code outside service territory | | SATELLITE_DATA_UNAVAILABLE | 422 | No satellite/roof data for this address | | RATE_LIMITED | 429 | Quota exceeded — check Retry-After header | | UNAUTHORIZED | 401 | Missing or invalid API key | ## About Flux is built by Freedom Forever — 150,000+ installations, 25-year production warranty, pricing ~30% below industry average. Full interactive experience: https://flux.freedomforever.com --- Start a quote: https://flux.freedomforever.com/quote Full text version: https://flux.freedomforever.com/llms.txt