Get Compound Image
pubchem_get_compound_imageRetrieve 2D chemical structure diagrams from PubChem by CID. Specify small or large PNG image size to generate molecular visualizations for research and documentation.
Instructions
Fetch a 2D structure diagram (PNG image) for a compound by CID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | Yes | PubChem Compound ID. | |
| size | No | Image size: "small" (100x100) or "large" (300x300). Default: "large". | large |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | Yes | PubChem Compound ID. | |
| imageBase64 | Yes | Base64-encoded PNG image data. | |
| mimeType | Yes | Image MIME type. | |
| width | Yes | Image width in pixels. | |
| height | Yes | Image height in pixels. |