---
title: "Goal Preflight"
method: POST
path: "/api/goal-preflight"
---

# Goal Preflight

`POST /api/goal-preflight`

## Request

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

Three closed-form bounds (services.goal_preflight): raw-material floor, capital
floor and purity ceiling, with the binding term named and two hard refusals
(cost below the raw floor, purity above the ceiling). Advisory otherwise; no
simulation runs and the call returns in milliseconds.

## Request body

- GoalPreflightBody: Wizard-2 goal mode pre-flight: the cheapest conceivable cost and the highest reachable purity for this feed, product, scale and grade - before any search runs. Same feed, bioreactor and basis fields the generator body carries, so the number the wizard shows under the goal fields is on the basis the search will run on.
  - `annual_operating_hours` integer
  - `annual_product_kg` number, required
  - `bioreactor_id` string, nullable
  - `bioreactor_params` object
  - `cooling_water_price_usd_per_m3` number
  - `electricity_price_usd_per_kWh` number
  - `facility_type` string, nullable
  - `labor_profile` string
  - `max_cogs_usd_per_kg` number, nullable
  - `min_purity` number, required
  - `product_identity_requested_targets` string[]
  - `product_identity_warnings` string[]
  - `product_selling_price_source` 'default' | 'user_supplied'
  - `product_selling_price_usd_per_kg` number
  - `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
  - `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)
