---
title: "Compare Tea"
method: POST
path: "/api/tea/compare"
---

# Compare Tea

`POST /api/tea/compare`

## Request

- Base URL: `https://biotechdsp-579272663320.europe-west1.run.app`
- URL: `https://biotechdsp-579272663320.europe-west1.run.app/api/tea/compare`
- Auth: HTTP bearer

Full side-by-side TEA comparison of 2-3 processes on one shared basis.

Recomputes each case's detailed TEA at identical operating hours, facility
type, labor profile and financial assumptions, then returns per-case line
items, per-kg cost breakdowns, deltas against the first case, and the
warnings that keep a screening-grade comparison honest (different products
block it; scale gaps, purity gaps and within-accuracy-band differences warn).

## Request body

- TEACompareBody: 2-3 processes plus ONE shared economic basis. Every case is recomputed on that basis - stored TEA results are never joined, because two stored results almost never share operating hours, facility type and prices.
  - `annual_operating_hours` integer
  - `cases` CompareCaseBody[], required
    - `calculated_purity` number, nullable
    - `calculated_yield` number, nullable
    - `feeds` object
    - `label` string, required
    - `product_identity_requested_targets` string[]
    - `product_identity_warnings` string[]
    - `recycles` RecycleSpec[]
      - `fraction` number, required
      - `from_step` integer, required
      - `outlet` 'light' | 'heavy'
      - `to_step` integer, required
    - `simulation_results` object[], nullable
    - `steps` object[], required
    - `stream` object, required
    - `stream_closure_warnings` string[]
    - `target_products` string[], required
    - `target_provenance` object, nullable
    - `terminal_streams` TerminalStream[], nullable
      - `fraction` number, required
      - `output_index` integer, required
      - `port_id` string, required
      - `sink` 'product' | 'waste' | 'vent', required
      - `step_index` integer, required
      - `target_products` string[]
      - `terminal_id` string, required
    - `thermal_duties` object[], nullable
  - `cooling_water_price_usd_per_m3` number
  - `electricity_price_usd_per_kWh` number
  - `facility_type` string, nullable
  - `labor_profile` string
  - `product_selling_price_source` 'default' | 'user_supplied'
  - `product_selling_price_usd_per_kg` number
  - `project_life` integer
  - `raw_material_cost_multiplier` number
  - `steam_price_usd_per_GJ` number
  - `tax_rate` number
  - `wacc` number
  - `wastewater_scope` 'included' | 'excluded_osbl'

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/untangle/apis/untangle-bio-engine-api.md) · [All operations](https://skmtc.dev/untangle/apis/untangle-bio-engine-api/llms.txt) · [OpenAPI document](https://skmtc.dev/untangle/apis/untangle-bio-engine-api/revisions/161714bf261c?raw)
