ESMC API
Protein language-model embeddings, amino-acid probabilities, and substitution scores.
ESM Cambrian analyzes protein sequences with local 300M, 600M, or 6B models. Exports per-residue and mean-pooled embeddings, optional hidden states and logits, position-level predictions, and optional masked-marginal single-substitution log-odds. Representations support downstream property prediction; scores are not calibrated measurements of stability, fitness, or function.
Input method
Set input_mode to choose how inputs are supplied. Only fields for the selected method are used.
parameters: Set parameters heretext: Enter sequence or FASTAupload: Upload sequence or FASTA
Example presets
Send {"preset": "gfp_embeddings"} to load an example and its bundled inputs. Add other request fields to override its settings. The schema includes all presets under tool.presets.
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 | esmc-demo |
Job name Names the output directory. up to 80 characters. |
sequence_molecules
|
string (JSON array) molecule_builder | yes | [{"type": "protein", "id": "GFP", "sequence": "MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLT … |
Proteins
One independent protein per box (up to 26). Amino-acid letters only; no complexes, modifications, MSAs or templates. Maximum 2046 residues per protein, reserving two positions for start/end tokens.
One of:
protein.
A JSON array, sent as a string. See
molecule entries.
|
input_fasta
|
string textarea | yes | >GFP
MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFK … |
Protein sequence or FASTA Enter one bare sequence (line wrapping allowed) or up to 26 FASTA records with unique headers. Each protein is analyzed independently. Accepts standard amino acids plus X, B, Z, U and O. Maximum 2046 residues per protein; sequences are never truncated. up to 100000 characters. |
inputs_file
|
string file | no | — |
Sequence file Upload FASTA or a plain-text protein sequence. The file contents are sent to the compute node. file types .fasta,.fa,.faa,.txt. |
model
|
string select | no | biohub/ESMC-300M |
Model
Current Biohub MIT-licensed checkpoints, downloaded on first use. 300M is the lightest; 6B requires substantially more RAM/VRAM.
One of:
biohub/ESMC-300M, biohub/ESMC-600M, biohub/ESMC-6B.
|
save_embeddings
|
boolean checkbox | no | true |
Save residue and mean embeddings Export FP32 embeddings [residues, dimensions] and mean_embedding [dimensions] in one compressed NPZ per sequence. Excludes start/end tokens and padding. |
save_logits
|
boolean checkbox | no | false |
Save full logits and probabilities Export [residues, 64] raw logits and softmax probabilities in NPZ. summary.json maps vocabulary indices; unused slots are null. Position predictions and CSV summaries are always saved. |
hidden_layer
|
number number | no | -1 |
Additional hidden-state layer -1 disables additional hidden-state export. Otherwise upstream indices are 0 through 30 (300M), 36 (600M), or 80 (6B). Index 0 is the first block input; the last is the final normalized output. Upstream collects all layers in memory when this is enabled; reduce batch size for long sequences. minimum -1, maximum 80, step 1. |
mutations
|
string textarea | no | — |
Single substitutions (optional) Exactly one input protein. Enter up to 100 substitutions such as M1A, separated by spaces, commas or newlines. Positions are one-based and the reference residue must match. Each substitution is scored independently by masking its position and computing log P(mutant) - log P(reference). Positive means model preference, not measured fitness or stability. Saves mutation_scores.csv. up to 10000 characters. |
batch_size
|
number number | no | 1 |
Batch size Number of independent proteins per inference batch. Smaller batches reduce memory use; sequences are padded only within a batch. minimum 1, maximum 8, step 1. |
device
|
string select | no | auto |
Device
Auto uses CUDA when available, otherwise CPU. An explicitly requested unavailable CUDA device fails clearly.
One of:
auto, cuda, cpu.
|
precision
|
string select | no | default |
Precision
Model weight dtype. BF16 reduces memory on supported hardware. All exported floating arrays use FP32.
One of:
default, fp32, bf16.
|
Molecule entry keys
| Key | Meaning |
|---|---|
type |
Which of the field's molecule types this entry is. |
id |
A chain/entity ID, or a list of IDs for identical copies. Tools with configurable IDs expose this inside each molecule box. CatPred, whose boxes are not chains of one structure, uses it for the enzyme's sequence ID (its pdbpath, which must name exactly one sequence) and for a substrate's optional label. |
count |
The number of identical copies. Used by tools whose native schema represents copy count separately from IDs. |
sequence |
The residues, for a protein, dna, or rna entry. |
ligand |
A SMILES string or a CCD_ code, for a ligand entry. CatPred resolves no CCD codes and takes SMILES only. |
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": <integer>, "residue": "<CCD code>"} objects. Position indexing follows the tool: ESMFold2 uses zero-based positions; the other molecule-builder tools use one-based positions. |
msa |
A tool-native MSA for supported protein/RNA entities. Boltz-2: an absolute .a3m/.csv path, or empty for single-sequence; omit it to generate one with the MSA server. ESMFold2: an absolute .a3m path, a serialized MSA, or a {"sequences": [...]} object. |
paired_msa_path |
An OpenDDE or Protenix protein paired-MSA path. |
unpaired_msa_path |
An OpenDDE or Protenix protein or RNA unpaired-MSA path. |
templates_path |
An OpenDDE or Protenix protein template-hits path. |
A request that runs
These are the defaults, exactly as the web form would post them.
curl -X POST https://athanortools.com/api/esmc/ \
-H 'Content-Type: application/json' \
-d '{
"input_mode": "parameters",
"job_name": "esmc-demo",
"sequence_molecules": "[{\"type\": \"protein\", \"id\": \"GFP\", \"sequence\": \"MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFSYGVQCFSRYPDHMKQHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSALSKDPNEKRDHMVLLEFVTAAGITHGMDELYK\", \"modifications\": []}]",
"model": "biohub/ESMC-300M",
"save_embeddings": true,
"save_logits": false,
"hidden_layer": -1,
"mutations": "",
"batch_size": 1,
"device": "auto",
"precision": "default"
}'
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.
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. |
cancelled |
Abandoned at the submitter's request; there is no result. A job cancelled before its turn never ran at all. |
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 tool 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. |