โšก Flash Guidance Engine

Flash Guidance Engine Developer Portal

Welcome to the Flash Guidance Engine API documentation. Flash is a stateless engine with two core APIs:

โšก Interactive API Docs

Modern API docs with form-based request builder. Test endpoints live!

Open API Docs โ†’

๐Ÿค– MCP Playground

Test 9 MCP tools (4 calculate + 1 primitives + 4 guidance) for AI agent integration.

Open Playground โ†’

๐Ÿ”ข Primitives Library

18 financial math functions: NPV, IRR, Sharpe, bonds. All with formula transparency.

Explore Primitives โ†’

๐Ÿ†• New in v7.1

Financial Primitives Library: 18 math functions with formula transparency
CFP Endpoints: Capital gains tax, stock valuation, penalty exceptions
MCP Redesign: 26 โ†’ 9 tools for better AI agent usability


New in v7.1: Financial Primitives Library

18 stateless financial calculation functions that return formula transparency explaining step-by-step how results were computed.

Categories

Example: NPV with Formula Transparency

curl -X POST "https://flash-engine.fly.dev/api/v1/calculate/primitives/npv" \
  -H "Content-Type: application/json" \
  -d '{
    "discount_rate": 0.08,
    "cash_flows": [-10000, 3000, 4000, 5000]
  }'

โ†’ Returns:
{
  "result": 176.29,
  "formula": {
    "name": "Net Present Value (NPV)",
    "calculation_steps": [
      "Period 0: -$10,000.00 / (1.08)^0 = -$10,000.00",
      "Period 1: $3,000.00 / (1.08)^1 = $2,777.78",
      ...
    ]
  }
}

See all 18 primitives in API docs โ†’ | Read full guide โ†’


CFP Exam Accuracy Endpoints

3 specialized calculators for complex financial planning scenarios:

1. Capital Gains Tax Calculator

POST /api/v1/calculate/tax/capital-gains

2. Stock Valuation Toolkit

POST /api/v1/calculate/investment/stock-valuation

3. IRS Penalty Exceptions Calculator

POST /api/v1/calculate/retirement/penalty-exceptions

Read CFP endpoints guide โ†’


Calculate API Quick Start

1. Tier-Aware Simulation (v8 API)

curl -X POST "https://flash-engine.fly.dev/api/v1/calculate/simulate" \
  -H "Content-Type: application/json" \
  -d '{
    "tier": 1,
    "user_profile": {
      "current_age": 45,
      "income": 200000
    }
  }'

2. Tier 3 with Account Breakdown

curl -X POST "https://flash-engine.fly.dev/api/v1/calculate/simulate" \
  -H "Content-Type: application/json" \
  -d '{
    "tier": 3,
    "user_profile": {
      "current_age": 45,
      "income": 200000,
      "state_code": "CA"
    },
    "portfolio": {
      "accounts": [
        {"type": "taxable", "balance": 500000},
        {"type": "traditional_401k", "balance": 800000}
      ]
    }
  }'

3. Tax Bracket Analysis

curl "https://flash-engine.fly.dev/api/v1/calculate/tax-bracket?income=200000&state_code=CA"

4. Goal-Seek Solver

curl -X POST "https://flash-engine.fly.dev/api/v1/calculate/solve" \
  -H "Content-Type: application/json" \
  -d '{
    "user_profile": {"current_age": 45, "income": 200000},
    "solver": {
      "mode": "RETIREMENT_AGE",
      "target": {"success_probability": 0.90},
      "constraints": {"min": 55, "max": 75}
    }
  }'

Guidance API Quick Start

Get Journey Context (for AI)

curl -X POST "https://flash-engine.fly.dev/api/v1/guidance/context" \
  -H "Content-Type: application/json" \
  -d '{
    "user_profile": {
      "current_age": 45,
      "income": 200000,
      "state_code": "CA"
    },
    "user_concern": "TAX_DRAG"
  }'

List Entry Themes

curl "https://flash-engine.fly.dev/api/v1/guidance/user-concerns"

List Value Exchange Stages

curl "https://flash-engine.fly.dev/api/v1/guidance/stages"

MCP Integration (AI Agents)

Flash exposes 12 tools via Model Context Protocol at /mcp:

Calculate Tools (New)

Guidance Tools (New)

Legacy Tools (Deprecated)


SDK Generation

# Generate TypeScript client
npx @openapitools/openapi-generator-cli generate \
  -i https://flash-engine.fly.dev/openapi.json \
  -g typescript-fetch \
  -o ./flash-client