(ESM3) Generates an output track conditioned on inputs
curl --request POST \
--url https://biohub.ai/api/v1/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "esm3-open-2024-03",
"track": "<string>",
"inputs": {
"sequence": "<string>",
"secondary_structure": "<string>",
"sasa": [
123
],
"function": [
[
"<string>",
123,
123
]
],
"coordinates": [
[
[
123
]
]
],
"plddt": [
123
],
"ptm": 123,
"crmsd": 123,
"globularity": 123,
"interface": [
"<string>"
],
"interface_ptm": 123,
"pae": [
[
123
]
]
},
"potential_sequence_of_concern": false,
"invalid_ids": [],
"schedule": "cosine",
"strategy": "random",
"num_steps": 20,
"temperature": 0.5,
"temperature_annealing": true,
"top_p": 1,
"condition_on_coordinates_only": true,
"only_compute_backbone_rmsd": false,
"include_pae": false
}
'import requests
url = "https://biohub.ai/api/v1/generate"
payload = {
"model": "esm3-open-2024-03",
"track": "<string>",
"inputs": {
"sequence": "<string>",
"secondary_structure": "<string>",
"sasa": [123],
"function": [["<string>", 123, 123]],
"coordinates": [[[123]]],
"plddt": [123],
"ptm": 123,
"crmsd": 123,
"globularity": 123,
"interface": ["<string>"],
"interface_ptm": 123,
"pae": [[123]]
},
"potential_sequence_of_concern": False,
"invalid_ids": [],
"schedule": "cosine",
"strategy": "random",
"num_steps": 20,
"temperature": 0.5,
"temperature_annealing": True,
"top_p": 1,
"condition_on_coordinates_only": True,
"only_compute_backbone_rmsd": False,
"include_pae": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'esm3-open-2024-03',
track: '<string>',
inputs: {
sequence: '<string>',
secondary_structure: '<string>',
sasa: [123],
function: [['<string>', 123, 123]],
coordinates: [[[123]]],
plddt: [123],
ptm: 123,
crmsd: 123,
globularity: 123,
interface: ['<string>'],
interface_ptm: 123,
pae: [[123]]
},
potential_sequence_of_concern: false,
invalid_ids: [],
schedule: 'cosine',
strategy: 'random',
num_steps: 20,
temperature: 0.5,
temperature_annealing: true,
top_p: 1,
condition_on_coordinates_only: true,
only_compute_backbone_rmsd: false,
include_pae: false
})
};
fetch('https://biohub.ai/api/v1/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://biohub.ai/api/v1/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'esm3-open-2024-03',
'track' => '<string>',
'inputs' => [
'sequence' => '<string>',
'secondary_structure' => '<string>',
'sasa' => [
123
],
'function' => [
[
'<string>',
123,
123
]
],
'coordinates' => [
[
[
123
]
]
],
'plddt' => [
123
],
'ptm' => 123,
'crmsd' => 123,
'globularity' => 123,
'interface' => [
'<string>'
],
'interface_ptm' => 123,
'pae' => [
[
123
]
]
],
'potential_sequence_of_concern' => false,
'invalid_ids' => [
],
'schedule' => 'cosine',
'strategy' => 'random',
'num_steps' => 20,
'temperature' => 0.5,
'temperature_annealing' => true,
'top_p' => 1,
'condition_on_coordinates_only' => true,
'only_compute_backbone_rmsd' => false,
'include_pae' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://biohub.ai/api/v1/generate"
payload := strings.NewReader("{\n \"model\": \"esm3-open-2024-03\",\n \"track\": \"<string>\",\n \"inputs\": {\n \"sequence\": \"<string>\",\n \"secondary_structure\": \"<string>\",\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n \"<string>\",\n 123,\n 123\n ]\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"plddt\": [\n 123\n ],\n \"ptm\": 123,\n \"crmsd\": 123,\n \"globularity\": 123,\n \"interface\": [\n \"<string>\"\n ],\n \"interface_ptm\": 123,\n \"pae\": [\n [\n 123\n ]\n ]\n },\n \"potential_sequence_of_concern\": false,\n \"invalid_ids\": [],\n \"schedule\": \"cosine\",\n \"strategy\": \"random\",\n \"num_steps\": 20,\n \"temperature\": 0.5,\n \"temperature_annealing\": true,\n \"top_p\": 1,\n \"condition_on_coordinates_only\": true,\n \"only_compute_backbone_rmsd\": false,\n \"include_pae\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://biohub.ai/api/v1/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"esm3-open-2024-03\",\n \"track\": \"<string>\",\n \"inputs\": {\n \"sequence\": \"<string>\",\n \"secondary_structure\": \"<string>\",\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n \"<string>\",\n 123,\n 123\n ]\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"plddt\": [\n 123\n ],\n \"ptm\": 123,\n \"crmsd\": 123,\n \"globularity\": 123,\n \"interface\": [\n \"<string>\"\n ],\n \"interface_ptm\": 123,\n \"pae\": [\n [\n 123\n ]\n ]\n },\n \"potential_sequence_of_concern\": false,\n \"invalid_ids\": [],\n \"schedule\": \"cosine\",\n \"strategy\": \"random\",\n \"num_steps\": 20,\n \"temperature\": 0.5,\n \"temperature_annealing\": true,\n \"top_p\": 1,\n \"condition_on_coordinates_only\": true,\n \"only_compute_backbone_rmsd\": false,\n \"include_pae\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/api/v1/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"esm3-open-2024-03\",\n \"track\": \"<string>\",\n \"inputs\": {\n \"sequence\": \"<string>\",\n \"secondary_structure\": \"<string>\",\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n \"<string>\",\n 123,\n 123\n ]\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"plddt\": [\n 123\n ],\n \"ptm\": 123,\n \"crmsd\": 123,\n \"globularity\": 123,\n \"interface\": [\n \"<string>\"\n ],\n \"interface_ptm\": 123,\n \"pae\": [\n [\n 123\n ]\n ]\n },\n \"potential_sequence_of_concern\": false,\n \"invalid_ids\": [],\n \"schedule\": \"cosine\",\n \"strategy\": \"random\",\n \"num_steps\": 20,\n \"temperature\": 0.5,\n \"temperature_annealing\": true,\n \"top_p\": 1,\n \"condition_on_coordinates_only\": true,\n \"only_compute_backbone_rmsd\": false,\n \"include_pae\": false\n}"
response = http.request(request)
puts response.read_body{
"model": "esm3-open-2024-03",
"created": "<string>",
"potential_sequence_of_concern": false,
"warning_messages": [
"<string>"
],
"outputs": {
"sequence": "<string>",
"secondary_structure": "<string>",
"sasa": [
123
],
"function": [
[
"<string>",
123,
123
]
],
"coordinates": [
[
[
123
]
]
],
"plddt": [
123
],
"ptm": 123,
"crmsd": 123,
"globularity": 123,
"interface": [
"<string>"
],
"interface_ptm": 123,
"pae": [
[
123
]
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Protein Models
generate
(ESM3) Generates an output track conditioned on inputs
POST
/
api
/
v1
/
generate
(ESM3) Generates an output track conditioned on inputs
curl --request POST \
--url https://biohub.ai/api/v1/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "esm3-open-2024-03",
"track": "<string>",
"inputs": {
"sequence": "<string>",
"secondary_structure": "<string>",
"sasa": [
123
],
"function": [
[
"<string>",
123,
123
]
],
"coordinates": [
[
[
123
]
]
],
"plddt": [
123
],
"ptm": 123,
"crmsd": 123,
"globularity": 123,
"interface": [
"<string>"
],
"interface_ptm": 123,
"pae": [
[
123
]
]
},
"potential_sequence_of_concern": false,
"invalid_ids": [],
"schedule": "cosine",
"strategy": "random",
"num_steps": 20,
"temperature": 0.5,
"temperature_annealing": true,
"top_p": 1,
"condition_on_coordinates_only": true,
"only_compute_backbone_rmsd": false,
"include_pae": false
}
'import requests
url = "https://biohub.ai/api/v1/generate"
payload = {
"model": "esm3-open-2024-03",
"track": "<string>",
"inputs": {
"sequence": "<string>",
"secondary_structure": "<string>",
"sasa": [123],
"function": [["<string>", 123, 123]],
"coordinates": [[[123]]],
"plddt": [123],
"ptm": 123,
"crmsd": 123,
"globularity": 123,
"interface": ["<string>"],
"interface_ptm": 123,
"pae": [[123]]
},
"potential_sequence_of_concern": False,
"invalid_ids": [],
"schedule": "cosine",
"strategy": "random",
"num_steps": 20,
"temperature": 0.5,
"temperature_annealing": True,
"top_p": 1,
"condition_on_coordinates_only": True,
"only_compute_backbone_rmsd": False,
"include_pae": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'esm3-open-2024-03',
track: '<string>',
inputs: {
sequence: '<string>',
secondary_structure: '<string>',
sasa: [123],
function: [['<string>', 123, 123]],
coordinates: [[[123]]],
plddt: [123],
ptm: 123,
crmsd: 123,
globularity: 123,
interface: ['<string>'],
interface_ptm: 123,
pae: [[123]]
},
potential_sequence_of_concern: false,
invalid_ids: [],
schedule: 'cosine',
strategy: 'random',
num_steps: 20,
temperature: 0.5,
temperature_annealing: true,
top_p: 1,
condition_on_coordinates_only: true,
only_compute_backbone_rmsd: false,
include_pae: false
})
};
fetch('https://biohub.ai/api/v1/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://biohub.ai/api/v1/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'esm3-open-2024-03',
'track' => '<string>',
'inputs' => [
'sequence' => '<string>',
'secondary_structure' => '<string>',
'sasa' => [
123
],
'function' => [
[
'<string>',
123,
123
]
],
'coordinates' => [
[
[
123
]
]
],
'plddt' => [
123
],
'ptm' => 123,
'crmsd' => 123,
'globularity' => 123,
'interface' => [
'<string>'
],
'interface_ptm' => 123,
'pae' => [
[
123
]
]
],
'potential_sequence_of_concern' => false,
'invalid_ids' => [
],
'schedule' => 'cosine',
'strategy' => 'random',
'num_steps' => 20,
'temperature' => 0.5,
'temperature_annealing' => true,
'top_p' => 1,
'condition_on_coordinates_only' => true,
'only_compute_backbone_rmsd' => false,
'include_pae' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://biohub.ai/api/v1/generate"
payload := strings.NewReader("{\n \"model\": \"esm3-open-2024-03\",\n \"track\": \"<string>\",\n \"inputs\": {\n \"sequence\": \"<string>\",\n \"secondary_structure\": \"<string>\",\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n \"<string>\",\n 123,\n 123\n ]\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"plddt\": [\n 123\n ],\n \"ptm\": 123,\n \"crmsd\": 123,\n \"globularity\": 123,\n \"interface\": [\n \"<string>\"\n ],\n \"interface_ptm\": 123,\n \"pae\": [\n [\n 123\n ]\n ]\n },\n \"potential_sequence_of_concern\": false,\n \"invalid_ids\": [],\n \"schedule\": \"cosine\",\n \"strategy\": \"random\",\n \"num_steps\": 20,\n \"temperature\": 0.5,\n \"temperature_annealing\": true,\n \"top_p\": 1,\n \"condition_on_coordinates_only\": true,\n \"only_compute_backbone_rmsd\": false,\n \"include_pae\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://biohub.ai/api/v1/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"esm3-open-2024-03\",\n \"track\": \"<string>\",\n \"inputs\": {\n \"sequence\": \"<string>\",\n \"secondary_structure\": \"<string>\",\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n \"<string>\",\n 123,\n 123\n ]\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"plddt\": [\n 123\n ],\n \"ptm\": 123,\n \"crmsd\": 123,\n \"globularity\": 123,\n \"interface\": [\n \"<string>\"\n ],\n \"interface_ptm\": 123,\n \"pae\": [\n [\n 123\n ]\n ]\n },\n \"potential_sequence_of_concern\": false,\n \"invalid_ids\": [],\n \"schedule\": \"cosine\",\n \"strategy\": \"random\",\n \"num_steps\": 20,\n \"temperature\": 0.5,\n \"temperature_annealing\": true,\n \"top_p\": 1,\n \"condition_on_coordinates_only\": true,\n \"only_compute_backbone_rmsd\": false,\n \"include_pae\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/api/v1/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"esm3-open-2024-03\",\n \"track\": \"<string>\",\n \"inputs\": {\n \"sequence\": \"<string>\",\n \"secondary_structure\": \"<string>\",\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n \"<string>\",\n 123,\n 123\n ]\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"plddt\": [\n 123\n ],\n \"ptm\": 123,\n \"crmsd\": 123,\n \"globularity\": 123,\n \"interface\": [\n \"<string>\"\n ],\n \"interface_ptm\": 123,\n \"pae\": [\n [\n 123\n ]\n ]\n },\n \"potential_sequence_of_concern\": false,\n \"invalid_ids\": [],\n \"schedule\": \"cosine\",\n \"strategy\": \"random\",\n \"num_steps\": 20,\n \"temperature\": 0.5,\n \"temperature_annealing\": true,\n \"top_p\": 1,\n \"condition_on_coordinates_only\": true,\n \"only_compute_backbone_rmsd\": false,\n \"include_pae\": false\n}"
response = http.request(request)
puts response.read_body{
"model": "esm3-open-2024-03",
"created": "<string>",
"potential_sequence_of_concern": false,
"warning_messages": [
"<string>"
],
"outputs": {
"sequence": "<string>",
"secondary_structure": "<string>",
"sasa": [
123
],
"function": [
[
"<string>",
123,
123
]
],
"coordinates": [
[
[
123
]
]
],
"plddt": [
123
],
"ptm": 123,
"crmsd": 123,
"globularity": 123,
"interface": [
"<string>"
],
"interface_ptm": 123,
"pae": [
[
123
]
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
Unmasking strategy to use. Controls which tokens to unmask during each round of iterative generation. 'random' will unmask a correct number of tokens randomly. 'entropy' will unmask the tokens with the lowest logit entropy first. Default was random. Updated on 02/14/2025.
Available options:
random, entropy Response
Successful Response