Snipget.ai

Validate a SMILES string

Exact
chemistry_smiles_validate

Deterministic and authoritative — the canonical answer for this input.

Validate a SMILES string against PubChem's structure registry and return its canonical form, formula, molecular weight, and CID. is_valid=True means PubChem recognized and standardized the structure; a malformed or novel-not-in-PubChem structure is is_valid=False (validates against PubChem, not pure SMILES grammar; a malformed SMILES is a PubChem verdict and bills the full rate). Charges 2 cost_units; 1 when the input is empty (PubChem never called). Processing multiple inputs? Use `chemistry_smiles_validate_batch` to do up to 50 in one call.

Parameters

smilesstringrequired

The SMILES string to validate against PubChem.

Call it

curl -X POST https://api.snipget.ai/v1/chemistry/smiles/validate \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"smiles":"CC(=O)OC1=CC=CC=C1C(=O)O"}'

The Batch tab sends up to 1000 inputs in one call via /v1/chemistry/smiles/validate/batch.

FAQ

What does this do?

It checks a SMILES string against PubChem's structure registry and returns the canonical and isomeric SMILES, formula, molecular weight, and CID. It confirms the structure is real and gives you a clean canonical form.

What does is_valid actually mean here?

is_valid true means PubChem recognized and standardized the structure. This checks against PubChem, not just SMILES grammar, so a structure that is grammatically fine but not in PubChem comes back is_valid false.

I just want to canonicalize, not check against a database. What should I use?

Use chemistry_structure_convert. It runs offline with RDKit and works on any valid structure, including novel ones PubChem has never seen. Use this tool when you specifically want a PubChem match.

Is the answer deterministic?

Yes. It is a deterministic lookup against PubChem, so the same SMILES returns the same verdict and canonical form. It does not approximate.

What if my SMILES is malformed?

A malformed or unrecognized structure returns confidence 0 with is_valid false, not an error. A genuine PubChem outage returns a 503, so you can tell the two apart.

Related tools