{"openapi":"3.1.0","info":{"title":"Unbound Mean Field model of Catalysis — API","description":"The **Unbound Mean Field model of Catalysis** (UMF) computes apparent\nkinetic descriptors — reaction orders, Tafel slopes, and apparent\nactivation energies — for heterogeneous and electrocatalytic reaction\nnetworks from a single domain-independent kinetic matrix \\(\\mathcal{K}\\).\n\nThe descriptors are three realisations of one mathematical object,\n\\(\\gamma_\\xi = \\mathrm{d}\\ln r_\\text{net}/\\mathrm{d}\\xi\\), evaluated\nfor the perturbation variable \\(\\xi\\) of each domain\n(concentration, potential, temperature). \\(\\mathcal{K}\\) is shared\nacross all three; only the driving-force vector \\(\\vec{\\mu}_\\xi\\)\nchanges (see §6 of the in-app *How does it work?* panel).\n\n## Quickstart\n\n1. **Parse** a reaction network → `POST /api/parse`\n2. **Compute** descriptors with chosen parameters → `POST /api/compute`\n3. Or do both in one call → `POST /api/analyze`\n\n## Multi-domain inputs (optional)\n\nThese three optional fields on `/api/compute` and `/api/analyze` switch\non the corresponding domain output:\n\n| Field   | Triggers                  | Output                                                  |\n|---------|---------------------------|---------------------------------------------------------|\n| `z`     | electron-transfer per step | `potential` block: γ\\_η and Tafel slope \\(b\\) (mV/dec) |\n| `E_A`   | activation energy per step (kJ/mol, ≥ 0) | `temperature` block: γ\\_T and \\(E_A^\\text{app}\\) (kJ/mol) |\n| `T_ref` | reference / equilibrium temperature (K, default 298.15) | used in both Tafel and Arrhenius outputs |\n\n`/api/parse` returns the electron-transfer vector `z` automatically,\ninferred from the `e-` tokens in your equations.\n\n## Stationary regimes\n\nEnumerate all limiting kinetic regimes (every combination of\n\\(\\chi\\in\\{0,1\\}\\) and \\(\\Psi\\)-row \\(\\in\\{0,\\infty\\}\\)) →\n`POST /api/regimes` (Excel) or `/api/regimes-csv`. Use\n`POST /api/regimes-match` to rank regimes against a target\nreaction-order vector.\n\n## AI-powered helpers\n\n- Interpretation of results → `POST /api/interpret` *(requires API key)*\n- Parameter suggestions → `POST /api/suggest-params` *(requires API key)*\n\n## Reports\n\n- Compile a LaTeX source string to PDF → `POST /api/latex-to-pdf`\n","version":"1.1.0"},"paths":{"/api/example":{"get":{"tags":["Core"],"summary":"Get an example reaction network","description":"Returns the Haber-Bosch ammonia synthesis network as a ready-to-parse\ntext block. Useful for testing and demos.","operationId":"load_example","responses":{"200":{"description":"A Haber-Bosch ammonia synthesis network","content":{"application/json":{"schema":{}}}}}}},"/api/version":{"get":{"tags":["Core"],"summary":"App and prompt version of this backend","operationId":"get_version","responses":{"200":{"description":"Version stamps so that a stale deploy can be diagnosed at a glance: compare the frontend's bundled APP_VERSION to the backend's app_version, and the prompt_version against the source of `backend/umf/version.py` to confirm that the running process has the latest LLM-prompt fixes.","content":{"application/json":{"schema":{}}}}}}},"/api/event/{name}":{"post":{"tags":["Core"],"summary":"Record a UI-interaction event (no payload, no persistence)","description":"Lightweight, privacy-respecting telemetry hook.\n\nThe frontend POSTs to ``/api/event/<name>`` for a small allowlist\nof UI-interaction events (an example was loaded, the *How does it\nwork?* PDF was generated, a model parameter was touched). The\nendpoint is intentionally trivial: it validates the name and\nreturns ``204 No Content``. The actual counter lives in\n``geo-stats/stats.json``, populated by the geo-aggregator from\n``request.uri`` lines in the Caddy access log. No IP, user-agent\nor per-event timestamp is ever persisted.","operationId":"record_event","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Empty 204. The endpoint itself does not write anything; the request is bucketed by the geo-aggregator side-car straight from the Caddy access log (which is truncated every 5 min), so no IP, user-agent or body data is ever persisted.","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/parse":{"post":{"tags":["Core"],"summary":"Parse a reaction network","description":"Parse a text block of elementary reaction steps into stoichiometric\nmatrices and species lists. Also computes the net (overall) reaction\nby eliminating surface intermediates via null-space analysis.","operationId":"parse_equations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseRequest"}}},"required":true},"responses":{"200":{"description":"Species lists, stoichiometric matrices, step labels, and net reaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/compute":{"post":{"tags":["Core"],"summary":"Compute apparent reaction orders, Tafel slopes, and apparent activation energies","description":"Compute apparent kinetic descriptors for an UMF reaction network.\n\nAlways returns the **concentration-domain** result (apparent reaction\norder γ_m) for every external species, plus the topology matrix K\nand coverage-response vectors x.\n\nTwo further domains are switched on by the corresponding optional\nfields in the request:\n\n* **`z`** (electron-transfer per step): if any entry is non-zero,\n  the response includes a `potential` block with γ_η and the\n  Tafel slope b in mV/decade.\n* **`E_A`** (activation energy per step, kJ/mol, ≥ 0): if any entry\n  is positive, the response includes a `temperature` block with\n  γ_T and the apparent activation energy E_app.\n\nBoth Tafel and Arrhenius outputs are evaluated at the reference\ntemperature `T_ref` (default 298.15 K). All three domains share the\nsame kinetic matrix K — that is the central point of the model.","operationId":"compute_orders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeRequest"}}},"required":true},"responses":{"200":{"description":"γ_m for every external species, plus optional potential-domain (Tafel) and temperature-domain (E_app) blocks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analyze":{"post":{"tags":["Core"],"summary":"Parse and compute in one call","description":"All-in-one endpoint: parse a reaction network *and* compute its\nkinetic descriptors in a single request.\n\nThis is the recommended entry point for programmatic / LLM access.\nSupply the reaction equations and model parameters; the response\ncontains the net reaction, species lists, and (depending on which\noptional fields are populated) reaction orders γ_m, Tafel slopes, and\napparent activation energies — see `/api/compute` for the\ndomain-trigger conventions on `z`, `E_A`, and `T_ref`. The\nelectron-transfer vector `z` is parsed automatically from the\nequations and does not need to be supplied here.","operationId":"analyze","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Net reaction, species lists, and reaction orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/regimes":{"post":{"tags":["Regimes"],"summary":"Export all stationary regimes (Excel)","description":"Enumerate every combination of χ_k ∈ {0, 1} and Ψ-row_i ∈ {0, ∞}\nand compute the resulting reaction-order tuple for each.\n\nReturns a formatted Excel workbook containing:\n- **Stationary Regimes** sheet with all data rows\n- **Summary** sheet with counts of total / finite / divergent regimes\n\nThe maximum number of combinations is capped at 100,000 for Excel.","operationId":"regimes_api_regimes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegimesRequest"}}},"required":true},"responses":{"200":{"description":"Formatted .xlsx workbook with one row per (χ, Ψ) regime"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/regimes-csv":{"post":{"tags":["Regimes"],"summary":"Export all stationary regimes (CSV)","description":"Same enumeration as ``/api/regimes`` but returns a lightweight CSV.\n\nThe first lines are comments (prefixed with ``#``) summarising the\ntotal, finite, and divergent regime counts. This format is efficient\nfor large networks and easy to parse programmatically.\n\nThe combination cap is 2,000,000 (vs 100,000 for the Excel endpoint).","operationId":"regimes_csv_api_regimes_csv_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegimesRequest"}}},"required":true},"responses":{"200":{"description":"Lightweight CSV with comment-line summary"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/regimes-match":{"post":{"tags":["Regimes"],"summary":"Find best-matching stationary regimes for target reaction orders","description":"Enumerate all regimes and rank them by how closely their computed\nobservables match the supplied target values.\n\nThree groups of targets can be combined freely:\n\n* ``target_gammas`` — per-species reaction orders (concentration domain).\n* ``target_tafel_mV_per_dec`` — Tafel slope in mV/decade\n  (requires ``z`` to have a non-zero entry).\n* ``target_E_app_kJ`` — apparent activation energy in kJ/mol\n  (requires ``E_A`` to have a positive entry).\n\nSSE is computed in the dimensionless γ-form: every selected target\ncontributes one squared delta, so units are consistent across all\nobservable kinds. Regimes where any *included* observable evaluates\nto NaN or ±∞ are excluded from the ranking.","operationId":"regimes_match","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegimesMatchRequest"}}},"required":true},"responses":{"200":{"description":"Top-N regimes ranked by SSE against the supplied target orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegimesMatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/interpret":{"post":{"tags":["AI"],"summary":"AI-generated interpretation of results","description":"Generate a scientific interpretation of UMF results using an LLM.\n\nRequires at least one API key (Gemini, Groq, OpenAI, or Anthropic)\npassed in the ``api_keys`` field. Set ``deep: true`` for literature\ncomparison (uses stronger paid models).","operationId":"interpret_api_interpret_post","responses":{"200":{"description":"Prose interpretation, model used, and optional empirical-comparison ratings","content":{"application/json":{"schema":{}}}}}}},"/api/suggest-params":{"post":{"tags":["AI"],"summary":"AI-suggested model parameters","description":"Use an LLM to suggest physically reasonable χ and Ψ parameter values\nfor a given reaction network. Requires at least one API key.","operationId":"suggest_params_api_suggest_params_post","responses":{"200":{"description":"Suggested χ and Ψ values with reasoning","content":{"application/json":{"schema":{}}}}}}},"/api/latex-to-pdf":{"post":{"tags":["Report"],"summary":"Compile LaTeX to PDF","description":"Compile a LaTeX source string to PDF using ``pdflatex``.\nPrimarily used by the web frontend for report generation.","operationId":"latex_to_pdf_api_latex_to_pdf_post","responses":{"200":{"description":"Compiled PDF bytes"}}}}},"components":{"schemas":{"AnalyzeRequest":{"properties":{"equations":{"type":"string","title":"Equations","description":"Newline-separated elementary steps (same format as /api/parse)","example":"N2 <=> 2 *N\nH2 <=> 2 *H\n*N + *H <=> *NH\n*NH + *H <=> *NH2\n*NH2 + *H <=> *NH3\n*NH3 <=> NH3"},"chi":{"items":{"type":"number"},"type":"array","title":"Chi","description":"Reversibility per step"},"beta":{"items":{"type":"number"},"type":"array","title":"Beta","description":"Symmetry factor per step"},"Psi":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Psi","description":"Lateral interaction matrix Ψ"},"zeta":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Zeta","description":"Log-change of occurrence numbers (optional)"},"E_A":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"E A","description":"Elementary activation energy per step [kJ/mol] (optional)"},"T_ref":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T Ref","description":"Reference temperature [K] (default 298.15)"}},"type":"object","required":["equations","chi","beta","Psi"],"title":"AnalyzeRequest","description":"All-in-one request: equations plus model parameters."},"AnalyzeResponse":{"properties":{"surface_species":{"items":{"type":"string"},"type":"array","title":"Surface Species"},"external_species":{"items":{"type":"string"},"type":"array","title":"External Species"},"step_labels":{"items":{"type":"string"},"type":"array","title":"Step Labels"},"net_reaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Net Reaction"},"orders":{"additionalProperties":{"$ref":"#/components/schemas/SpeciesResult"},"type":"object","title":"Orders"},"K":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"K"},"z":{"items":{"type":"integer"},"type":"array","title":"Z"},"potential":{"anyOf":[{"$ref":"#/components/schemas/PotentialResult"},{"type":"null"}]},"temperature":{"anyOf":[{"$ref":"#/components/schemas/TemperatureResult"},{"type":"null"}]}},"type":"object","required":["surface_species","external_species","step_labels","net_reaction","orders","K"],"title":"AnalyzeResponse","description":"Combined parse + compute result."},"ComputeRequest":{"properties":{"V_R":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"V R","description":"Reactant stoichiometry matrix (nspecies × nsteps)"},"V_P":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"V P","description":"Product stoichiometry matrix (nspecies × nsteps)"},"chi":{"items":{"type":"number"},"type":"array","title":"Chi","description":"Reversibility per step: 0 = irreversible (RDS), 1 = quasi-equilibrated"},"beta":{"items":{"type":"number"},"type":"array","title":"Beta","description":"Symmetry factor per step, typically 0.5"},"Psi":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Psi","description":"Lateral interaction matrix Ψ (nspecies × nspecies). Use Infinity for hard-sphere exclusion."},"external_species":{"items":{"type":"string"},"type":"array","title":"External Species","description":"Names of external species to compute orders for"},"ext_V_R":{"additionalProperties":{"items":{"type":"number"},"type":"array"},"type":"object","title":"Ext V R","description":"External reactant vectors, keyed by species name"},"ext_V_P":{"additionalProperties":{"items":{"type":"number"},"type":"array"},"type":"object","title":"Ext V P","description":"External product vectors, keyed by species name"},"zeta":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Zeta","description":"Log-change of occurrence numbers per step (optional, defaults to 0)"},"z":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Z","description":"Electron-transfer vector z_k per step (optional). If any entry is non-zero, the response will include the potential-domain (Tafel) result."},"E_A":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"E A","description":"Elementary activation energy per step [kJ/mol] (optional, non-negative). If any entry is > 0, the response will include the temperature-domain result."},"dH":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Dh","description":"Elementary reaction enthalpy ΔH_k per step [kJ/mol] (signed, optional). Combined with E_A and beta it forms the full temperature driving force μ_T per Eq. (13). When any entry is non-zero, the temperature domain is activated even if all E_A are zero."},"kappa0":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Kappa0","description":"Elementary exchange rate per step (positive, relative units). Required only for the near-equilibrium (χ ≡ 1) linear-response branch (Eq. 15); cancels out of every apparent γ_ξ in the forward compute path, so the current backend compute endpoint forwards the field but does not consume it. Present here for forward compatibility and client-side symmetry with /analyze."},"T_ref":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T Ref","description":"Reference / equilibrium temperature [K], used for Tafel slope and apparent activation energy (default 298.15)."}},"type":"object","required":["V_R","V_P","chi","beta","Psi","external_species","ext_V_R","ext_V_P"],"title":"ComputeRequest","description":"Model parameters and stoichiometry needed to compute apparent reaction orders."},"ComputeResponse":{"properties":{"orders":{"additionalProperties":{"$ref":"#/components/schemas/SpeciesResult"},"type":"object","title":"Orders","description":"Reaction order results keyed by external species name"},"K":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"K","description":"Topology matrix K (nsteps × nspecies)"},"potential":{"anyOf":[{"$ref":"#/components/schemas/PotentialResult"},{"type":"null"}],"description":"Tafel-slope result, present when any z_k is non-zero"},"temperature":{"anyOf":[{"$ref":"#/components/schemas/TemperatureResult"},{"type":"null"}],"description":"Apparent-activation-energy result, present when any E_A_k > 0"}},"type":"object","required":["orders","K"],"title":"ComputeResponse","description":"Apparent reaction orders for all external species."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MatchedRegime":{"properties":{"rank":{"type":"integer","title":"Rank","description":"1-based rank (1 = best match)"},"sse":{"type":"number","title":"Sse","description":"Sum of squared errors over all selected target observables in their γ-form"},"chi":{"items":{"type":"number"},"type":"array","title":"Chi","description":"Reversibility values for each step (0 or 1)"},"psi_rows":{"items":{"type":"string"},"type":"array","title":"Psi Rows","description":"Ψ row extrema per surface species ('0' or 'inf')"},"gammas":{"additionalProperties":{"type":"number"},"type":"object","title":"Gammas","description":"Computed reaction orders for this regime"},"gamma_eta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gamma Eta","description":"Apparent transfer coefficient γ_η at this regime (only when z is provided)."},"tafel_mV_per_dec":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tafel Mv Per Dec","description":"Tafel slope b = R·T·ln(10)/(F·γ_η) at this regime, in mV/decade."},"gamma_T":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gamma T","description":"Dimensionless apparent activation exponent γ_T at this regime (only when E_A is provided)."},"E_app_kJ":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"E App Kj","description":"Apparent activation energy E_app = -R·T·γ_T at this regime, in kJ/mol."}},"type":"object","required":["rank","sse","chi","psi_rows","gammas"],"title":"MatchedRegime","description":"A single regime result ranked by closeness to target orders.\n\nTafel- and temperature-domain observables (``gamma_eta``,\n``tafel_mV_per_dec``, ``gamma_T``, ``E_app_kJ``) are populated when the\ncorresponding inputs (``z`` / ``E_A``) are supplied, regardless of\nwhether the user also provided a target for them. ``None`` indicates the\nobservable was not computed (input absent) or was non-finite for that\nregime."},"ParseRequest":{"properties":{"equations":{"type":"string","title":"Equations","description":"Newline-separated elementary steps. Surface species are prefixed with `*`. Use `<=>` or `⇌` as the reaction arrow.","example":"N2 <=> 2 *N\nH2 <=> 2 *H\n*N + *H <=> *NH\n*NH + *H <=> *NH2\n*NH2 + *H <=> *NH3\n*NH3 <=> NH3"}},"type":"object","required":["equations"],"title":"ParseRequest","description":"A text block of elementary reaction steps."},"ParseResponse":{"properties":{"surface_species":{"items":{"type":"string"},"type":"array","title":"Surface Species","description":"Ordered list of surface intermediates (prefixed with *)"},"external_species":{"items":{"type":"string"},"type":"array","title":"External Species","description":"Ordered list of external (gas-phase) species"},"V_R":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array","title":"V R","description":"Reactant stoichiometry matrix (nspecies × nsteps)"},"V_P":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array","title":"V P","description":"Product stoichiometry matrix (nspecies × nsteps)"},"ext_V_R":{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object","title":"Ext V R","description":"External reactant vectors, keyed by species name"},"ext_V_P":{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object","title":"Ext V P","description":"External product vectors, keyed by species name"},"step_labels":{"items":{"type":"string"},"type":"array","title":"Step Labels","description":"Human-readable label for each elementary step"},"net_reaction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Net Reaction","description":"Overall net reaction derived by eliminating surface intermediates, e.g. 'N2 + 3 H2 → 2 NH3'"},"z":{"items":{"type":"integer"},"type":"array","title":"Z","description":"Electron-transfer vector z_k per step (positive = electrons consumed in forward direction). All-zero when no 'e-' tokens appear."}},"type":"object","required":["surface_species","external_species","V_R","V_P","ext_V_R","ext_V_P","step_labels"],"title":"ParseResponse","description":"Parsed reaction network: species lists, stoichiometric matrices, net reaction."},"PotentialResult":{"properties":{"gamma_eta":{"type":"number","title":"Gamma Eta","description":"Apparent transfer coefficient γ_η"},"tafel_mV_per_dec":{"type":"number","title":"Tafel Mv Per Dec","description":"Tafel slope b = R·T·ln(10) / (F·γ_η) in mV/decade"},"x":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"X","description":"Coverage response vector for the potential perturbation"},"method":{"type":"string","title":"Method"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["gamma_eta","tafel_mV_per_dec","method"],"title":"PotentialResult","description":"Result of the potential-domain (Tafel) solve."},"RegimesMatchRequest":{"properties":{"V_R":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"V R","description":"Reactant stoichiometry matrix"},"V_P":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"V P","description":"Product stoichiometry matrix"},"beta":{"items":{"type":"number"},"type":"array","title":"Beta","description":"Symmetry factor per step"},"surface_species":{"items":{"type":"string"},"type":"array","title":"Surface Species","description":"Surface species names"},"external_species":{"items":{"type":"string"},"type":"array","title":"External Species","description":"External species names"},"ext_V_R":{"additionalProperties":{"items":{"type":"number"},"type":"array"},"type":"object","title":"Ext V R","description":"External reactant vectors"},"ext_V_P":{"additionalProperties":{"items":{"type":"number"},"type":"array"},"type":"object","title":"Ext V P","description":"External product vectors"},"step_labels":{"items":{"type":"string"},"type":"array","title":"Step Labels","description":"Elementary step labels"},"target_gammas":{"additionalProperties":{"type":"number"},"type":"object","title":"Target Gammas","description":"Target reaction orders to match, keyed by external species name. May be empty if a Tafel- or E_app-only match is desired.","example":{"H2":1.5,"N2":-1.0,"NH3":-0.5}},"top_n":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Top N","description":"Number of best matches to return","default":10},"z":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Z","description":"Electron-transfer vector z_k per step. Required to compute the Tafel observable per regime."},"E_A":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"E A","description":"Elementary activation energy per step [kJ/mol]. Required to compute the E_app observable per regime."},"dH":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Dh","description":"Elementary reaction enthalpy ΔH_k per step [kJ/mol] (signed, optional). Combined with ``E_A`` and ``beta`` to form the full temperature driving force μ_T per Eq. (13). Activates the E_app observable even if every entry of ``E_A`` is zero."},"T_ref":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T Ref","description":"Reference / equilibrium temperature [K] (default 298.15)."},"target_tafel_mV_per_dec":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Tafel Mv Per Dec","description":"Optional target Tafel slope b in mV/decade. Only consulted when ``z`` indicates a non-zero electron-transfer vector."},"target_E_app_kJ":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target E App Kj","description":"Optional target apparent activation energy E_app in kJ/mol. Only consulted when ``E_A`` is non-zero somewhere."}},"type":"object","required":["V_R","V_P","beta","surface_species","external_species","ext_V_R","ext_V_P","step_labels"],"title":"RegimesMatchRequest","description":"Find the best-matching stationary regimes for given target reaction orders.\n\nThe matcher always scores against per-species reaction orders (γ_m). When\nthe optional electrocatalysis (``z``) and/or thermal (``E_A``) inputs are\nsupplied, two additional observables become available:\n\n* **Tafel slope** ``b`` (mV/dec) — set ``target_tafel_mV_per_dec`` to\n  include it in the SSE.\n* **Apparent activation energy** ``E_app`` (kJ/mol) — set\n  ``target_E_app_kJ`` to include it in the SSE.\n\nTargets are converted to their dimensionless γ-form internally (γ_η for\nTafel, γ_T for E_app), so SSE remains a single dimensionally-consistent\nsum of squared deltas across all selected observables."},"RegimesMatchResponse":{"properties":{"matches":{"items":{"$ref":"#/components/schemas/MatchedRegime"},"type":"array","title":"Matches","description":"Ranked regime matches (best first)"},"total_regimes":{"type":"integer","title":"Total Regimes","description":"Total number of regimes enumerated"},"finite_regimes":{"type":"integer","title":"Finite Regimes","description":"Number of regimes with all-finite target-species orders"}},"type":"object","required":["matches","total_regimes","finite_regimes"],"title":"RegimesMatchResponse","description":"Best-matching stationary regimes, sorted by ascending SSE."},"RegimesRequest":{"properties":{"V_R":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"V R","description":"Reactant stoichiometry matrix"},"V_P":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"V P","description":"Product stoichiometry matrix"},"beta":{"items":{"type":"number"},"type":"array","title":"Beta","description":"Symmetry factor per step (held fixed across regimes)"},"surface_species":{"items":{"type":"string"},"type":"array","title":"Surface Species","description":"Surface species names"},"external_species":{"items":{"type":"string"},"type":"array","title":"External Species","description":"External species names"},"ext_V_R":{"additionalProperties":{"items":{"type":"number"},"type":"array"},"type":"object","title":"Ext V R","description":"External reactant vectors"},"ext_V_P":{"additionalProperties":{"items":{"type":"number"},"type":"array"},"type":"object","title":"Ext V P","description":"External product vectors"},"step_labels":{"items":{"type":"string"},"type":"array","title":"Step Labels","description":"Elementary step labels"},"z":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Z","description":"Electron-transfer vector z_k per step (optional). When any entry is non-zero, each regime row also reports the potential-domain transfer coefficient γ_η and Tafel slope b."},"E_A":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"E A","description":"Elementary activation energy per step in kJ/mol (optional). When any entry is > 0, each regime row also reports the temperature-domain γ_T and apparent activation energy E_app."},"dH":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Dh","description":"Elementary reaction enthalpy ΔH_k per step in kJ/mol (optional, signed). Together with ``E_A`` and ``beta`` it determines the full temperature driving force μ_T per Eq. (13). When any entry is non-zero, the temperature domain is activated even if all E_A are zero (a pure ΔH contribution still drives γ_T)."},"T_ref":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T Ref","description":"Reference / equilibrium temperature [K] used for Tafel and E_app conversions (default 298.15)."}},"type":"object","required":["V_R","V_P","beta","surface_species","external_species","ext_V_R","ext_V_P","step_labels"],"title":"RegimesRequest","description":"Network definition for enumerating all stationary kinetic regimes."},"SpeciesResult":{"properties":{"gamma":{"type":"number","title":"Gamma","description":"Apparent reaction order γ_m"},"x":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"X","description":"Coverage response vector x_m (nspecies entries)"},"method":{"type":"string","title":"Method","description":"Solution method used (augmented, constrained, lstsq)"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if the system was singular or degenerate"}},"type":"object","required":["gamma","method"],"title":"SpeciesResult","description":"Computed reaction order and coverage response for one external species."},"TemperatureResult":{"properties":{"gamma_T":{"type":"number","title":"Gamma T","description":"Dimensionless apparent activation exponent γ_T"},"E_app_kJ":{"type":"number","title":"E App Kj","description":"Apparent activation energy E_app = -R·T·γ_T  [kJ/mol]"},"x":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"X","description":"Coverage response vector for the temperature perturbation"},"method":{"type":"string","title":"Method"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["gamma_T","E_app_kJ","method"],"title":"TemperatureResult","description":"Result of the temperature-domain (apparent activation-energy) solve."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"Core","description":"Parse networks, compute reaction orders, and run combined analysis"},{"name":"Regimes","description":"Enumerate all stationary kinetic regimes at parameter extrema"},{"name":"AI","description":"LLM-powered interpretation and parameter suggestion (requires API keys)"},{"name":"Report","description":"Generate PDF/LaTeX reports (used by the web frontend)"}]}