curl --request POST \
--url https://api.example.com/v1/antigens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Extracellular domain, UniProt P04626 residues 23-652",
"name": "HER2 ECD",
"project_id": "7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f",
"sequence": "TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV..."
}
'import requests
url = "https://api.example.com/v1/antigens"
payload = {
"description": "Extracellular domain, UniProt P04626 residues 23-652",
"name": "HER2 ECD",
"project_id": "7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f",
"sequence": "TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV..."
}
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({
description: 'Extracellular domain, UniProt P04626 residues 23-652',
name: 'HER2 ECD',
project_id: '7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f',
sequence: 'TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...'
})
};
fetch('https://api.example.com/v1/antigens', 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.example.com/v1/antigens",
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([
'description' => 'Extracellular domain, UniProt P04626 residues 23-652',
'name' => 'HER2 ECD',
'project_id' => '7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f',
'sequence' => 'TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...'
]),
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.example.com/v1/antigens"
payload := strings.NewReader("{\n \"description\": \"Extracellular domain, UniProt P04626 residues 23-652\",\n \"name\": \"HER2 ECD\",\n \"project_id\": \"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f\",\n \"sequence\": \"TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...\"\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.example.com/v1/antigens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Extracellular domain, UniProt P04626 residues 23-652\",\n \"name\": \"HER2 ECD\",\n \"project_id\": \"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f\",\n \"sequence\": \"TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/antigens")
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 \"description\": \"Extracellular domain, UniProt P04626 residues 23-652\",\n \"name\": \"HER2 ECD\",\n \"project_id\": \"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f\",\n \"sequence\": \"TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-04-23T14:15:00+00:00",
"description": "Extracellular domain, UniProt P04626 residues 23-652",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "HER2 ECD",
"object": "antigen",
"project_id": "7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f",
"sequence": "TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV..."
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}Register a new antigen target
Register an antigen for use in complex predictions.
The antigen is scoped to a project owned by the caller’s org. Sequence
is validated server-side: 10–800 canonical amino acids. Shorter or
longer inputs, or sequences with non-canonical characters, return
400 invalid_request.
Plan gate. None — registering antigens is free. Plan gates apply
at submit time (POST /v1/complex-predictions requires the Complete
plan or above).
Cost: write — burns rate + quota. Does not debit credits.
curl --request POST \
--url https://api.example.com/v1/antigens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Extracellular domain, UniProt P04626 residues 23-652",
"name": "HER2 ECD",
"project_id": "7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f",
"sequence": "TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV..."
}
'import requests
url = "https://api.example.com/v1/antigens"
payload = {
"description": "Extracellular domain, UniProt P04626 residues 23-652",
"name": "HER2 ECD",
"project_id": "7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f",
"sequence": "TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV..."
}
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({
description: 'Extracellular domain, UniProt P04626 residues 23-652',
name: 'HER2 ECD',
project_id: '7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f',
sequence: 'TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...'
})
};
fetch('https://api.example.com/v1/antigens', 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.example.com/v1/antigens",
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([
'description' => 'Extracellular domain, UniProt P04626 residues 23-652',
'name' => 'HER2 ECD',
'project_id' => '7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f',
'sequence' => 'TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...'
]),
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.example.com/v1/antigens"
payload := strings.NewReader("{\n \"description\": \"Extracellular domain, UniProt P04626 residues 23-652\",\n \"name\": \"HER2 ECD\",\n \"project_id\": \"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f\",\n \"sequence\": \"TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...\"\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.example.com/v1/antigens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Extracellular domain, UniProt P04626 residues 23-652\",\n \"name\": \"HER2 ECD\",\n \"project_id\": \"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f\",\n \"sequence\": \"TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/antigens")
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 \"description\": \"Extracellular domain, UniProt P04626 residues 23-652\",\n \"name\": \"HER2 ECD\",\n \"project_id\": \"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f\",\n \"sequence\": \"TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV...\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-04-23T14:15:00+00:00",
"description": "Extracellular domain, UniProt P04626 residues 23-652",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "HER2 ECD",
"object": "antigen",
"project_id": "7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f",
"sequence": "TQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVV..."
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Body for POST /v1/antigens.
Project the antigen belongs to. Must be owned by the caller's org.
"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f"
Short human label (e.g. HER2 ECD). Shown in dashboards and logs.
1 - 120"HER2 ECD"
Target protein sequence, 10–800 canonical amino acids. Submit only the domain you want to dock (e.g. the ECD), not the full-length protein — Boltz-2 runtime scales superlinearly with sequence length.
"EVQLVESGGGLVQPGGSLRLSCAASGFN..."
Optional freeform note shown alongside the antigen.
Response
Successful Response
An antigen target registered under a project.
Opaque antigen identifier (UUID).
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Project this antigen belongs to.
"7b4a3c0f-2e6d-4c7a-9e8f-1d3b5a2c4e6f"
Echo of the caller's name.
Canonical-AA sequence supplied at create time.
ISO-8601 timestamp (UTC) when the antigen was registered.
Polymorphic discriminator. Always antigen.
"antigen"Echo of the caller's description, if any.