---
title: "Generate Processes Evolutionary Route"
method: POST
path: "/api/generate-processes-evolutionary"
---

# Generate Processes Evolutionary Route

`POST /api/generate-processes-evolutionary`

## Request

- Base URL: `https://biotechdsp-579272663320.europe-west1.run.app`
- URL: `https://biotechdsp-579272663320.europe-west1.run.app/api/generate-processes-evolutionary`
- Auth: HTTP bearer

Generate optimal process routes using evolutionary algorithm.
Searches for routes that maximize yield x purity while meeting minimum purity and yield constraints.

## Request body

- EvolutionaryGenerateBody: Route generation, on the SAME economic basis as everything else. The generator used to cost on `calculate_detailed_tea`'s own defaults - facility_type "chemical", 8000 h, $100/kg, default tariffs - while the panel resolved pharma_gmp via cp.infer_facility_type for the same flowsheet: 1031.91 $/kg against 6410.01, and 12.73M against 17.11M of capital. The tier difference has to be the fidelity of the simulation, never a different price book. Since 2026-08-26 neither side infers: the grade is stated by the caller or the request is refused (_require_facility_type).
  - `annual_operating_hours` integer
  - `annual_product_kg` number, nullable: Goal mode: the annual output the plant must make, kg/yr. Routes below it are not feasible, so a cost target cannot be reached by making less.
  - `bioreactor_id` string
  - `bioreactor_params` object
  - `cooling_water_price_usd_per_m3` number
  - `electricity_price_usd_per_kWh` number
  - `excluded_operations` string[]
  - `facility_type` string, nullable
  - `generations` integer
  - `labor_profile` string
  - `max_cogs_fraction_of_selling_price` number, nullable: Goal mode: the cost ceiling as a fraction of product_selling_price_usd_per_kg, which must then be sent explicitly.
  - `max_cogs_usd_per_kg` number, nullable: Goal mode: the cost ceiling in USD per kg of pure product.
  - `min_product_concentration_g_per_l` number, nullable: Floor on the target concentration in the final stream, g/L.
  - `min_purity` number
  - `min_yield` number
  - `mode` 'explore' | 'goal'
  - `near_miss_n` integer: Goal mode: how many nearest-miss routes the complete event carries.
  - `optimization_goal` string
  - `population_size` integer
  - `product_form` string, nullable: Saleable form the route must reach: dry_powder, crystalline_solid, liquid_concentrate, anhydrous_liquid, wet_paste, viable_cells, aqueous. Omit for the conventional form of the product class.
  - `product_identity_requested_targets` string[]
  - `product_identity_warnings` string[]
  - `product_selling_price_source` 'default' | 'user_supplied'
  - `product_selling_price_usd_per_kg` number
  - `removed_products` string[]
  - `seed` integer
  - `seed_steps` GeneratorSeedStep[], nullable
    - `outlet_handle` string
    - `parameters` object
    - `product_outlets` object
    - `unit_operation_id` string, required
  - `seed_suffix_steps` GeneratorSeedStep[], nullable
    - `outlet_handle` string
    - `parameters` object
    - `product_outlets` object
    - `unit_operation_id` string, required
  - `steam_price_usd_per_GJ` number
  - `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
  - `top_n` integer
  - `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)
