curl --request POST \
--url https://api.rafflesia.ai/v1/homology/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"database": "<string>",
"queries": [
{
"kind": "protein_sequence",
"sequence": "<string>"
}
],
"database_release_id": "<string>",
"filter": {
"filters": [
"<unknown>"
],
"op": "and",
"field": "<string>",
"filter": "<unknown>",
"value": "<string>",
"values": [
"<string>"
]
},
"guarantee": "approximate",
"include": [
"alignment"
],
"include_attributes": [
"record_id"
],
"limit": 25,
"max_billable_units": 2,
"significance": "if_available"
}
'import requests
url = "https://api.rafflesia.ai/v1/homology/batch"
payload = {
"database": "<string>",
"queries": [
{
"kind": "protein_sequence",
"sequence": "<string>"
}
],
"database_release_id": "<string>",
"filter": {
"filters": ["<unknown>"],
"op": "and",
"field": "<string>",
"filter": "<unknown>",
"value": "<string>",
"values": ["<string>"]
},
"guarantee": "approximate",
"include": ["alignment"],
"include_attributes": ["record_id"],
"limit": 25,
"max_billable_units": 2,
"significance": "if_available"
}
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({
database: '<string>',
queries: [{kind: 'protein_sequence', sequence: '<string>'}],
database_release_id: '<string>',
filter: {
filters: ['<unknown>'],
op: 'and',
field: '<string>',
filter: '<unknown>',
value: '<string>',
values: ['<string>']
},
guarantee: 'approximate',
include: ['alignment'],
include_attributes: ['record_id'],
limit: 25,
max_billable_units: 2,
significance: 'if_available'
})
};
fetch('https://api.rafflesia.ai/v1/homology/batch', 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://api.rafflesia.ai/v1/homology/batch",
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([
'database' => '<string>',
'queries' => [
[
'kind' => 'protein_sequence',
'sequence' => '<string>'
]
],
'database_release_id' => '<string>',
'filter' => [
'filters' => [
'<unknown>'
],
'op' => 'and',
'field' => '<string>',
'filter' => '<unknown>',
'value' => '<string>',
'values' => [
'<string>'
]
],
'guarantee' => 'approximate',
'include' => [
'alignment'
],
'include_attributes' => [
'record_id'
],
'limit' => 25,
'max_billable_units' => 2,
'significance' => 'if_available'
]),
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://api.rafflesia.ai/v1/homology/batch"
payload := strings.NewReader("{\n \"database\": \"<string>\",\n \"queries\": [\n {\n \"kind\": \"protein_sequence\",\n \"sequence\": \"<string>\"\n }\n ],\n \"database_release_id\": \"<string>\",\n \"filter\": {\n \"filters\": [\n \"<unknown>\"\n ],\n \"op\": \"and\",\n \"field\": \"<string>\",\n \"filter\": \"<unknown>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n },\n \"guarantee\": \"approximate\",\n \"include\": [\n \"alignment\"\n ],\n \"include_attributes\": [\n \"record_id\"\n ],\n \"limit\": 25,\n \"max_billable_units\": 2,\n \"significance\": \"if_available\"\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://api.rafflesia.ai/v1/homology/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"database\": \"<string>\",\n \"queries\": [\n {\n \"kind\": \"protein_sequence\",\n \"sequence\": \"<string>\"\n }\n ],\n \"database_release_id\": \"<string>\",\n \"filter\": {\n \"filters\": [\n \"<unknown>\"\n ],\n \"op\": \"and\",\n \"field\": \"<string>\",\n \"filter\": \"<unknown>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n },\n \"guarantee\": \"approximate\",\n \"include\": [\n \"alignment\"\n ],\n \"include_attributes\": [\n \"record_id\"\n ],\n \"limit\": 25,\n \"max_billable_units\": 2,\n \"significance\": \"if_available\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafflesia.ai/v1/homology/batch")
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 \"database\": \"<string>\",\n \"queries\": [\n {\n \"kind\": \"protein_sequence\",\n \"sequence\": \"<string>\"\n }\n ],\n \"database_release_id\": \"<string>\",\n \"filter\": {\n \"filters\": [\n \"<unknown>\"\n ],\n \"op\": \"and\",\n \"field\": \"<string>\",\n \"filter\": \"<unknown>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n },\n \"guarantee\": \"approximate\",\n \"include\": [\n \"alignment\"\n ],\n \"include_attributes\": [\n \"record_id\"\n ],\n \"limit\": 25,\n \"max_billable_units\": 2,\n \"significance\": \"if_available\"\n}"
response = http.request(request)
puts response.read_body{
"performance": {
"is_cache_hit": true,
"queue_wait_ms": 123,
"search_execution_ms": 123,
"server_total_ms": 123
},
"request_id": "<string>",
"responses": [
{
"database": {
"corpus_snapshot_id": "<string>",
"id": "<string>",
"release_id": "<string>",
"searched_residue_count": 1,
"searched_target_count": 1,
"slug": "<string>",
"canonical_filter_sha256": "<string>"
},
"is_result_limit_reached": true,
"method": {
"engine": "<string>",
"is_deterministic": true,
"is_exhaustive": true,
"search_policy_id": "<string>",
"semantic_profile_id": "<string>",
"calibration_id": "<string>",
"engine_release": "<string>"
},
"query": {
"kind": "protein_sequence",
"normalization_id": "<string>",
"normalized_length": 123,
"sha256": "<string>"
},
"query_index": 1,
"result_sha256": "<string>",
"results": [
{
"maxsim": {
"bidirectional": 123,
"query_to_target": 123,
"target_to_query": 123
},
"rank": 123,
"target": {
"id": "<string>",
"attributes": {}
},
"affine": {
"normalized_score": 123,
"raw_score": 123
},
"alignment": {
"aligned_residue_count": 123,
"cigar": "<string>",
"cigar_dialect": "<string>",
"coordinate_system": "<string>",
"gap_opening_count": 123,
"gap_residue_count": 123,
"identical_residue_count": 123,
"query_coverage_ratio": 123,
"query_end": 123,
"query_length": 123,
"query_start": 123,
"target_coverage_ratio": 123,
"target_end": 123,
"target_length": 123,
"target_start": 123
},
"significance": {
"calibration_id": "<string>",
"calibration_sample_count": 123,
"calibration_bin": "<string>",
"expected_false_hits": 123,
"family_wise_exceedance_probability": 123,
"minimum_resolvable_probability": 123,
"pair_tail_probability": 123,
"q_value": 123
}
}
],
"usage": {
"logical_bytes_returned": 1,
"billable_units": 1,
"logical_bytes_read": 1
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"details": {}
}
]
}
],
"result_sha256": "<string>",
"usage": {
"logical_bytes_returned": 1,
"billable_units": 1,
"logical_bytes_read": 1
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"details": {}
}
]
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}Runs 1 to 16 ordered typed protein queries with shared search controls. The operation is bounded, synchronous, and all-or-nothing: it returns completed results in query order or one error for the complete batch.
curl --request POST \
--url https://api.rafflesia.ai/v1/homology/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"database": "<string>",
"queries": [
{
"kind": "protein_sequence",
"sequence": "<string>"
}
],
"database_release_id": "<string>",
"filter": {
"filters": [
"<unknown>"
],
"op": "and",
"field": "<string>",
"filter": "<unknown>",
"value": "<string>",
"values": [
"<string>"
]
},
"guarantee": "approximate",
"include": [
"alignment"
],
"include_attributes": [
"record_id"
],
"limit": 25,
"max_billable_units": 2,
"significance": "if_available"
}
'import requests
url = "https://api.rafflesia.ai/v1/homology/batch"
payload = {
"database": "<string>",
"queries": [
{
"kind": "protein_sequence",
"sequence": "<string>"
}
],
"database_release_id": "<string>",
"filter": {
"filters": ["<unknown>"],
"op": "and",
"field": "<string>",
"filter": "<unknown>",
"value": "<string>",
"values": ["<string>"]
},
"guarantee": "approximate",
"include": ["alignment"],
"include_attributes": ["record_id"],
"limit": 25,
"max_billable_units": 2,
"significance": "if_available"
}
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({
database: '<string>',
queries: [{kind: 'protein_sequence', sequence: '<string>'}],
database_release_id: '<string>',
filter: {
filters: ['<unknown>'],
op: 'and',
field: '<string>',
filter: '<unknown>',
value: '<string>',
values: ['<string>']
},
guarantee: 'approximate',
include: ['alignment'],
include_attributes: ['record_id'],
limit: 25,
max_billable_units: 2,
significance: 'if_available'
})
};
fetch('https://api.rafflesia.ai/v1/homology/batch', 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://api.rafflesia.ai/v1/homology/batch",
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([
'database' => '<string>',
'queries' => [
[
'kind' => 'protein_sequence',
'sequence' => '<string>'
]
],
'database_release_id' => '<string>',
'filter' => [
'filters' => [
'<unknown>'
],
'op' => 'and',
'field' => '<string>',
'filter' => '<unknown>',
'value' => '<string>',
'values' => [
'<string>'
]
],
'guarantee' => 'approximate',
'include' => [
'alignment'
],
'include_attributes' => [
'record_id'
],
'limit' => 25,
'max_billable_units' => 2,
'significance' => 'if_available'
]),
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://api.rafflesia.ai/v1/homology/batch"
payload := strings.NewReader("{\n \"database\": \"<string>\",\n \"queries\": [\n {\n \"kind\": \"protein_sequence\",\n \"sequence\": \"<string>\"\n }\n ],\n \"database_release_id\": \"<string>\",\n \"filter\": {\n \"filters\": [\n \"<unknown>\"\n ],\n \"op\": \"and\",\n \"field\": \"<string>\",\n \"filter\": \"<unknown>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n },\n \"guarantee\": \"approximate\",\n \"include\": [\n \"alignment\"\n ],\n \"include_attributes\": [\n \"record_id\"\n ],\n \"limit\": 25,\n \"max_billable_units\": 2,\n \"significance\": \"if_available\"\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://api.rafflesia.ai/v1/homology/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"database\": \"<string>\",\n \"queries\": [\n {\n \"kind\": \"protein_sequence\",\n \"sequence\": \"<string>\"\n }\n ],\n \"database_release_id\": \"<string>\",\n \"filter\": {\n \"filters\": [\n \"<unknown>\"\n ],\n \"op\": \"and\",\n \"field\": \"<string>\",\n \"filter\": \"<unknown>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n },\n \"guarantee\": \"approximate\",\n \"include\": [\n \"alignment\"\n ],\n \"include_attributes\": [\n \"record_id\"\n ],\n \"limit\": 25,\n \"max_billable_units\": 2,\n \"significance\": \"if_available\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafflesia.ai/v1/homology/batch")
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 \"database\": \"<string>\",\n \"queries\": [\n {\n \"kind\": \"protein_sequence\",\n \"sequence\": \"<string>\"\n }\n ],\n \"database_release_id\": \"<string>\",\n \"filter\": {\n \"filters\": [\n \"<unknown>\"\n ],\n \"op\": \"and\",\n \"field\": \"<string>\",\n \"filter\": \"<unknown>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n },\n \"guarantee\": \"approximate\",\n \"include\": [\n \"alignment\"\n ],\n \"include_attributes\": [\n \"record_id\"\n ],\n \"limit\": 25,\n \"max_billable_units\": 2,\n \"significance\": \"if_available\"\n}"
response = http.request(request)
puts response.read_body{
"performance": {
"is_cache_hit": true,
"queue_wait_ms": 123,
"search_execution_ms": 123,
"server_total_ms": 123
},
"request_id": "<string>",
"responses": [
{
"database": {
"corpus_snapshot_id": "<string>",
"id": "<string>",
"release_id": "<string>",
"searched_residue_count": 1,
"searched_target_count": 1,
"slug": "<string>",
"canonical_filter_sha256": "<string>"
},
"is_result_limit_reached": true,
"method": {
"engine": "<string>",
"is_deterministic": true,
"is_exhaustive": true,
"search_policy_id": "<string>",
"semantic_profile_id": "<string>",
"calibration_id": "<string>",
"engine_release": "<string>"
},
"query": {
"kind": "protein_sequence",
"normalization_id": "<string>",
"normalized_length": 123,
"sha256": "<string>"
},
"query_index": 1,
"result_sha256": "<string>",
"results": [
{
"maxsim": {
"bidirectional": 123,
"query_to_target": 123,
"target_to_query": 123
},
"rank": 123,
"target": {
"id": "<string>",
"attributes": {}
},
"affine": {
"normalized_score": 123,
"raw_score": 123
},
"alignment": {
"aligned_residue_count": 123,
"cigar": "<string>",
"cigar_dialect": "<string>",
"coordinate_system": "<string>",
"gap_opening_count": 123,
"gap_residue_count": 123,
"identical_residue_count": 123,
"query_coverage_ratio": 123,
"query_end": 123,
"query_length": 123,
"query_start": 123,
"target_coverage_ratio": 123,
"target_end": 123,
"target_length": 123,
"target_start": 123
},
"significance": {
"calibration_id": "<string>",
"calibration_sample_count": 123,
"calibration_bin": "<string>",
"expected_false_hits": 123,
"family_wise_exceedance_probability": 123,
"minimum_resolvable_probability": 123,
"pair_tail_probability": 123,
"q_value": 123
}
}
],
"usage": {
"logical_bytes_returned": 1,
"billable_units": 1,
"logical_bytes_read": 1
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"details": {}
}
]
}
],
"result_sha256": "<string>",
"usage": {
"logical_bytes_returned": 1,
"billable_units": 1,
"logical_bytes_read": 1
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"details": {}
}
]
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"doc_url": "<string>",
"message": "<string>",
"request_id": "<string>",
"details": {},
"param": "<string>"
}
}Authorizations
A Rafflesia API key, sent as Authorization: Bearer <key>.
Headers
Optional retry identity for the complete all-or-nothing batch. Reuse the same key only with the same request.
Body
- Option 1
- Option 2
Database id or slug from homology.databases.list. Exactly one of database or database_release_id is required.
1 - 256An ordered batch of 1 to 16 typed biological queries sharing every search control.
1 - 16 elementsShow child attributes
Show child attributes
Exact immutable release id. Exactly one of database or database_release_id is required.
1 - 256Optional exact metadata predicate applied before candidate generation.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
Show child attributes
Show child attributes
Minimum search guarantee. Approximate permits a qualified approximate policy or a stronger exhaustive fallback; exhaustive requires the release's exhaustive reference policy.
approximate, exhaustive Scientific result representations to return. Pairwise alignment is included by default. Pass an empty array for candidate measurements only.
1alignment Optional target attributes to project. The current Tomato catalog can project record_id; unsupported attributes are rejected instead of fabricated.
1record_id Maximum number of ranked results to return per query. queries count multiplied by limit must fit the include-sensitive aggregate batch cap.
1 <= x <= 10000Optional hard ceiling on deterministic billable work across the complete batch. The batch fails before exceeding it.
x >= 1Whether database-aware significance is omitted, included when a compatible calibration exists, or required for the request to succeed.
not_requested, if_available, required Response
OK