Get Compound Image
pubchem_get_compound_imageRetrieve a 2D structure diagram (PNG image) for a chemical compound using its PubChem CID. Supports small (100x100) or large (300x300) sizes.
Instructions
Fetch a 2D structure diagram (PNG image) for a compound by CID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | Yes | PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds. | |
| 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 | MIME type — always "image/png". | |
| width | Yes | Image width in pixels. | |
| height | Yes | Image height in pixels. |