← API reference
Structure prediction · Protein Design

ESMFold 2 API

Fold a protein from its sequence alone, with no MSA or template search.

Writes a FASTA record and invokes the esm-fold CLI from fair-esm. Predictions are single-sequence, so no alignment or template database is consulted.

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 esmfold2-demo Job name
protein_sequence string textarea yes MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG Protein sequence Join chains of a complex with a colon to fold them as one record.
num_recycles number number no 4 Recycles More recycles refine the prediction at a proportional runtime cost. minimum 0, maximum 48.
max_tokens_per_batch number number no 1024 Max tokens per batch minimum 0, maximum 16384.
chunk_size number number no 0 Attention chunk size 0 disables chunking; lower values trade speed for less memory. minimum 0, maximum 512.
cpu_only boolean checkbox no false CPU only
cpu_offload boolean checkbox no false Offload parameters to CPU Keeps large sequences within GPU memory at the cost of speed.
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/esmfold2/ \
  -H 'Content-Type: application/json' \
  -d '{
  "job_name": "esmfold2-demo",
  "protein_sequence": "MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG",
  "num_recycles": 4,
  "max_tokens_per_batch": 1024,
  "chunk_size": 0,
  "cpu_only": false,
  "cpu_offload": false
}'

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

statusMeaning
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

codeMeaning
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.