{
  "schema_version": "1.0",
  "organization": "p2-data-lab",
  "portal": "p2-cloud-egress-calc",
  "live_meta_url": "https://p2-cloud-egress-calc.pages.dev/data/meta.json",
  "openapi_url": "https://p2-cloud-egress-calc.pages.dev/openapi.json",
  "public_datasets": [
    "https://p2-cloud-egress-calc.pages.dev/data/cloud-egress-matrix.json",
    "https://p2-cloud-egress-calc.pages.dev/data/k8s-networking-rates.json",
    "https://p2-cloud-egress-calc.pages.dev/data/object-storage-skus.json"
  ],
  "calculator_inputs_schema": {
    "stored_tb": {
      "label": "Active Stored Dataset Volume (TB)",
      "type": "number",
      "default": 120,
      "min": 0.1,
      "max": 50000
    },
    "monthly_internet_egress_tb": {
      "label": "Monthly Public Internet / CDN Origin Egress (TB/mo)",
      "type": "number",
      "default": 85,
      "min": 0,
      "max": 50000
    },
    "class_a_writes_millions": {
      "label": "Monthly Class A Operations: PUT / COPY / POST / LIST (Millions/mo)",
      "type": "number",
      "default": 45,
      "min": 0,
      "max": 10000
    },
    "class_b_reads_millions": {
      "label": "Monthly Class B Operations: GET / HEAD / SELECT (Millions/mo)",
      "type": "number",
      "default": 320,
      "min": 0,
      "max": 50000
    },
    "region_macro": {
      "label": "Primary Cloud Macro-Region",
      "type": "select",
      "default": "US_EAST",
      "options": [
        "US_EAST",
        "EU_CENTRAL",
        "APAC_SINGAPORE"
      ]
    },
    "cdn_cache_hit_ratio_pct": {
      "label": "CDN Cache Hit Offload Ratio (%)",
      "type": "number",
      "default": 0,
      "min": 0,
      "max": 99.5
    },
    "k8s_clusters": {
      "label": "Managed K8s Clusters (EKS / AKS / GKE)",
      "type": "number",
      "default": 3,
      "min": 0,
      "max": 200
    },
    "k8s_on_extended_support": {
      "label": "K8s Clusters on Legacy Version Extended Support",
      "type": "number",
      "default": 1,
      "min": 0,
      "max": 200
    },
    "k8s_east_west_gb_mo": {
      "label": "Monthly K8s East-West Service-to-Service Traffic (GB/mo across 3 AZs)",
      "type": "number",
      "default": 45000,
      "min": 0,
      "max": 10000000
    },
    "topology_aware_routing_pct": {
      "label": "Topology-Aware Hints / Same-AZ Affinity Reduction (%)",
      "type": "number",
      "default": 0,
      "min": 0,
      "max": 95
    },
    "nat_gateway_gb_mo": {
      "label": "Monthly Traffic Routed Through Managed NAT Gateways (GB/mo, before S3/ECR VPC Gateway Endpoints)",
      "type": "number",
      "default": 18000,
      "min": 0,
      "max": 5000000
    }
  },
  "formulas_summary": {
    "effective_origin_egress_gb": "E_origin_gb = monthly_internet_egress_tb * 1024 * (1 - cdn_cache_hit_ratio_pct / 100)",
    "marginal_tiered_cost": "Cost_tiered(V, brackets) = sum_j( max(0, min(V, end_j) - begin_j) * rate_j ) using live AWS/Azure/GCP bracket arrays",
    "backblaze_b2_egress": "Cost_B2_egress = max(0, E_origin_gb - 3 * stored_tb * 1024) * 0.01 (0 if routed via qualifying CDN Bandwidth Alliance partner)",
    "cloudflare_r2_total": "Cost_R2 = max(0, stored_tb * 1000 - 10) * 0.015 + max(0, class_a_writes_millions - 1) * 4.50 + max(0, class_b_reads_millions - 10) * 0.36 + 0",
    "k8s_cross_az_tax": "Cost_CrossAZ = k8s_east_west_gb_mo * ((N_az - 1) / N_az) * (1 - topology_aware_routing_pct / 100) * r_bidirectional_cross_az_gb (where 3-AZ uniform random routing sends 66.67% of traffic cross-AZ at $0.02/GB effective on AWS/GCP)",
    "k8s_control_plane": "Cost_K8s_CP = 730 * ( (k8s_clusters - k8s_on_extended_support) * r_cp_standard_hr + k8s_on_extended_support * r_cp_extended_hr )",
    "nat_gateway_tax": "Cost_NAT = N_az * 730 * r_nat_hr + nat_gateway_gb_mo * r_nat_processing_gb (contrasted with $0 VPC Gateway Endpoint offload)",
    "migration_payback_months": "T_payback = (stored_tb * 1024 * r_source_egress_per_gb + class_b_reads_millions * 1000 * r_source_get_per_1k) / max(1, Monthly_TCO_Source - Monthly_TCO_Target)"
  },
  "pro_api_endpoint": "https://p2-core-api.evsmtoken.workers.dev/v1/pro/p2-cloud-egress-calc/dataset",
  "auth_header": "Authorization: Bearer <POLAR_LICENSE_KEY>",
  "purchase_tiers": [
    {
      "sku_key": "cloud-egress-sku-dataset",
      "product_id": "c36f797b-17eb-46e9-b866-3a9c790c698b",
      "name": "Multi-Cloud Egress & Object Storage SKU Dataset (CSV/JSON)",
      "price_usd": 29,
      "billing": "one_time",
      "checkout_url": "https://buy.polar.sh/polar_cl_AEDZEmLmcwjPnVGQ1bOyjbHuEGZEtGys48PfO2F8DxV"
    },
    {
      "sku_key": "cloud-finops-pro-license",
      "product_id": "10b09bc9-e55d-4153-bba8-80e7b7b1a4fc",
      "name": "Pro Multi-Cloud FinOps CSV Analyzer & API License Key",
      "price_usd": 24,
      "billing": "monthly",
      "checkout_url": "https://buy.polar.sh/polar_cl_q7hPDtvrAdcdkEwzOd6jSdEtbKHaewLDoPltC0rDBq1"
    },
    {
      "sku_key": "cloud-repatriation-audit-pack",
      "product_id": "4a925821-8743-4c67-a25d-0733455acfe0",
      "name": "VP Infra FinOps Playbook: Zero-Egress & K8s Remediation Pack",
      "price_usd": 79,
      "billing": "one_time",
      "checkout_url": "https://buy.polar.sh/polar_cl_Bqajq5GpdwQPOKjhGN6Hj5pV6D84OvdzYSIML0I3r89"
    }
  ],
  "master_all_portals_pass": {
    "master_all_portals_pro_monthly": {
      "product_id": "18e0b844-b764-41f0-9c3d-186362784997",
      "name": "All-Portals Master Pro API & Batch CSV License Key (Monthly)",
      "price_usd": 79,
      "billing": "monthly",
      "checkout_url": "https://buy.polar.sh/polar_cl_0P1axu2nXEDXECK8Z0k7I3sMndeo3hsdqpepv1LUcJT"
    },
    "enterprise_annual_data_pass": {
      "product_id": "8a5266eb-3aaf-4fb3-9aef-0e5bbfd17dc3",
      "name": "Annual Enterprise FinOps & Compliance Data Pass (All Portals)",
      "price_usd": 499,
      "billing": "yearly",
      "checkout_url": "https://buy.polar.sh/polar_cl_SPWfsAxuQAVHif3soxwqbq5zPAdNZFkN5CtQK3cZRft"
    }
  }
}