Announcing our Series F. Learn more
biology

NVIDIA logoBioNeMo GenMol

NVIDIA NIM for GenMol molecule generation and scaffold decoration.

Model details

View repository

Example usage

Call BioNeMo GenMol on Baseten using the NIM generation route.

Note: You need to procure your own NVAIE licenses to access this NIM. The NIM requires an ngc_api_key secret in your Baseten workspace — add your NVIDIA NGC API key (the nvapi-… value) as a secret named ngc_api_key before deploying.

Input
1import os
2import requests
3
4MODEL_ID = os.environ["BASETEN_MODEL_ID"]
5BASETEN_API_KEY = os.environ["BASETEN_API_KEY"]
6BASETEN_URL = (
7    f"https://model-{MODEL_ID}.api.baseten.co/environments/production/sync"
8    "/generate"
9)
10
11payload = {
12    "smiles": "[C@H]1O[C@@H](CO)[C@H](O)[C@@H]1O.[*{15-15}]",
13    "num_molecules": 5,
14    "temperature": 1.0,
15    "noise": 1.0,
16    "scoring": "QED",
17}
18
19response = requests.post(
20    BASETEN_URL,
21    headers={
22        "Authorization": f"Bearer {BASETEN_API_KEY}",
23        "Content-Type": "application/json",
24    },
25    json=payload,
26    timeout=300,
27)
28response.raise_for_status()
29result = response.json()
30print(result)
31
JSON output
1{
2    "status": "success",
3    "molecules": [
4        {
5            "smiles": "OC[C@@H]1O[CH][C@@H](O)[C@H]1O",
6            "score": 0.397
7        }
8    ]
9}

🔥 Trending models