curl --request POST \
--url https://biohub.ai/api/v1/decode \
--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
]
]
},
"potential_sequence_of_concern": false
}
'import requests
url = "https://biohub.ai/api/v1/decode"
payload = {
"inputs": {
"sequence": [123],
"coordinates": [[[123]]],
"structure": [123],
"secondary_structure": [123],
"sasa": [123],
"function": [[123]],
"residue_annotation": [[123]]
},
"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]]
},
potential_sequence_of_concern: false
})
};
fetch('https://biohub.ai/api/v1/decode', 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/decode",
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
]
]
],
'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/decode"
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 \"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/decode")
.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 \"potential_sequence_of_concern\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/api/v1/decode")
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 \"potential_sequence_of_concern\": false\n}"
response = http.request(request)
puts response.read_body{
"model": "esm3-open-2024-03",
"created": "<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
]
]
},
"potential_sequence_of_concern": false,
"warning_messages": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}decode
(ESM3, ESMC) Decodes tokens sequence, structure, or function annotations
curl --request POST \
--url https://biohub.ai/api/v1/decode \
--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
]
]
},
"potential_sequence_of_concern": false
}
'import requests
url = "https://biohub.ai/api/v1/decode"
payload = {
"inputs": {
"sequence": [123],
"coordinates": [[[123]]],
"structure": [123],
"secondary_structure": [123],
"sasa": [123],
"function": [[123]],
"residue_annotation": [[123]]
},
"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]]
},
potential_sequence_of_concern: false
})
};
fetch('https://biohub.ai/api/v1/decode', 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/decode",
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
]
]
],
'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/decode"
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 \"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/decode")
.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 \"potential_sequence_of_concern\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://biohub.ai/api/v1/decode")
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 \"potential_sequence_of_concern\": false\n}"
response = http.request(request)
puts response.read_body{
"model": "esm3-open-2024-03",
"created": "<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
]
]
},
"potential_sequence_of_concern": false,
"warning_messages": [
"<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.
Headers
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
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
Show child attributes
Show child attributes
Indicate that the returned sequence may be of potential concerns.
Warning messages returned by FastAPI.