curl --request POST \
--url https://biohub.ai/api/v1/logits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {
"sequence": [
123
],
"coordinates": [
[
[
123
]
]
],
"structure": [
123
],
"secondary_structure": [
123
],
"sasa": [
123
],
"function": [
[
123
]
],
"residue_annotation": [
[
123
]
]
},
"logits_config": {
"sequence": false,
"structure": false,
"secondary_structure": false,
"sasa": false,
"function": false,
"residue_annotations": false,
"return_embeddings": false,
"return_mean_embedding": false,
"return_hidden_states": false,
"return_mean_hidden_states": false,
"ith_hidden_layer": -1,
"sae_config": {
"models": [],
"normalize_features": true
}
},
"potential_sequence_of_concern": false
}
'import requests
url = "https://biohub.ai/api/v1/logits"
payload = {
"inputs": {
"sequence": [123],
"coordinates": [[[123]]],
"structure": [123],
"secondary_structure": [123],
"sasa": [123],
"function": [[123]],
"residue_annotation": [[123]]
},
"logits_config": {
"sequence": False,
"structure": False,
"secondary_structure": False,
"sasa": False,
"function": False,
"residue_annotations": False,
"return_embeddings": False,
"return_mean_embedding": False,
"return_hidden_states": False,
"return_mean_hidden_states": False,
"ith_hidden_layer": -1,
"sae_config": {
"models": [],
"normalize_features": True
}
},
"potential_sequence_of_concern": 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({
inputs: {
sequence: [123],
coordinates: [[[123]]],
structure: [123],
secondary_structure: [123],
sasa: [123],
function: [[123]],
residue_annotation: [[123]]
},
logits_config: {
sequence: false,
structure: false,
secondary_structure: false,
sasa: false,
function: false,
residue_annotations: false,
return_embeddings: false,
return_mean_embedding: false,
return_hidden_states: false,
return_mean_hidden_states: false,
ith_hidden_layer: -1,
sae_config: {models: [], normalize_features: true}
},
potential_sequence_of_concern: false
})
};
fetch('https://biohub.ai/api/v1/logits', 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/logits",
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([
'inputs' => [
'sequence' => [
123
],
'coordinates' => [
[
[
123
]
]
],
'structure' => [
123
],
'secondary_structure' => [
123
],
'sasa' => [
123
],
'function' => [
[
123
]
],
'residue_annotation' => [
[
123
]
]
],
'logits_config' => [
'sequence' => false,
'structure' => false,
'secondary_structure' => false,
'sasa' => false,
'function' => false,
'residue_annotations' => false,
'return_embeddings' => false,
'return_mean_embedding' => false,
'return_hidden_states' => false,
'return_mean_hidden_states' => false,
'ith_hidden_layer' => -1,
'sae_config' => [
'models' => [
],
'normalize_features' => true
]
],
'potential_sequence_of_concern' => 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/logits"
payload := strings.NewReader("{\n \"inputs\": {\n \"sequence\": [\n 123\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"structure\": [\n 123\n ],\n \"secondary_structure\": [\n 123\n ],\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n 123\n ]\n ],\n \"residue_annotation\": [\n [\n 123\n ]\n ]\n },\n \"logits_config\": {\n \"sequence\": false,\n \"structure\": false,\n \"secondary_structure\": false,\n \"sasa\": false,\n \"function\": false,\n \"residue_annotations\": false,\n \"return_embeddings\": false,\n \"return_mean_embedding\": false,\n \"return_hidden_states\": false,\n \"return_mean_hidden_states\": false,\n \"ith_hidden_layer\": -1,\n \"sae_config\": {\n \"models\": [],\n \"normalize_features\": true\n }\n },\n \"potential_sequence_of_concern\": 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/logits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {\n \"sequence\": [\n 123\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"structure\": [\n 123\n ],\n \"secondary_structure\": [\n 123\n ],\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n 123\n ]\n ],\n \"residue_annotation\": [\n [\n 123\n ]\n ]\n },\n \"logits_config\": {\n \"sequence\": false,\n \"structure\": false,\n \"secondary_structure\": false,\n \"sasa\": false,\n \"function\": false,\n \"residue_annotations\": false,\n \"return_embeddings\": false,\n \"return_mean_embedding\": false,\n \"return_hidden_states\": false,\n \"return_mean_hidden_states\": false,\n \"ith_hidden_layer\": -1,\n \"sae_config\": {\n \"models\": [],\n \"normalize_features\": true\n }\n },\n \"potential_sequence_of_concern\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/api/v1/logits")
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 \"inputs\": {\n \"sequence\": [\n 123\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"structure\": [\n 123\n ],\n \"secondary_structure\": [\n 123\n ],\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n 123\n ]\n ],\n \"residue_annotation\": [\n [\n 123\n ]\n ]\n },\n \"logits_config\": {\n \"sequence\": false,\n \"structure\": false,\n \"secondary_structure\": false,\n \"sasa\": false,\n \"function\": false,\n \"residue_annotations\": false,\n \"return_embeddings\": false,\n \"return_mean_embedding\": false,\n \"return_hidden_states\": false,\n \"return_mean_hidden_states\": false,\n \"ith_hidden_layer\": -1,\n \"sae_config\": {\n \"models\": [],\n \"normalize_features\": true\n }\n },\n \"potential_sequence_of_concern\": 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>"
],
"logits": "<string>",
"embeddings": "<string>",
"mean_embedding": [
"<unknown>"
],
"hidden_states": "<string>",
"mean_hidden_state": [
"<unknown>"
],
"sae_outputs": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}logits
(ESM3, ESMC) Performs one inference step and returns logits, embeddings, and SAE features (ESMC only).
curl --request POST \
--url https://biohub.ai/api/v1/logits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": {
"sequence": [
123
],
"coordinates": [
[
[
123
]
]
],
"structure": [
123
],
"secondary_structure": [
123
],
"sasa": [
123
],
"function": [
[
123
]
],
"residue_annotation": [
[
123
]
]
},
"logits_config": {
"sequence": false,
"structure": false,
"secondary_structure": false,
"sasa": false,
"function": false,
"residue_annotations": false,
"return_embeddings": false,
"return_mean_embedding": false,
"return_hidden_states": false,
"return_mean_hidden_states": false,
"ith_hidden_layer": -1,
"sae_config": {
"models": [],
"normalize_features": true
}
},
"potential_sequence_of_concern": false
}
'import requests
url = "https://biohub.ai/api/v1/logits"
payload = {
"inputs": {
"sequence": [123],
"coordinates": [[[123]]],
"structure": [123],
"secondary_structure": [123],
"sasa": [123],
"function": [[123]],
"residue_annotation": [[123]]
},
"logits_config": {
"sequence": False,
"structure": False,
"secondary_structure": False,
"sasa": False,
"function": False,
"residue_annotations": False,
"return_embeddings": False,
"return_mean_embedding": False,
"return_hidden_states": False,
"return_mean_hidden_states": False,
"ith_hidden_layer": -1,
"sae_config": {
"models": [],
"normalize_features": True
}
},
"potential_sequence_of_concern": 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({
inputs: {
sequence: [123],
coordinates: [[[123]]],
structure: [123],
secondary_structure: [123],
sasa: [123],
function: [[123]],
residue_annotation: [[123]]
},
logits_config: {
sequence: false,
structure: false,
secondary_structure: false,
sasa: false,
function: false,
residue_annotations: false,
return_embeddings: false,
return_mean_embedding: false,
return_hidden_states: false,
return_mean_hidden_states: false,
ith_hidden_layer: -1,
sae_config: {models: [], normalize_features: true}
},
potential_sequence_of_concern: false
})
};
fetch('https://biohub.ai/api/v1/logits', 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/logits",
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([
'inputs' => [
'sequence' => [
123
],
'coordinates' => [
[
[
123
]
]
],
'structure' => [
123
],
'secondary_structure' => [
123
],
'sasa' => [
123
],
'function' => [
[
123
]
],
'residue_annotation' => [
[
123
]
]
],
'logits_config' => [
'sequence' => false,
'structure' => false,
'secondary_structure' => false,
'sasa' => false,
'function' => false,
'residue_annotations' => false,
'return_embeddings' => false,
'return_mean_embedding' => false,
'return_hidden_states' => false,
'return_mean_hidden_states' => false,
'ith_hidden_layer' => -1,
'sae_config' => [
'models' => [
],
'normalize_features' => true
]
],
'potential_sequence_of_concern' => 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/logits"
payload := strings.NewReader("{\n \"inputs\": {\n \"sequence\": [\n 123\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"structure\": [\n 123\n ],\n \"secondary_structure\": [\n 123\n ],\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n 123\n ]\n ],\n \"residue_annotation\": [\n [\n 123\n ]\n ]\n },\n \"logits_config\": {\n \"sequence\": false,\n \"structure\": false,\n \"secondary_structure\": false,\n \"sasa\": false,\n \"function\": false,\n \"residue_annotations\": false,\n \"return_embeddings\": false,\n \"return_mean_embedding\": false,\n \"return_hidden_states\": false,\n \"return_mean_hidden_states\": false,\n \"ith_hidden_layer\": -1,\n \"sae_config\": {\n \"models\": [],\n \"normalize_features\": true\n }\n },\n \"potential_sequence_of_concern\": 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/logits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {\n \"sequence\": [\n 123\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"structure\": [\n 123\n ],\n \"secondary_structure\": [\n 123\n ],\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n 123\n ]\n ],\n \"residue_annotation\": [\n [\n 123\n ]\n ]\n },\n \"logits_config\": {\n \"sequence\": false,\n \"structure\": false,\n \"secondary_structure\": false,\n \"sasa\": false,\n \"function\": false,\n \"residue_annotations\": false,\n \"return_embeddings\": false,\n \"return_mean_embedding\": false,\n \"return_hidden_states\": false,\n \"return_mean_hidden_states\": false,\n \"ith_hidden_layer\": -1,\n \"sae_config\": {\n \"models\": [],\n \"normalize_features\": true\n }\n },\n \"potential_sequence_of_concern\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/api/v1/logits")
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 \"inputs\": {\n \"sequence\": [\n 123\n ],\n \"coordinates\": [\n [\n [\n 123\n ]\n ]\n ],\n \"structure\": [\n 123\n ],\n \"secondary_structure\": [\n 123\n ],\n \"sasa\": [\n 123\n ],\n \"function\": [\n [\n 123\n ]\n ],\n \"residue_annotation\": [\n [\n 123\n ]\n ]\n },\n \"logits_config\": {\n \"sequence\": false,\n \"structure\": false,\n \"secondary_structure\": false,\n \"sasa\": false,\n \"function\": false,\n \"residue_annotations\": false,\n \"return_embeddings\": false,\n \"return_mean_embedding\": false,\n \"return_hidden_states\": false,\n \"return_mean_hidden_states\": false,\n \"ith_hidden_layer\": -1,\n \"sae_config\": {\n \"models\": [],\n \"normalize_features\": true\n }\n },\n \"potential_sequence_of_concern\": 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>"
],
"logits": "<string>",
"embeddings": "<string>",
"mean_embedding": [
"<unknown>"
],
"hidden_states": "<string>",
"mean_hidden_state": [
"<unknown>"
],
"sae_outputs": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
You may have access to additional, private models as well. These will be visible on the Rate Limits page under the Developer Console
esm3-open-2024-03, esmc-300m-2024-12, esmc-600m-2024-12, esmc-6b-2024-12 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Disclose potential sequences of concern. For approved users, such sequences will not go through additional safety filtering. Reach out if you are interested in using this.
Response
Successful Response
You may have access to additional, private models as well. These will be visible on the Rate Limits page under the Developer Console
esm3-open-2024-03, esmc-300m-2024-12, esmc-600m-2024-12, esmc-6b-2024-12 ISO formatted date time
Indicate that the returned sequence may be of potential concerns.
Warning messages returned by FastAPI.