Welcome to CMPDIMG - a service for converting SMILES (Simplified Molecular Input Line Entry System) strings into molecular structure images. This service is designed for easy integration into web pages, Excel spreadsheets, and other applications.
GET /generate?smiles=CCO
This returns a PNG image of ethanol (CCO).
GET /generateConvert a SMILES string to a molecular structure image.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
smiles |
string | โ Yes | - | SMILES string representing the molecule |
format |
string | โ No | png | Output format: png or svg |
width |
integer | โ No | 300 | Image width in pixels (50-2000) |
height |
โ No | integer | 300 | Image height in pixels (50-2000) |
transparent |
boolean | โ No | true | Use transparent background (PNG only) |
GET /healthSimple health check endpoint that returns service status.
GET /statusDetailed status information including version and environment.
GET /helpThis documentation page.
GET /docsInteractive OpenAPI/Swagger documentation.
<img src="https://cmpdimg.montai.net/generate?smiles=CCO"
alt="Ethanol" />
<img src="https://cmpdimg.montai.net/generate?smiles=c1ccccc1&width=400&height=400"
alt="Benzene"
width="400"
height="400" />
<img src="https://cmpdimg.montai.net/generate?smiles=CC(=O)O&format=svg"
alt="Acetic Acid" />
const smiles = "CCO";
const img = document.createElement('img');
img.src = `https://cmpdimg.montai.net/generate?smiles=${encodeURIComponent(smiles)}`;
img.alt = smiles;
document.body.appendChild(img);
If your SMILES string is in cell A1:
=IMAGE("https://cmpdimg.montai.net/generate?smiles="&A1)
With custom size:
=IMAGE("https://cmpdimg.montai.net/generate?smiles="&A1&"&width=250&height=250")
| SMILES | Molecule | Try It |
|---|---|---|
CCO |
Ethanol | View |
c1ccccc1 |
Benzene | View |
CC(=O)O |
Acetic Acid | View |
CC(C)O |
Isopropanol | View |
C1=CC=C(C=C1)O |
Phenol | View |
CC(=O)Oc1ccccc1C(=O)O |
Aspirin | View |
If an invalid SMILES string is provided, the API will return:
400 Bad RequestINVALID - Not a valid SMILES syntaxC[C@ - Incomplete SMILES stringxxx123 - Invalid characters/structurecurl "https://cmpdimg.montai.net/generate?smiles=CCO" -o ethanol.png
curl "https://cmpdimg.montai.net/generate?smiles=c1ccccc1&format=svg" -o benzene.svg
curl "https://cmpdimg.montai.net/generate?smiles=CC(=O)O&width=500&height=500" -o acetic_acid.png
| Environment | URL | Purpose |
|---|---|---|
| Production | https://cmpdimg.montai.net |
Stable production service |
| Test | https://cmpdimg-test.montai.net |
Testing and validation |
For issues, questions, or feature requests, please contact your system administrator or check the project repository.
CMPDIMG v0.1.0 | Powered by RDKit and FastAPI