# ESMFold 2
Fold proteins, complexes, and DNA/RNA/ligand systems with the full ESMFold2 model.
- Job type: `ESMFOLD2`
- Task: Structure prediction
- Price: 2 credits for one structure
- Automatic routing: ESMFold 2 folds a single chain from sequence alone with the full model, among the most accurate single-chain predictors available.
- Behavior and limits: `num_diffusion_samples` is best-of: one structure per input unless `return_all_samples` is true.
- Source: pending
- Paper: citation pending

## Example

### CLI

```bash
# complexes takes a list the example cannot fill; pass it from Python or HTTP
phi jobs submit ESMFOLD2 \
  --input sequences=NLYIQWLKDGGPSSGRPPPS \
  --input use_msa_server=false \
  --param num_loops=3 \
  --param num_sampling_steps=200 \
  --param num_diffusion_samples=1 \
  --param seed=1 \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    job = phi.jobs.submit(
        "ESMFOLD2",
        inputs={
        "sequences": [
                "NLYIQWLKDGGPSSGRPPPS"
        ],
        "complexes": [],
        "use_msa_server": false
        },
        params={
        "num_loops": 3,
        "num_sampling_steps": 200,
        "num_diffusion_samples": 1,
        "seed": 1
        },
    )
    print(phi.jobs.wait(job.job_id).status)
```

### HTTP

```bash
curl -X POST https://api.dynophi.com/v1/jobs \
  -H "x-api-key: $PHI_KEY" -H "content-type: application/json" \
  -d '{
  "job_type": "ESMFOLD2",
  "inputs": {
    "sequences": [
      "NLYIQWLKDGGPSSGRPPPS"
    ],
    "complexes": [],
    "use_msa_server": false
  },
  "params": {
    "num_loops": 3,
    "num_sampling_steps": 200,
    "num_diffusion_samples": 1,
    "seed": 1
  }
}'
```

## Parameters

| Name | Type | Default | Description |
|---|---|---|---|
| `gpu` | string one of a100, t4, a100_80gb, h100, a100_or_h100, a100_80gb_or_h100, a100_preferred, h100_preferred | `null` | Per-job GPU class override. |
| `num_loops` (essential) | integer | `3` | Number of recycling loops. |
| `num_sampling_steps` (essential) | integer | `200` | Diffusion sampling steps. |
| `num_diffusion_samples` (essential) | integer | `1` | Predictions per sequence. Only the highest-confidence one is returned unless `return_all_samples` is true. |
| `return_all_samples` (essential) | boolean | `false` | Return every seed and diffusion sample's structure and confidence under `samples`, not only the top-ranked one. The top-ranked sample remains each row's primary structure. |
| `seed` (essential) | integer | `null` | Random seed. |
| `max_msa_seqs` | integer | `null` | Cap on MSA depth when an MSA is provided. |
| `hf_revision` | string | `null` | Advanced: pin the Hugging Face model revision for the ESMFold2 weights. |

## Inputs

| Name | Type | Default | Description |
|---|---|---|---|
| `sequences` (essential) | list of string | FoldSequenceInput | `null` | Sequences to fold; accepts the 'SEQ_A:SEQ_B' colon shorthand for multimers. Provide sequences or complexes. |
| `complexes` (essential) | list of ESMFold2ComplexInput | `null` | Explicit multi-chain complexes ({name?, chains:[{id, sequence}, ...]}), each with optional structural template_files / template_mapping. Provide complexes or sequences; complexes wins if both are given. |
| `use_msa_server` (essential) | boolean | `false` | Generate MSAs via the MSA server (ESMFOLD2 Full variant only). Sends the sequence to the public ColabFold MSA server, run by the ColabFold project, not by Dyno. It is outside Dyno's confidentiality commitments. To avoid this, attach your own alignment with msa_uri. |

---
Source: https://dynophi.com/docs/models/ESMFOLD2. From the live API schema and phi-api's model catalog, 2026-11-23.