Structure prediction · Protein Design
Chai-1 API
Predict protein or protein-ligand complex structures with Chai-1.
Builds Chai's typed FASTA input and runs the official chai-lab folding CLI.
Tasks
Pick a mode with task
Fields belonging to another task are ignored, so send only the ones for the task you chose.
| task | Mode |
|---|---|
sequence default |
Sequence |
list |
Chain list |
molecules |
Molecules (JSON) |
Request body
Fields
The same names the web form posts. See the field type table for what each kind means over HTTP.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
job_name
|
string text | no | chai1-demo |
Job name |
sequence_molecules
sequence
|
string (JSON array) molecule_builder | yes | [{"type": "protein", "sequence": "MSTNPKPQRKTKRNTNRRPQDVKFPGG", "cyclic": false, "modifica … |
Molecules
Add one box per chain: Protein, Ligand, DNA, or RNA. Ligands take a SMILES string (Chai-1 does not accept CCD codes). A modification applies a CCD residue code at a given position. Chai-1 does not support cyclic chains.
One of:
protein, ligand, dna, rna.
A JSON array, sent as a string. See
molecule entries.
|
proteins
list
|
string textarea | yes | MSTNPKPQRKTKRNTNRRPQDVKFPGG |
Protein chains One protein chain sequence per line. |
dnas
list
|
string textarea | no | — |
DNA chains (optional) One DNA chain sequence per line. |
rnas
list
|
string textarea | no | — |
RNA chains (optional) One RNA chain sequence per line. |
molecules
molecules
|
string textarea | yes | [{"type": "protein", "chain": "A", "sequence": "MSTNPKPQRKTKRNTNRRPQDVKFPGG"}] |
Molecules JSON list of {"type": "protein"|"dna"|"rna", "chain": "A", "sequence": "..."}. |
ligands
list
molecules
|
string textarea | no | — |
Ligands (optional) One ligand SMILES per line. |
use_msa_server
|
boolean checkbox | no | false |
Use the public MSA server Opt in to a network call to ColabFold's MMseqs2 server for better accuracy. |
use_templates_server
|
boolean checkbox | no | false |
Use the public pdb100 template server |
pocket_restraints
|
string textarea | no | — |
Pocket restraints (optional) JSON list, e.g. [{"chainA":"A","res_idxA":1,"chainB":"B"}] (any residue on chainB near residue res_idxA on chainA). |
contact_restraints
|
string textarea | no | — |
Contact restraints (optional) JSON list, e.g. [{"chainA":"A","res_idxA":1,"chainB":"B","res_idxB":1}]. |
covalent_restraints
|
string textarea | no | — |
Covalent restraints (optional) JSON list, e.g. [{"chainA":"A","res_idxA":1,"covalentAtomA":"C","chainB":"B","res_idxB":1,"covalentAtomB":"C"}]. Chai-1 was not trained on intra-chain bonds; use inter-chain pairs. |
restraints_min_distance
|
number number | no | 0 |
Restraints minimum distance, angstrom minimum 0, maximum 20, step 0.1. |
restraints_max_distance
|
number number | no | 5 |
Restraints maximum distance, angstrom minimum 0, maximum 20, step 0.1. |
num_samples
|
number number | no | 5 |
Diffusion samples minimum 1, maximum 25. |
num_trunk_samples
|
number number | no | 1 |
Trunk samples minimum 1, maximum 10. |
num_recycles
|
number number | no | 3 |
Recycles minimum 1, maximum 20. |
num_diffn_timesteps
|
number number | no | 200 |
Diffusion timesteps minimum 10, maximum 1000. |
seed
|
number number | no | 0 |
Random seed minimum 0, maximum 2147483647. |
Molecule entry keys
| Key | Meaning |
|---|---|
type |
Which of the field's molecule types this entry is. |
sequence |
The residues, for a protein, dna, or rna entry. |
ligand |
A SMILES string or a CCD_ code, for a ligand entry. |
ion |
An ion code, for an ion entry. |
cyclic |
Whether a polymer chain is cyclic. Tools that cannot model one reject it rather than ignoring it. |
modifications |
Substitutions, as {"position": <1-indexed integer>, "residue": "<CCD code>"} objects. |
Example
A request that runs
These are the defaults, exactly as the web form would post them.
curl -X POST https://www.athanortools.com/api/chai1/ \
-H 'Content-Type: application/json' \
-d '{
"task": "sequence",
"job_name": "chai1-demo",
"sequence_molecules": "[{\"type\": \"protein\", \"sequence\": \"MSTNPKPQRKTKRNTNRRPQDVKFPGG\", \"cyclic\": false, \"modifications\": []}]",
"use_msa_server": false,
"use_templates_server": false,
"pocket_restraints": "",
"contact_restraints": "",
"covalent_restraints": "",
"restraints_min_distance": 0,
"restraints_max_distance": 5,
"num_samples": 5,
"num_trunk_samples": 1,
"num_recycles": 3,
"num_diffn_timesteps": 200,
"seed": 0
}'
The reply is 202 with a queued job; poll its
status_url until status is
succeeded or failed. See
the quick start for the
whole exchange.
Responses
What comes back
| status | Meaning |
|---|---|
queued |
Accepted, waiting for the jobs ahead of it. `position` counts how many those are. |
running |
The tool is executing now. |
succeeded |
Finished; `result` holds the tool's output and `license` the terms it came under. |
failed |
Finished; `error` holds a code and a message. |
Errors
| code | Meaning |
|---|---|
invalid_input |
The client supplied invalid or incomplete input. |
tool_unavailable |
The requested third-party dependency is not available on this host. |
execution_failed |
A configured third-party process exited unsuccessfully. |
internal_error |
An adapter failed in a way it does not describe. The detail is in the server log, not the response. |
not_found |
No job has that id. Finished jobs are dropped eventually. |