untangle.bio Tea API

The Tea API from untangle.bio, for tea.

GitHub OpenAPI

Operations 5

POST /api/tea/compare Compare Tea #
POST /api/tea/detailed Calculate Detailed Tea #
POST /api/tea/investor-metrics Calculate Investor Metrics #
GET /api/tea/profiles Tea Profiles #
POST /api/tea/scale-analysis Calculate Scale Analysis #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/untangle-bio:untangle-bio-tea-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

untangle-bio-tea-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    url: https://untangle.bio/docs.html
  description: 'The untangle.bio bioprocess engine: purification-route generation, separation and fermentation simulation, and techno-economic analysis (TEA).


    This spec covers the public engine surface only. Authentication: every request needs a Supabase-issued bearer JWT for an untangle.bio account (`Authorization: Bearer `); connector access is part of the Academic and Pro plans.


    Most AI assistants should prefer the MCP connector at https://mcp.untangle.bio/mcp - same engine, OAuth sign-in, result presentation built in. The complete MCP tool reference is at https://untangle.bio/llms-full.txt'
  title: untangle.bio engine Tea API
  version: 1.0.0
servers:
- description: production
  url: https://biotechdsp-579272663320.europe-west1.run.app
security:
- bearerAuth: []
tags:
- name: Tea
paths:
  /api/tea/compare:
    post:
      description: '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).'
      operationId: compare_tea_api_tea_compare_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TEACompareBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Compare Tea
      tags:
      - Tea
  /api/tea/detailed:
    post:
      description: 'Calculate comprehensive techno-economic analysis (TEA) with LANG factors.


        Provides:

        - Capital cost breakdown (LANG factors, direct/indirect costs)

        - Operating cost breakdown (maintenance, labor, utilities, etc.)

        - Production cost metrics (COGS, payback period)

        - Process summary (yield, purity, costs)'
      operationId: calculate_detailed_tea_api_tea_detailed_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TEABody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Calculate Detailed Tea
      tags:
      - Tea
  /api/tea/investor-metrics:
    post:
      description: 'Calculate investor-grade financial metrics: NPV, IRR, EBITDA, discounted payback, ROI.'
      operationId: calculate_investor_metrics_api_tea_investor_metrics_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvestorMetricsBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Calculate Investor Metrics
      tags:
      - Tea
  /api/tea/profiles:
    get:
      description: 'The facility grades and labor profiles the cost model actually knows about.


        Served so the pickers in the Economic Analysis panel and the TEA comparison

        dialog are generated from the same catalogue the estimator validates against -

        a hardcoded option list drifts the moment a profile is added, and a stale option

        is silently costed as the fallback grade.'
      operationId: tea_profiles_api_tea_profiles_get
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: Tea Profiles
      tags:
      - Tea
  /api/tea/scale-analysis:
    post:
      description: 'Calculate TEA metrics across a range of throughput scales.


        Returns CAPEX, OPEX, COGS, and payback at each scale point using

        the six-tenths rule for equipment cost scaling.'
      operationId: calculate_scale_analysis_api_tea_scale_analysis_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScaleAnalysisBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Calculate Scale Analysis
      tags:
      - Tea
components:
  schemas:
    CompareCaseBody:
      additionalProperties: false
      description: 'One process in a TEA comparison. When simulation_results is omitted or empty

        the endpoint simulates the flowsheet itself (same path as /simulate-separation)

        before costing it, so saved projects and generated routes can be compared

        without a client-side simulation round trip.'
      properties:
        calculated_purity:
          anyOf:
          - type: number
          - type: 'null'
          title: Calculated Purity
        calculated_yield:
          anyOf:
          - type: number
          - type: 'null'
          title: Calculated Yield
        feeds:
          additionalProperties:
            additionalProperties: true
            type: object
          default: {}
          title: Feeds
          type: object
        label:
          title: Label
          type: string
        product_identity_requested_targets:
          items:
            type: string
          title: Product Identity Requested Targets
          type: array
        product_identity_warnings:
          items:
            type: string
          title: Product Identity Warnings
          type: array
        recycles:
          default: []
          items:
            $ref: '#/components/schemas/RecycleSpec'
          title: Recycles
          type: array
        simulation_results:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Simulation Results
        steps:
          items:
            additionalProperties: true
            type: object
          title: Steps
          type: array
        stream:
          additionalProperties: true
          title: Stream
          type: object
        stream_closure_warnings:
          items:
            type: string
          title: Stream Closure Warnings
          type: array
        target_products:
          items:
            type: string
          minItems: 1
          title: Target Products
          type: array
        target_provenance:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/TargetProvenanceRoot'
              type: array
            type: object
          - type: 'null'
          title: Target Provenance
        terminal_streams:
          anyOf:
          - items:
              $ref: '#/components/schemas/TerminalStream'
            type: array
          - type: 'null'
          title: Terminal Streams
        thermal_duties:
          anyOf:
          - items:
              anyOf:
              - additionalProperties: true
                type: object
              - type: 'null'
            type: array
          - type: 'null'
          title: Thermal Duties
      required:
      - label
      - stream
      - steps
      - target_products
      title: CompareCaseBody
      type: object
    RecycleSpec:
      additionalProperties: false
      description: 'One tear-stream recycle. 0-indexed step numbers; a recycle runs BACKWARDS, so

        to_step <= from_step.


        Typed because `recycles: List[dict]` let a malformed loop through the contract and

        into the solver, which then dropped it with a warning: to_step=9 on a 4-step route

        returned HTTP 200, n_recycles 0, method "single pass (no recycle)" - the user had

        drawn a loop and been handed a single-pass answer that looked like an answer. The

        warning backstop in thorough_flowsheet._valid_recycles stays (it also catches

        from_step past the end of the route, which needs the route length to judge), but a

        body that cannot possibly be a valid loop is now a 422 at the door.'
      properties:
        fraction:
          exclusiveMinimum: 0.0
          maximum: 0.99
          title: Fraction
          type: number
        from_step:
          minimum: 0.0
          title: From Step
          type: integer
        outlet:
          default: light
          enum:
          - light
          - heavy
          title: Outlet
          type: string
        to_step:
          minimum: 0.0
          title: To Step
          type: integer
      required:
      - from_step
      - to_step
      - fraction
      title: RecycleSpec
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ScaleAnalysisBody:
      additionalProperties: false
      description: Request body for scale-up analysis
      properties:
        annual_operating_hours:
          default: 8000
          maximum: 8760.0
          minimum: 1.0
          title: Annual Operating Hours
          type: integer
        calculated_purity:
          default: 0.85
          title: Calculated Purity
          type: number
        calculated_yield:
          default: 0.7
          title: Calculated Yield
          type: number
        co_product_prices_usd_per_kg:
          anyOf:
          - additionalProperties:
              maximum: 10000000.0
              minimum: 0.0
              type: number
            type: object
          - type: 'null'
          description: Stated selling price per declared co-product, USD/kg.
          title: Co Product Prices Usd Per Kg
        co_products:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Target products sold as co-products.
          title: Co Products
        cooling_water_price_usd_per_m3:
          default: 0.0764
          exclusiveMinimum: 0.0
          maximum: 10.0
          title: Cooling Water Price Usd Per M3
          type: number
        electricity_price_usd_per_kWh:
          default: 0.1
          exclusiveMinimum: 0.0
          maximum: 2.0
          title: Electricity Price Usd Per Kwh
          type: number
        facility_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Facility Type
        feed_basis:
          default: auto
          enum:
          - auto
          - internal_broth
          - purchased
          title: Feed Basis
          type: string
        feeds:
          additionalProperties:
            additionalProperties: true
            type: object
          default: {}
          title: Feeds
          type: object
        labor_profile:
          default: us_food
          title: Labor Profile
          type: string
        product_identity_requested_targets:
          items:
            type: string
          title: Product Identity Requested Targets
          type: array
        product_identity_warnings:
          items:
            type: string
          title: Product Identity Warnings
          type: array
        product_selling_price_source:
          default: default
          enum:
          - default
          - user_supplied
          title: Product Selling Price Source
          type: string
        product_selling_price_usd_per_kg:
          default: 100.0
          maximum: 10000000.0
          minimum: 0.0
          title: Product Selling Price Usd Per Kg
          type: number
        raw_material_cost_multiplier:
          default: 1.0
          maximum: 100.0
          minimum: 0.0
          title: Raw Material Cost Multiplier
          type: number
        recycles:
          default: []
          items:
            $ref: '#/components/schemas/RecycleSpec'
          title: Recycles
          type: array
        scale_points:
          items:
            type: number
          maxItems: 99
          minItems: 1
          title: Scale Points
          type: array
        simulation_results:
          default: []
          items:
            additionalProperties: true
            type: object
          title: Simulation Results
          type: array
        steam_price_usd_per_GJ:
          default: 18.0
          exclusiveMinimum: 0.0
          maximum: 200.0
          title: Steam Price Usd Per Gj
          type: number
        steps:
          items:
            additionalProperties: true
            type: object
          title: Steps
          type: array
        stream:
          additionalProperties: true
          title: Stream
          type: object
        stream_closure_warnings:
          items:
            type: string
          title: Stream Closure Warnings
          type: array
        target_products:
          items:
            type: string
          title: Target Products
          type: array
        target_provenance:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/TargetProvenanceRoot'
              type: array
            type: object
          - type: 'null'
          title: Target Provenance
        terminal_streams:
          anyOf:
          - items:
              $ref: '#/components/schemas/TerminalStream'
            type: array
          - type: 'null'
          title: Terminal Streams
        wastewater_scope:
          default: included
          enum:
          - included
          - excluded_osbl
          title: Wastewater Scope
          type: string
      required:
      - stream
      - steps
      - target_products
      title: ScaleAnalysisBody
      type: object
    TerminalStream:
      description: One terminal edge claiming a fraction of a physical operation outlet.
      properties:
        fraction:
          exclusiveMinimum: 0.0
          maximum: 1.0
          title: Fraction
          type: number
        output_index:
          minimum: 0.0
          title: Output Index
          type: integer
        port_id:
          minLength: 1
          title: Port Id
          type: string
        sink:
          enum:
          - product
          - waste
          - vent
          title: Sink
          type: string
        step_index:
          minimum: 0.0
          title: Step Index
          type: integer
        target_products:
          default: []
          items:
            type: string
          title: Target Products
          type: array
        terminal_id:
          minLength: 1
          title: Terminal Id
          type: string
      required:
      - terminal_id
      - step_index
      - port_id
      - output_index
      - sink
      - fraction
      title: TerminalStream
      type: object
    TEACompareBody:
      additionalProperties: false
      description: '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.'
      properties:
        annual_operating_hours:
          default: 8000
          maximum: 8760.0
          minimum: 1.0
          title: Annual Operating Hours
          type: integer
        cases:
          items:
            $ref: '#/components/schemas/CompareCaseBody'
          maxItems: 3
          minItems: 2
          title: Cases
          type: array
        co_product_prices_usd_per_kg:
          anyOf:
          - additionalProperties:
              maximum: 10000000.0
              minimum: 0.0
              type: number
            type: object
          - type: 'null'
          description: Stated selling price per declared co-product, USD/kg.
          title: Co Product Prices Usd Per Kg
        co_products:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Target products sold as co-products.
          title: Co Products
        cooling_water_price_usd_per_m3:
          default: 0.0764
          exclusiveMinimum: 0.0
          maximum: 10.0
          title: Cooling Water Price Usd Per M3
          type: number
        electricity_price_usd_per_kWh:
          default: 0.1
          exclusiveMinimum: 0.0
          maximum: 2.0
          title: Electricity Price Usd Per Kwh
          type: number
        facility_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Facility Type
        feed_basis:
          default: auto
          enum:
          - auto
          - internal_broth
          - purchased
          title: Feed Basis
          type: string
        labor_profile:
          default: us_food
          title: Labor Profile
          type: string
        product_selling_price_source:
          default: default
          enum:
          - default
          - user_supplied
          title: Product Selling Price Source
          type: string
        product_selling_price_usd_per_kg:
          default: 100.0
          maximum: 10000000.0
          minimum: 0.0
          title: Product Selling Price Usd Per Kg
          type: number
        project_life:
          default: 10
          maximum: 50.0
          minimum: 1.0
          title: Project Life
          type: integer
        raw_material_cost_multiplier:
          default: 1.0
          maximum: 100.0
          minimum: 0.0
          title: Raw Material Cost Multiplier
          type: number
        steam_price_usd_per_GJ:
          default: 18.0
          exclusiveMinimum: 0.0
          maximum: 200.0
          title: Steam Price Usd Per Gj
          type: number
        tax_rate:
          default: 0.21
          exclusiveMaximum: 1.0
          minimum: 0.0
          title: Tax Rate
          type: number
        wacc:
          default: 0.12
          exclusiveMinimum: -1.0
          maximum: 1.0
          title: Wacc
          type: number
        wastewater_scope:
          default: included
          enum:
          - included
          - excluded_osbl
          title: Wastewater Scope
          type: string
      required:
      - cases
      title: TEACompareBody
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
      type: object
    TEABody:
      additionalProperties: false
      description: Request body for detailed techno-economic analysis
      properties:
        annual_operating_hours:
          default: 8000
          maximum: 8760.0
          minimum: 1.0
          title: Annual Operating Hours
          type: integer
        calculated_purity:
          title: Calculated Purity
          type: number
        calculated_yield:
          title: Calculated Yield
          type: number
        co_product_prices_usd_per_kg:
          anyOf:
          - additionalProperties:
              maximum: 10000000.0
              minimum: 0.0
              type: number
            type: object
          - type: 'null'
          description: Stated selling price per declared co-product, USD/kg.
          title: Co Product Prices Usd Per Kg
        co_products:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Target products sold as co-products.
          title: Co Products
        cooling_water_price_usd_per_m3:
          default: 0.0764
          exclusiveMinimum: 0.0
          maximum: 10.0
          title: Cooling Water Price Usd Per M3
          type: number
        electricity_price_usd_per_kWh:
          default: 0.1
          exclusiveMinimum: 0.0
          maximum: 2.0
          title: Electricity Price Usd Per Kwh
          type: number
        facility_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Facility Type
        feed_basis:
          default: auto
          enum:
          - auto
          - internal_broth
          - purchased
          title: Feed Basis
          type: string
        feeds:
          additionalProperties:
            additionalProperties: true
            type: object
          default: {}
          title: Feeds
          type: object
        labor_profile:
          default: us_food
          title: Labor Profile
          type: string
        product_identity_requested_targets:
          items:
            type: string
          title: Product Identity Requested Targets
          type: array
        product_identity_warnings:
          items:
            type: string
          title: Product Identity Warnings
          type: array
        product_selling_price_source:
          default: default
          enum:
          - default
          - user_supplied
          title: Product Selling Price Source
          type: string
        product_selling_price_usd_per_kg:
          default: 100.0
          maximum: 10000000.0
          minimum: 0.0
          title: Product Selling Price Usd Per Kg
          type: number
        raw_material_cost_multiplier:
          default: 1.0
          maximum: 100.0
          minimum: 0.0
          title: Raw Material Cost Multiplier
          type: number
        recycles:
          default: []
          items:
            $ref: '#/components/schemas/RecycleSpec'
          title: Recycles
          type: array
        simulation_results:
          items:
            additionalProperties: true
            type: object
          title: Simulation Results
          type: array
        steam_price_usd_per_GJ:
          default: 18.0
          exclusiveMinimum: 0.0
          maximum: 200.0
          title: Steam Price Usd Per Gj
          type: number
        steps:
          items:
            additionalProperties: true
            type: object
          title: Steps
          type: array
        stream:
          additionalProperties: true
          title: Stream
          type: object
        stream_closure_warnings:
          items:
            type: string
          title: Stream Closure Warnings
          type: array
        target_products:
          items:
            type: string
          title: Target Products
          type: array
        target_provenance:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/TargetProvenanceRoot'
              type: array
            type: object
          - type: 'null'
          title: Target Provenance
        terminal_streams:
          anyOf:
          - items:
              $ref: '#/components/schemas/TerminalStream'
            type: array
          - type: 'null'
          title: Terminal Streams
        thermal_duties:
          anyOf:
          - items:
              anyOf:
              - additionalProperties: true
                type: object
              - type: 'null'
            type: array
          - type: 'null'
          title: Thermal Duties
        wastewater_scope:
          default: included
          enum:
          - included
          - excluded_osbl
          title: Wastewater Scope
          type: string
      required:
      - stream
      - steps
      - target_products
      - simulation_results
      - calculated_yield
      - calculated_purity
      title: TEABody
      type: object
    TargetProvenanceRoot:
      description: 'A real additive source for target mass: external feed or producer step.'
      properties:
        feed_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Feed Id
        kind:
          enum:
          - feed
          - producer
          title: Kind
          type: string
        step_index:
          anyOf:
          - minimum: 0.0
            type: integer
          - type: 'null'
          title: Step Index
      required:
      - kind
      title: TargetProvenanceRoot
      type: object
    InvestorMetricsBody:
      additionalProperties: false
      description: Request body for investor metrics
      properties:
        annual_opex:
          title: Annual Opex
          type: number
        annual_revenue:
          title: Annual Revenue
          type: number
        depreciation:
          title: Depreciation
          type: number
        project_life:
          default: 10
          title: Project Life
          type: integer
        tax_rate:
          default: 0.21
          title: Tax Rate
          type: number
        tci:
          title: Tci
          type: number
        wacc:
          default: 0.12
          title: Wacc
          type: number
      required:
      - tci
      - annual_opex
      - annual_revenue
      - depreciation
      title: InvestorMetricsBody
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Supabase-issued access token for an untangle.bio account.
      scheme: bearer
      type: http