curl --fail-with-body \
-H "Authorization: Bearer $BIOHUB_API_KEY" \
-o MGYP000166900001.pdb \
"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/MGYP000166900001"
curl --fail-with-body \
-H "Authorization: Bearer $BIOHUB_API_KEY" \
-o MGYP000166900001.cif \
"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/MGYP000166900001.cif"
import os
import requests
structure_id = "MGYP000166900001"
response = requests.get(
f"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/{structure_id}",
headers={"Authorization": f"Bearer {os.environ['BIOHUB_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
with open(f"{structure_id}.pdb", "wb") as f:
f.write(response.content)
HEADER 01-FEB-23
TITLE ESMFOLD V1 PREDICTION FOR MGYP000166900001
...
ATOM 1 N MET A 1 2.861 4.850 26.782 1.00 0.97 N
ATOM 2 CA MET A 1 1.832 5.831 26.449 1.00 0.98 C
ATOM 3 C MET A 1 2.285 6.726 25.300 1.00 0.98 C
...
loop_
_ma_qa_metric_local.label_asym_id
_ma_qa_metric_local.label_comp_id
_ma_qa_metric_local.label_seq_id
_ma_qa_metric_local.metric_id
_ma_qa_metric_local.metric_value
_ma_qa_metric_local.model_id
_ma_qa_metric_local.ordinal_id
A ILE 2 2 94.75 1 2
A ALA 3 2 98.42857142857143 1 3
...
ATOM 1 N N MET A 1 1 2.861 4.850 26.782 1.00 97.0 1
ATOM 2 C CA MET A 1 1 1.832 5.831 26.449 1.00 98.0 1
...
{
"error": "Unauthorized. Provide a valid API key via Authorization: Bearer <key>",
"request_id": "51ab8198-42f4-4567-b6fe-3369046d45d4"
}
{
"detail": "Predicted structure not found for MGYP999999999999."
}
Legacy
Fetch a predicted structure
Download a legacy ESM Metagenomic Atlas structure by MGnify accession, matching the esmatlas.com API.
GET
/
api
/
data
/
esm-atlas
/
v1
/
fetchPredictedStructure
/
{structure_id}
curl --fail-with-body \
-H "Authorization: Bearer $BIOHUB_API_KEY" \
-o MGYP000166900001.pdb \
"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/MGYP000166900001"
curl --fail-with-body \
-H "Authorization: Bearer $BIOHUB_API_KEY" \
-o MGYP000166900001.cif \
"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/MGYP000166900001.cif"
import os
import requests
structure_id = "MGYP000166900001"
response = requests.get(
f"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/{structure_id}",
headers={"Authorization": f"Bearer {os.environ['BIOHUB_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
with open(f"{structure_id}.pdb", "wb") as f:
f.write(response.content)
HEADER 01-FEB-23
TITLE ESMFOLD V1 PREDICTION FOR MGYP000166900001
...
ATOM 1 N MET A 1 2.861 4.850 26.782 1.00 0.97 N
ATOM 2 CA MET A 1 1.832 5.831 26.449 1.00 0.98 C
ATOM 3 C MET A 1 2.285 6.726 25.300 1.00 0.98 C
...
loop_
_ma_qa_metric_local.label_asym_id
_ma_qa_metric_local.label_comp_id
_ma_qa_metric_local.label_seq_id
_ma_qa_metric_local.metric_id
_ma_qa_metric_local.metric_value
_ma_qa_metric_local.model_id
_ma_qa_metric_local.ordinal_id
A ILE 2 2 94.75 1 2
A ALA 3 2 98.42857142857143 1 3
...
ATOM 1 N N MET A 1 1 2.861 4.850 26.782 1.00 97.0 1
ATOM 2 C CA MET A 1 1 1.832 5.831 26.449 1.00 98.0 1
...
{
"error": "Unauthorized. Provide a valid API key via Authorization: Bearer <key>",
"request_id": "51ab8198-42f4-4567-b6fe-3369046d45d4"
}
{
"detail": "Predicted structure not found for MGYP999999999999."
}
This endpoint keeps parity with the legacy esmatlas.com API,
The PDB file stores pLDDT on a 0 to 1 scale in the B-factor column.
The CIF file reports pLDDT on a 0 to 100 scale.
The response body is the raw file, not JSON, so save it to disk as the examples do.
https://api.esmatlas.com/fetchPredictedStructure/{id}, for existing users of that API.
It serves the same ESMFold structures from the original ESM Metagenomic Atlas, which covers only the older MGnify protein database version that Atlas was built from.
Proteins are identified by their MGnify accession, such as MGYP000166900001, not by the protein_hash that the other Atlas endpoints use.
This endpoint does not cover proteins added to MGnify after that version, and it does not return data from the current ESM Atlas.
For current Atlas proteins, structures, and features, use Get Protein.
Unlike the other Atlas endpoints, this endpoint requires a Biohub API key.
Create an API key and send it as a Bearer token in the
Authorization header.Choose a format
Add a lowercase suffix to the structure ID to choose the file format. Any other suffix, including.PDB, returns 400.
| Suffix | Response | Content type |
|---|---|---|
None or .pdb | Archived PDB file | chemical/x-pdb |
.cif | CIF converted from the PDB file | chemical/x-cif |
curl --fail-with-body \
-H "Authorization: Bearer $BIOHUB_API_KEY" \
-o MGYP000166900001.pdb \
"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/MGYP000166900001"
curl --fail-with-body \
-H "Authorization: Bearer $BIOHUB_API_KEY" \
-o MGYP000166900001.cif \
"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/MGYP000166900001.cif"
import os
import requests
structure_id = "MGYP000166900001"
response = requests.get(
f"https://biohub.ai/api/data/esm-atlas/v1/fetchPredictedStructure/{structure_id}",
headers={"Authorization": f"Bearer {os.environ['BIOHUB_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
with open(f"{structure_id}.pdb", "wb") as f:
f.write(response.content)
HEADER 01-FEB-23
TITLE ESMFOLD V1 PREDICTION FOR MGYP000166900001
...
ATOM 1 N MET A 1 2.861 4.850 26.782 1.00 0.97 N
ATOM 2 CA MET A 1 1.832 5.831 26.449 1.00 0.98 C
ATOM 3 C MET A 1 2.285 6.726 25.300 1.00 0.98 C
...
loop_
_ma_qa_metric_local.label_asym_id
_ma_qa_metric_local.label_comp_id
_ma_qa_metric_local.label_seq_id
_ma_qa_metric_local.metric_id
_ma_qa_metric_local.metric_value
_ma_qa_metric_local.model_id
_ma_qa_metric_local.ordinal_id
A ILE 2 2 94.75 1 2
A ALA 3 2 98.42857142857143 1 3
...
ATOM 1 N N MET A 1 1 2.861 4.850 26.782 1.00 97.0 1
ATOM 2 C CA MET A 1 1 1.832 5.831 26.449 1.00 98.0 1
...
{
"error": "Unauthorized. Provide a valid API key via Authorization: Bearer <key>",
"request_id": "51ab8198-42f4-4567-b6fe-3369046d45d4"
}
{
"detail": "Predicted structure not found for MGYP999999999999."
}
CIF output
The
.cif response reproduces the esmatlas.com conversion, including its known issues:- It has no
data_block header. - It averages each residue’s pLDDT without that residue’s first atom, except for the first residue.
- It shifts each residue’s pLDDT to the following residue and drops the last residue’s pLDDT.
- It prints pLDDT values with floating-point noise, such as
57.99999999999999. - It hardcodes chain, entity, and model identifiers.
Authorizations
Biohub API key from https://biohub.ai/developer-console/api-keys.
Path Parameters
Response
The predicted structure file. Content-Disposition names the file {id}.pdb or {id}.cif.
PDB file with pLDDT on a 0 to 1 scale in the B-factor column.