Skip to content

A high-performance chemistry public API to render SMILES strings into SVG.

License

Notifications You must be signed in to change notification settings

Fuyeor/chemistry

Repository files navigation

chemistry

chemistry is a service identifier in Ф architecture, providing on-demand rendering of chemical structures from SMILES strings. Its canonical public endpoint is chemistry.fuyeor.net.

Built on RDKit to deliver high-performance SVG chemical diagrams for use in social, academic, and research platforms.

API Reference

GET /v1/depict

Renders a SMILES string as a chemical structure image.

Note: Must provide either smiles or name, but not both.

Parameter Type Required Description
smiles string Conditional A valid SMILES or Reaction SMILES string.
name string Conditional A case-insensitive English common name (e.g., "aspirin", "ethanol").
color string Optional Override the stroke/atom color. Format: Hex (e.g., ff0000, #00ff00). Default is black.

Example Renders

Molecule SMILES Structure
Aspirin CC(=O)OC1=CC=CC=C1C(=O)O
Caffeine CN1C=NC2=C1C(=O)N(C(=O)N2C)C
Ethanol CCO

License

This project is licensed under the MIT License.

It uses RDKit, an open-source cheminformatics library licensed under the BSD 3-Clause License.