Render Chem Reaction
What it does
Takes a reaction — either as a reaction SMILES string or structured reactants/products/reagents — and renders a clean 2D reaction scheme diagram (reactants → products with an arrow). The default response includes the image as base64 data in a JSON wrapper, so you can embed it directly as a data URL. Set responseFormat: "file" when you want raw SVG or PNG output instead.
Why use it?
- Full reaction schemes. Unlike
render-chem(single molecule), this renders complete reaction pathways with reactants, reagents, and products in one diagram. - Two input modes. Use a reaction SMILES string for quick rendering, or structured input for precise control over each component.
- Same quality & options. Shares presets, themes, and rendering options with
render-chem— publication-ready output out of the box.
Examples
Structured input (recommended)
curl -X POST https://api.creatornode.io/visual/v1/render-chem-reaction \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{
"reaction": {
"reactants": ["CCO", "O"],
"reagents": ["[Na+].[OH-]"],
"products": ["CC[O-].[Na+]"]
},
"format": "svg",
"theme": "light",
"options": { "width": 900, "height": 450 }
}'Response contains data as base64-encoded SVG with all molecules and a reaction arrow.
Reaction SMILES (convenience)
curl -X POST https://api.creatornode.io/visual/v1/render-chem-reaction \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{
"reactionSmiles": "CCO.O>[Na+].[OH-]>CC[O-].[Na+]",
"format": "png",
"responseFormat": "file",
"preset": "social-card"
}'Reaction SMILES format: reactants>reagents>products, where each side is a .-separated list of molecule SMILES.
Tips & tricks
Use structured input when you need precise control over item count and per-molecule validation. Use reaction SMILES for quick, single-string convenience.
For SVG, build a data URL like: data:image/svg+xml;base64,<data>. For PNG, use: data:image/png;base64,<data>.
Default JSON mode is the better choice when you need item counts and render metadata. File mode is better when the rendered scheme is the final deliverable.
Cost & Limits
| Feature | Detail |
|---|---|
| Base cost | 5 credits per request (up to 3 items) |
| Extra items | +1 credit per additional item beyond 3 |
| Output formats | SVG, PNG (JSON wrapper by default; raw file mode optional) |
| Themes | light, dark |
| Presets | default, publication, presentation, thumbnail, social-card |
Tier Limits
| Limit | Free | Premium |
|---|---|---|
| Max SMILES length per item | 200 chars | 4 000 chars |
| Max items per request | 6 | 30 |
| Max dimensions | 800×800 | 2048×2048 |
| Dark theme | No | Yes |
| Transparent background (SVG) | No | Yes |
| Custom element colors | No | Yes |
Other Endpoints
Render Code
Render syntax-highlighted code snippets as SVG or PNG images.
Render Code Diff
Render before/after code diffs with line-level highlighting.
Render Diagram
Render Mermaid diagrams to SVG, PNG, ASCII, or Unicode.
Render Timeline
Render event timelines and roadmap infographics as SVG or PNG.
Render Chem
Render chemistry molecules from SMILES notation as SVG or PNG.