Model details
View repositoryExample usage
Call BioNeMo OpenFold3 on Baseten using the NIM structure prediction route.
Note: You need to procure your own NVAIE licenses to access this NIM.
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 "/biology/openfold/openfold3/predict"
9)
10
11sequence = "LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"
12minimal_msa = f">query\n{sequence}\n"
13
14payload = {
15 "inputs": [
16 {
17 "input_id": "villin_hp35_test",
18 "molecules": [
19 {
20 "type": "protein",
21 "sequence": sequence,
22 "msa": {
23 "main": {
24 "a3m": {
25 "alignment": minimal_msa,
26 "format": "a3m",
27 }
28 }
29 },
30 }
31 ],
32 "diffusion_samples": 1,
33 "output_format": "pdb",
34 }
35 ]
36}
37
38response = requests.post(
39 BASETEN_URL,
40 headers={
41 "Authorization": f"Bearer {BASETEN_API_KEY}",
42 "Content-Type": "application/json",
43 },
44 json=payload,
45 timeout=300,
46)
47response.raise_for_status()
48result = response.json()
49print(result)
50JSON output
1{
2 "outputs": [
3 {
4 "input_id": "villin_hp35_test",
5 "structures_with_scores": [
6 {
7 "structure": "<PDB text>",
8 "format": "pdb",
9 "confidence_score": 0.85
10 }
11 ]
12 }
13 ]
14}