> ## Documentation Index
> Fetch the complete documentation index at: https://docs.biohub.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch folding

> Predict protein structures and molecular complexes asynchronously with ESMFold2.

Use [Batch Submit](/api/protein/models/batch_submit.md) with `endpoint: "fold"` for protein sequences or `endpoint: "fold_all_atom"` for complexes containing proteins, RNA, DNA, and ligands.
Supported models: `esmfold2-2026-05` and `esmfold2-fast-2026-05`.

Each task predicts one structure with your folding configuration.
Unlike [fold\_max\_accuracy](/api/protein/models/fold_max_accuracy.md), these endpoints do not generate an MSA automatically or select the best of multiple predictions.
You can supply an MSA to `esmfold2-2026-05`; the fast model ignores MSAs.

## Fold protein sequences

```python theme={null}
import os

from esm.sdk.api import FoldRequest, FoldingConfig
from esm.sdk.forge import ForgeBatchClient

with ForgeBatchClient(
    token=os.environ["ESM_API_KEY"], model="esmfold2-fast-2026-05"
) as client:
    submission = client.fold.submit(
        requests=[
            FoldRequest(sequence="MKTAYIAKQRQISFVKSHFSRQ"),
            FoldRequest(sequence="GSHMASMTGGQQMGRGS"),
        ],
        config=FoldingConfig(include_pae=True),
    )
    print("Batch ID:", submission.batch_id)
    client.fold.wait(submission)
    proteins = client.fold.results(submission)
```

Each successful result is an `ESMProtein` with predicted structure and confidence metrics.
Use `|` to separate protein chains within a sequence.

For molecular complexes, use `client.fold_all_atom` with `FoldAllAtomRequest`; successful results are `MolecularComplexResult` objects. See [Fold all atom](/api/protein/models/fold_all_atom.md) for input construction.

Both handlers also provide `async_submit`, `async_wait`, `async_results`, and `async_run`.
Save the returned batch ID before waiting so you can recover results later.
See the [Batch API overview](/api/protein/models/batch_overview.md) for failures, cancellation, and result retention.
