# Chai-1
Chai-1 folding of protein monomers and complexes, from Chai Discovery.
- Job type: `CHAI1`
- Task: Structure prediction
- Price: 2 credits for one structure
- Behavior and limits: `num_diffn_samples` and `seeds` are best-of: one structure per input unless `return_all_samples` is true.
- Source: Chai Discovery (https://github.com/chaidiscovery/chai-lab)
- Paper: Chai Discovery, Chai-1: decoding the molecular interactions of life. bioRxiv 2024.

## Example

### CLI

```bash
# complexes takes a list the example cannot fill; pass it from Python or HTTP
# seeds takes a list the example cannot fill; pass it from Python or HTTP
phi jobs submit CHAI1 \
  --input sequences=NLYIQWLKDGGPSSGRPPPS \
  --param num_trunk_recycles=3 \
  --param num_diffn_samples=5 \
  --param opt_mode=fast \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    job = phi.jobs.submit(
        "CHAI1",
        inputs={
        "sequences": [
                "NLYIQWLKDGGPSSGRPPPS"
        ],
        "complexes": []
        },
        params={
        "num_trunk_recycles": 3,
        "num_diffn_samples": 5,
        "seeds": [],
        "opt_mode": "fast"
        },
    )
    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": "CHAI1",
  "inputs": {
    "sequences": [
      "NLYIQWLKDGGPSSGRPPPS"
    ],
    "complexes": []
  },
  "params": {
    "num_trunk_recycles": 3,
    "num_diffn_samples": 5,
    "seeds": [],
    "opt_mode": "fast"
  }
}'
```

## 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. |
| `seed` | integer | `null` | Single seed (default 101). Mutually exclusive with `seeds`. |
| `seeds` (essential) | list of integer | `null` | Multiple seeds. Mutually exclusive with `seed`. |
| `num_trunk_recycles` (essential) | integer | `3` | Trunk recycling iterations (chai-lab --num-trunk-recycles). |
| `num_diffn_timesteps` | integer | `200` | Diffusion timesteps (chai-lab --num-diffn-timesteps). |
| `num_diffn_samples` (essential) | integer | `5` | Diffusion samples per seed (chai-lab --num-diffn-samples). Only the top-ranked sample across all seeds is returned unless `return_all_samples` is true. |
| `num_trunk_samples` | integer | `1` | Trunk samples per fold (chai-lab --num-trunk-samples). |
| `use_esm_embeddings` | boolean | `true` | Use the traced ESM2-3B single-sequence embeddings chai-lab ships. |
| `low_memory` | boolean | `true` | chai-lab's own memory-frugal trunk path. On by default upstream; turning it off raises peak GPU memory. |
| `use_msa` | boolean | `false` | Use supplied per-chain MSAs. Supplying an MSA URI on any chain turns this on for that fold regardless. |
| `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. |
| `opt_mode` (essential) | string one of off, exact, fast, big | `"fast"` | Optimization-kit mode. 'off' runs stock Chai-1 and is the kill switch; 'exact' is bitwise-identical to 'off' and faster; 'fast' is faster still with small documented numeric differences; 'big' minimizes GPU memory for large inputs. |

## Inputs

| Name | Type | Default | Description |
|---|---|---|---|
| `source_run_id` | string | `null` | Completed GERMINAL run in this organization. Loads accepted A/B complexes from that run's germinal/sequences.json. Mutually exclusive with sequence or complex inputs. |
| `sequences` (essential) | list of string | FoldSequenceInput | `null` | Sequences to fold; accepts the 'SEQ_A:SEQ_B' colon shorthand. Provide sequences or complexes. |
| `complexes` (essential) | list of FoldWithMsaComplexInput | `null` | Multi-chain complexes with optional per-chain MSA / template URIs. Provide complexes or sequences. |

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