{"openapi":"3.1.0","info":{"title":"Chemistry Companion","description":"Chemistry toolkit for ChatGPT actions: PubChem compound lookup (names, SMILES, CIDs, InChIKeys, GHS safety), RDKit-computed properties, publication-quality molecule diagrams, single and multi-step reaction schemes with reagents and conditions on the arrows, equation balancing and stoichiometry / yield calculations. Diagram endpoints return `image_url` (link for the user) and attach the PNG as a zip via openaiFileResponse so it can be displayed inline with Code Interpreter.","version":"2.0.0"},"servers":[{"url":"https://cybrix.ai/chemistry_companion","description":"Chemistry Companion API"}],"paths":{"/health":{"get":{"tags":["meta"],"summary":"Service health check","operationId":"health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/compounds/lookup":{"post":{"tags":["lookup"],"summary":"Look up compounds in PubChem","description":"Resolve names, SMILES, CIDs, InChI or InChIKeys to PubChem records: canonical SMILES, IUPAC name, formula,\nmolecular weight, InChIKey, computed properties, synonyms and optionally description and GHS safety data.\nUnknown names come back with `suggestions` (spelling corrections).","operationId":"lookup_compound","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/compounds/properties":{"post":{"tags":["lookup"],"summary":"Compute molecular properties from SMILES","description":"RDKit-computed descriptors for any valid SMILES (works for novel molecules not in PubChem): formula, MW, exact mass,\nlogP, TPSA, H-bond donors/acceptors, rotatable bonds, rings, stereocentres, QED, Lipinski violations, InChI/InChIKey.","operationId":"compute_properties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertiesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/diagrams/molecules":{"post":{"tags":["diagrams"],"summary":"Draw one or more molecules","description":"Render 1-16 molecules as a labelled grid (PNG). Supports substructure highlighting, atom indices, explicit hydrogens,\nformulas under labels and four visual styles. Returns `image_url` - embed it as a Markdown image.","operationId":"draw_molecules","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoleculesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/diagrams/reaction":{"post":{"tags":["diagrams"],"summary":"Draw a single reaction scheme","description":"Render one reaction as a scheme: reactants → products with reagents above and conditions below the arrow,\noptional coefficients, labels and equilibrium/resonance arrows. Accepts structured species or `reaction_smiles`.","operationId":"draw_reaction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/diagrams/reaction-chain":{"post":{"tags":["diagrams"],"summary":"Draw a multi-step reaction chain / pathway","description":"Render a multi-step synthesis or metabolic pathway. 'chain' layout flows A → B → C on one line (wrapping as needed)\nwith co-reactants, enzymes and by-products written on the arrows; 'stacked' draws each step as a full equation.","operationId":"draw_reaction_chain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionChainRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/diagrams/energy-profile":{"post":{"tags":["diagrams"],"summary":"Draw a reaction coordinate / energy profile diagram","description":"Reaction-coordinate diagram from relative energies: reactants, transition states (‡) and intermediates, with Ea arrows,\noverall ΔE and up to four overlaid profiles (e.g. catalysed vs uncatalysed).","operationId":"draw_energy_profile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnergyProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/compounds/functional-groups":{"post":{"tags":["lookup"],"summary":"Identify functional groups (with IR bands) and draw them","description":"Lists the functional groups present (name, atom indices, count, characteristic IR bands) and optionally draws the\nmolecule with every group highlighted in its own colour and a legend.","operationId":"identify_functional_groups","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionalGroupsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/compounds/compare":{"post":{"tags":["lookup"],"summary":"Compare two molecules: similarity, common core, differences","description":"Tanimoto similarity (Morgan fingerprints), maximum common substructure, property deltas and a side-by-side\ndiagram with the differing atoms highlighted - for analogues, prodrugs, isomers, metabolite vs parent, etc.","operationId":"compare_molecules","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/calculate":{"post":{"tags":["calculations"],"summary":"Chemistry calculators: molarity, dilution, ideal gas, pH/buffers, kinetics, Arrhenius, unit conversion","description":"Deterministic calculators with the working shown. Provide `species` (formula/name/SMILES) whenever a molar mass is needed.","operationId":"calculate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/reactions/balance":{"post":{"tags":["calculations"],"summary":"Balance an equation; redox gets half-reactions and an electron-transfer diagram","description":"Balance a chemical equation (including ionic and redox). For redox reactions, also returns oxidation states,\nhalf-reactions, electrons transferred and an electron-transfer diagram.","operationId":"balance_equation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}},"/reactions/stoichiometry":{"post":{"tags":["calculations"],"summary":"Limiting reagent, theoretical and percent yield","description":"Balance the equation, convert the given amounts to moles, find the limiting reagent, the theoretical yield of every\nproduct and (if an actual yield is given) the percent yield. Also reports excess reagent left over.","operationId":"calculate_stoichiometry","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoichiometryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-openai-isConsequential":false}}},"components":{"schemas":{"Amount":{"properties":{"species":{"type":"string","title":"Species","description":"Which species this amount refers to (formula, name or SMILES exactly as written in the equation)."},"mass_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mass G"},"moles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Moles"},"volume_mL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Ml","description":"Solution or liquid volume; combine with molarity_M or density_g_per_mL."},"molarity_M":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Molarity M"},"density_g_per_mL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Density G Per Ml"},"gas_volume_L":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gas Volume L","description":"Gas volume; combine with gas_conditions."},"gas_conditions":{"anyOf":[{"type":"string","enum":["STP","SATP","RTP"]},{"type":"null"}],"title":"Gas Conditions","description":"STP = 22.414 L/mol, SATP = 24.465 L/mol, RTP = 24.0 L/mol."}},"type":"object","required":["species"],"title":"Amount"},"AtomLabel":{"properties":{"atom":{"anyOf":[{"type":"integer"},{"items":{"type":"integer"},"type":"array"},{"type":"string"}],"title":"Atom","description":"Atom index, or SMARTS of the atom (first match unless '@n')."},"text":{"type":"string","title":"Text","description":"Short annotation drawn next to the atom, e.g. 'δ+', 'δ−', 'Nu:', 'E+', 'LG', 'pKa 4.8'."}},"type":"object","required":["atom","text"],"title":"AtomLabel"},"BalanceRequest":{"properties":{"equation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equation","description":"Equation text: species separated by ' + ', sides by '->', '→', '=' or '⇌'. Species may be formulas, SMILES or names. e.g. 'Fe + O2 -> Fe2O3' or 'glucose + O2 -> CO2 + H2O'. Coefficients are optional."},"reactants":{"items":{"$ref":"#/components/schemas/EquationSpecies"},"type":"array","title":"Reactants"},"products":{"items":{"$ref":"#/components/schemas/EquationSpecies"},"type":"array","title":"Products"},"medium":{"anyOf":[{"type":"string","enum":["acidic","basic","neutral"]},{"type":"null"}],"title":"Medium","description":"Redox medium: adds H+ or OH- and H2O."}},"type":"object","title":"BalanceRequest"},"CalculateRequest":{"properties":{"calculation":{"type":"string","enum":["molarity","dilution","ideal_gas","ph","kinetics_first_order","arrhenius","convert"],"title":"Calculation","description":"molarity: two of (mass_g|moles), volume_mL, molarity_M (+ species for the molar mass). dilution: three of M1, V1_mL, M2, V2_mL. ideal_gas: three of pressure (+pressure_unit), volume_L, moles|mass_g (+species), temperature_K|temperature_C. ph: mode=strong_acid|strong_base (concentration_M), weak_acid (concentration_M + Ka|pKa), weak_base (concentration_M + Kb|pKb), buffer (pKa|Ka + acid_M + base_M), from_pH (pH). kinetics_first_order: k_per_s|half_life_s, optional time_s, initial_amount, target_fraction_remaining. arrhenius: k1, T1_K|T1_C, T2_K|T2_C, and Ea_kJ_per_mol (→k2) or k2 (→Ea). convert: quantity=energy|pressure|temperature, value, from_unit, to_unit."},"species":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Species","description":"Formula, name or SMILES of the substance when a molar mass is needed (molarity, ideal_gas with mass_g)."},"mode":{"anyOf":[{"type":"string","enum":["strong_acid","strong_base","weak_acid","weak_base","buffer","from_pH"]},{"type":"null"}],"title":"Mode"},"concentration_M":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Concentration M"},"Ka":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ka"},"pKa":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pka"},"Kb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kb"},"pKb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pkb"},"acid_M":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Acid M","description":"buffer: concentration of the weak acid (HA)"},"base_M":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base M","description":"buffer: concentration of the conjugate base (A⁻)"},"pH":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ph"},"protons":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Protons","description":"strong_acid: acidic protons per formula unit (H₂SO₄ → 2)"},"hydroxides":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hydroxides","description":"strong_base: hydroxides per formula unit (Ba(OH)₂ → 2)"},"added_type":{"anyOf":[{"type":"string","enum":["acid","base"]},{"type":"null"}],"title":"Added Type","description":"buffer: strong acid or base added"},"added_M":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Added M"},"added_mL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Added Ml"},"mass_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mass G"},"moles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Moles"},"volume_mL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Ml"},"molarity_M":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Molarity M"},"pressure":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pressure"},"pressure_unit":{"anyOf":[{"type":"string","enum":["atm","kPa","Pa","bar","mmHg","torr","psi"]},{"type":"null"}],"title":"Pressure Unit"},"volume_L":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume L"},"temperature_K":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature K"},"temperature_C":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature C"},"M1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"M1"},"V1_mL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"V1 Ml"},"M2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"M2"},"V2_mL":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"V2 Ml"},"k_per_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"K Per S"},"half_life_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Half Life S"},"time_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time S"},"initial_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Initial Amount"},"target_fraction_remaining":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Fraction Remaining"},"k1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"K1"},"k2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"K2"},"Ea_kJ_per_mol":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ea Kj Per Mol"},"T1_K":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T1 K"},"T1_C":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T1 C"},"T2_K":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T2 K"},"T2_C":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T2 C"},"quantity":{"anyOf":[{"type":"string","enum":["energy","pressure","temperature"]},{"type":"null"}],"title":"Quantity"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"from_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Unit","description":"energy: kJ/mol, kcal/mol, eV, J/mol, cm-1, hartree; pressure: atm, kPa, Pa, bar, mmHg, torr, psi; temperature: K, C, F"},"to_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Unit"}},"type":"object","required":["calculation"],"title":"CalculateRequest","description":"Flat parameter set: give `calculation` plus the fields that calculation needs (ChatGPT actions cannot send free-form objects)."},"CompareRequest":{"properties":{"molecule_a":{"$ref":"#/components/schemas/Species"},"molecule_b":{"$ref":"#/components/schemas/Species"},"draw":{"type":"boolean","title":"Draw","description":"Return a side-by-side diagram with the differing atoms highlighted.","default":true},"style":{"type":"string","enum":["default","bw","acs","dark"],"title":"Style","default":"default"},"show_formulas":{"type":"boolean","title":"Show Formulas","default":true}},"type":"object","required":["molecule_a","molecule_b"],"title":"CompareRequest"},"ElectronArrow":{"properties":{"from":{"anyOf":[{"type":"integer"},{"items":{"type":"integer"},"type":"array"},{"type":"string"}],"title":"From","description":"Electron source: atom index (0-based, SMILES order), [i, j] for a bond, or a SMARTS such as '[OH]' or 'C=O' (a 2-atom SMARTS means that bond). Append '@2' to pick the 3rd match."},"to":{"anyOf":[{"type":"integer"},{"items":{"type":"integer"},"type":"array"},{"type":"string"}],"title":"To","description":"Electron destination: atom index, [i, j] bond, or SMARTS (same rules as `from`)."},"kind":{"type":"string","enum":["pair","single"],"title":"Kind","description":"'pair' = full arrowhead (2 electrons); 'single' = fishhook (1 electron, radicals).","default":"pair"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Tiny label at the arc, e.g. '1' or 'a'."}},"type":"object","required":["from","to"],"title":"ElectronArrow","description":"A curved electron-pushing arrow drawn on one molecule."},"EnergyPoint":{"properties":{"label":{"type":"string","title":"Label","description":"State name, e.g. 'Reactants', 'TS1‡', 'Carbocation intermediate', 'Products'."},"energy":{"type":"number","title":"Energy","description":"Relative energy (any consistent unit, see y_label)."},"kind":{"type":"string","enum":["minimum","transition"],"title":"Kind","description":"'minimum' = reactant/intermediate/product plateau; 'transition' = transition-state maximum.","default":"minimum"}},"type":"object","required":["label","energy"],"title":"EnergyPoint"},"EnergyProfileRequest":{"properties":{"series":{"items":{"$ref":"#/components/schemas/EnergySeries"},"type":"array","maxItems":4,"minItems":1,"title":"Series","description":"One or more energy profiles drawn on the same axes (compare catalysed vs uncatalysed, SN1 vs SN2, ...)."},"y_label":{"type":"string","title":"Y Label","description":"Axis label with units, e.g. 'ΔG (kJ/mol)', 'Potential energy (kcal/mol)'.","default":"Energy (kJ/mol)"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"show_values":{"type":"boolean","title":"Show Values","description":"Print the energy value under each state label.","default":true},"annotate_barriers":{"type":"boolean","title":"Annotate Barriers","description":"Draw Ea arrows for each barrier and the overall ΔE.","default":true},"style":{"type":"string","enum":["default","bw","acs","dark"],"title":"Style","default":"default"},"transparent":{"type":"boolean","title":"Transparent","default":false}},"type":"object","required":["series"],"title":"EnergyProfileRequest"},"EnergySeries":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Legend entry, e.g. 'uncatalysed' / 'with enzyme'."},"points":{"items":{"$ref":"#/components/schemas/EnergyPoint"},"type":"array","maxItems":15,"minItems":2,"title":"Points","description":"Alternate minima and transition states along the reaction coordinate."}},"type":"object","required":["points"],"title":"EnergySeries"},"EquationSpecies":{"properties":{"formula":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Formula","description":"Molecular formula such as 'Fe2O3', 'Ca(OH)2', 'SO4^2-'."},"smiles":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smiles"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name to resolve through PubChem, e.g. 'glucose'."},"coefficient":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coefficient","description":"Known coefficient (optional; the equation is balanced automatically)."}},"type":"object","title":"EquationSpecies"},"FunctionalGroupsRequest":{"properties":{"molecule":{"$ref":"#/components/schemas/Species","description":"The molecule (name or SMILES)."},"draw":{"type":"boolean","title":"Draw","description":"Also return a diagram with each group highlighted in its own colour plus a legend.","default":true},"style":{"type":"string","enum":["default","bw","acs","dark"],"title":"Style","default":"default"},"show_formulas":{"type":"boolean","title":"Show Formulas","default":true}},"type":"object","required":["molecule"],"title":"FunctionalGroupsRequest"},"LookupRequest":{"properties":{"queries":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Queries","description":"Names, SMILES, PubChem CIDs, InChI or InChIKeys (1-20). e.g. ['aspirin', 'CCO', '2244']."},"identifier_type":{"type":"string","enum":["auto","name","smiles","cid","inchikey","inchi"],"title":"Identifier Type","description":"Force how the queries are interpreted. 'auto' tries name, then SMILES, then formula.","default":"auto"},"include_synonyms":{"type":"boolean","title":"Include Synonyms","default":true},"include_description":{"type":"boolean","title":"Include Description","description":"Add PubChem's textual description (slower).","default":false},"include_safety":{"type":"boolean","title":"Include Safety","description":"Add GHS hazard classification: signal word, pictograms, H-statements (slower).","default":false},"include_experimental":{"type":"boolean","title":"Include Experimental","description":"Add experimental data from PubChem: melting/boiling point, density, solubility, flash point, vapour pressure, pKa, logP (slower).","default":false}},"type":"object","required":["queries"],"title":"LookupRequest"},"MoleculesRequest":{"properties":{"style":{"type":"string","enum":["default","bw","acs","dark"],"title":"Style","description":"'default' = coloured heteroatoms on white, 'bw' = black and white, 'acs' = ACS journal style, 'dark' = dark background.","default":"default"},"show_formulas":{"type":"boolean","title":"Show Formulas","description":"Print the molecular formula under each label.","default":false},"atom_annotations":{"type":"string","enum":["none","indices","symbols","map_numbers"],"title":"Atom Annotations","description":"'indices' numbers every atom, 'symbols' writes CH3/CH2/C on every carbon, 'map_numbers' keeps atom-map numbers from the SMILES.","default":"none"},"show_hydrogens":{"type":"boolean","title":"Show Hydrogens","description":"Draw all hydrogens explicitly.","default":false},"transparent":{"type":"boolean","title":"Transparent","description":"Transparent PNG background instead of white/dark.","default":false},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Optional title printed above the diagram."},"footnote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footnote","description":"Text printed at the bottom of the diagram (overall equation, legend, source, caveats)."},"max_width":{"type":"integer","maximum":3000.0,"minimum":500.0,"title":"Max Width","description":"Maximum logical width before the scheme wraps onto a new line.","default":1500},"molecules":{"items":{"$ref":"#/components/schemas/Species"},"type":"array","maxItems":16,"minItems":1,"title":"Molecules","description":"Molecules to draw side by side (1-16)."},"mols_per_row":{"anyOf":[{"type":"integer","maximum":6.0,"minimum":1.0},{"type":"null"}],"title":"Mols Per Row","description":"Grid columns. Auto when omitted."}},"type":"object","required":["molecules"],"title":"MoleculesRequest"},"PropertiesRequest":{"properties":{"molecules":{"items":{"type":"string"},"type":"array","maxItems":25,"minItems":1,"title":"Molecules","description":"SMILES strings (names are resolved via PubChem if a string is not valid SMILES)."}},"type":"object","required":["molecules"],"title":"PropertiesRequest"},"ReactionChainRequest":{"properties":{"style":{"type":"string","enum":["default","bw","acs","dark"],"title":"Style","description":"'default' = coloured heteroatoms on white, 'bw' = black and white, 'acs' = ACS journal style, 'dark' = dark background.","default":"default"},"show_formulas":{"type":"boolean","title":"Show Formulas","description":"Print the molecular formula under each label.","default":false},"atom_annotations":{"type":"string","enum":["none","indices","symbols","map_numbers"],"title":"Atom Annotations","description":"'indices' numbers every atom, 'symbols' writes CH3/CH2/C on every carbon, 'map_numbers' keeps atom-map numbers from the SMILES.","default":"none"},"show_hydrogens":{"type":"boolean","title":"Show Hydrogens","description":"Draw all hydrogens explicitly.","default":false},"transparent":{"type":"boolean","title":"Transparent","description":"Transparent PNG background instead of white/dark.","default":false},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Optional title printed above the diagram."},"footnote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footnote","description":"Text printed at the bottom of the diagram (overall equation, legend, source, caveats)."},"max_width":{"type":"integer","maximum":3000.0,"minimum":500.0,"title":"Max Width","description":"Maximum logical width before the scheme wraps onto a new line.","default":1500},"steps":{"items":{"$ref":"#/components/schemas/ReactionStep"},"type":"array","maxItems":12,"minItems":1,"title":"Steps","description":"Ordered reaction steps. Products of one step normally appear among the reactants of the next."},"layout":{"type":"string","enum":["chain","stacked"],"title":"Layout","description":"'chain' draws A → B → C on one flowing line with co-reactants/by-products written on the arrows; 'stacked' draws every step as a full equation on its own line.","default":"chain"},"highlight_changes":{"type":"boolean","title":"Highlight Changes","description":"Apply change-highlighting to every step: atoms and bonds that differ between each product and its closest reactant are highlighted. Recommended for detailed / annotated schemes.","default":false}},"type":"object","required":["steps"],"title":"ReactionChainRequest"},"ReactionRequest":{"properties":{"reactants":{"items":{"$ref":"#/components/schemas/Species"},"type":"array","maxItems":12,"title":"Reactants"},"products":{"items":{"$ref":"#/components/schemas/Species"},"type":"array","maxItems":12,"title":"Products"},"reagents":{"items":{"type":"string"},"type":"array","title":"Reagents","description":"Text written ABOVE the arrow: reagents, catalysts, enzymes. e.g. ['H₂SO₄ (cat.)']."},"conditions":{"items":{"type":"string"},"type":"array","title":"Conditions","description":"Text written BELOW the arrow: solvent, temperature, time. e.g. ['EtOH, reflux, 2 h']."},"arrow":{"type":"string","enum":["forward","equilibrium","resonance","retrosynthesis"],"title":"Arrow","description":"Arrow type.","default":"forward"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Step caption such as 'Step 1: nitration' or 'k₁'."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Explanation printed under the step (stacked layout) or as a numbered footnote (chain layout): what changes at this arrow, mechanism class, stereochemical outcome."},"highlight_changes":{"type":"boolean","title":"Highlight Changes","description":"Automatically highlight the atoms and bonds that change between each product and its closest reactant (bond-order changes, bonds formed/broken, new atoms). Ideal for detailed / annotated schemes.","default":false},"style":{"type":"string","enum":["default","bw","acs","dark"],"title":"Style","description":"'default' = coloured heteroatoms on white, 'bw' = black and white, 'acs' = ACS journal style, 'dark' = dark background.","default":"default"},"show_formulas":{"type":"boolean","title":"Show Formulas","description":"Print the molecular formula under each label.","default":false},"atom_annotations":{"type":"string","enum":["none","indices","symbols","map_numbers"],"title":"Atom Annotations","description":"'indices' numbers every atom, 'symbols' writes CH3/CH2/C on every carbon, 'map_numbers' keeps atom-map numbers from the SMILES.","default":"none"},"show_hydrogens":{"type":"boolean","title":"Show Hydrogens","description":"Draw all hydrogens explicitly.","default":false},"transparent":{"type":"boolean","title":"Transparent","description":"Transparent PNG background instead of white/dark.","default":false},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Optional title printed above the diagram."},"footnote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Footnote","description":"Text printed at the bottom of the diagram (overall equation, legend, source, caveats)."},"max_width":{"type":"integer","maximum":3000.0,"minimum":500.0,"title":"Max Width","description":"Maximum logical width before the scheme wraps onto a new line.","default":1500},"reaction_smiles":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reaction Smiles","description":"Alternative to reactants/products: reaction SMILES 'reactant1.reactant2>reagents>product1.product2'. Duplicated species are collapsed into coefficients."}},"type":"object","title":"ReactionRequest"},"ReactionStep":{"properties":{"reactants":{"items":{"$ref":"#/components/schemas/Species"},"type":"array","maxItems":12,"title":"Reactants"},"products":{"items":{"$ref":"#/components/schemas/Species"},"type":"array","maxItems":12,"title":"Products"},"reagents":{"items":{"type":"string"},"type":"array","title":"Reagents","description":"Text written ABOVE the arrow: reagents, catalysts, enzymes. e.g. ['H₂SO₄ (cat.)']."},"conditions":{"items":{"type":"string"},"type":"array","title":"Conditions","description":"Text written BELOW the arrow: solvent, temperature, time. e.g. ['EtOH, reflux, 2 h']."},"arrow":{"type":"string","enum":["forward","equilibrium","resonance","retrosynthesis"],"title":"Arrow","description":"Arrow type.","default":"forward"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Step caption such as 'Step 1: nitration' or 'k₁'."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Explanation printed under the step (stacked layout) or as a numbered footnote (chain layout): what changes at this arrow, mechanism class, stereochemical outcome."},"highlight_changes":{"type":"boolean","title":"Highlight Changes","description":"Automatically highlight the atoms and bonds that change between each product and its closest reactant (bond-order changes, bonds formed/broken, new atoms). Ideal for detailed / annotated schemes.","default":false}},"type":"object","title":"ReactionStep"},"Species":{"properties":{"smiles":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smiles","description":"SMILES of the species. Preferred; avoids a PubChem lookup."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Common or IUPAC name, resolved via PubChem when `smiles` is absent. Also used as the default label."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Caption drawn under the structure. Defaults to `name`, else the PubChem title, else the formula."},"coefficient":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Coefficient","description":"Stoichiometric coefficient drawn in front of the structure, e.g. 2."},"highlight_smarts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highlight Smarts","description":"SMARTS substructure to highlight in this molecule, e.g. 'C(=O)[OH]' for a carboxylic acid."},"highlight_atoms":{"items":{"type":"integer"},"type":"array","title":"Highlight Atoms","description":"Atom indices to highlight (0-based, as shown with atom_annotations='indices')."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Short annotation printed under the formula, e.g. 'nucleophile', 'leaving group', 'new C–O bond', 'rate-determining'."},"electron_arrows":{"items":{"$ref":"#/components/schemas/ElectronArrow"},"type":"array","title":"Electron Arrows","description":"Curved electron-pushing arrows for mechanisms (max 8). Use SMARTS references when unsure of atom indices."},"atom_labels":{"items":{"$ref":"#/components/schemas/AtomLabel"},"type":"array","title":"Atom Labels","description":"Small text labels next to specific atoms (δ+, Nu:, LG, ...)."},"text_only":{"type":"boolean","title":"Text Only","description":"Draw as text (e.g. 'NAD⁺', 'heat', 'hν', 'e⁻') instead of a structure. In chain layouts text-only reactants go above the arrow and text-only products below it.","default":false}},"type":"object","title":"Species","description":"One chemical species. Give `smiles` when you know it, otherwise `name` (resolved through PubChem)."},"StoichiometryRequest":{"properties":{"equation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equation","description":"Equation text: species separated by ' + ', sides by '->', '→', '=' or '⇌'. Species may be formulas, SMILES or names. e.g. 'Fe + O2 -> Fe2O3' or 'glucose + O2 -> CO2 + H2O'. Coefficients are optional."},"reactants":{"items":{"$ref":"#/components/schemas/EquationSpecies"},"type":"array","title":"Reactants"},"products":{"items":{"$ref":"#/components/schemas/EquationSpecies"},"type":"array","title":"Products"},"medium":{"anyOf":[{"type":"string","enum":["acidic","basic","neutral"]},{"type":"null"}],"title":"Medium","description":"Redox medium: adds H+ or OH- and H2O."},"amounts":{"items":{"$ref":"#/components/schemas/Amount"},"type":"array","minItems":1,"title":"Amounts","description":"Amounts of the reactants that are known. Reactants without an amount are assumed to be in excess."},"actual_yield":{"anyOf":[{"$ref":"#/components/schemas/Amount"},{"type":"null"}],"description":"Actual amount of a product obtained, to compute percent yield."}},"type":"object","required":["amounts"],"title":"StoichiometryRequest"}}}}