# ESM C
Produce ESM-C embeddings and masked-LM logits for sequences.
- Job type: `ESMC`
- Task: Embeddings
- Price: 1 credit a run
- Behavior and limits: Sequences cap at 1024 residues. Embeddings and logits come back as .npz from GET /v1/jobs/{id}/embeddings. Omit params.reduce to record pll_sum, pll_mean and entropy.
- Source: EvolutionaryScale (https://github.com/evolutionaryscale/esm)
- Paper: citation pending

## Example

### CLI

```bash
# layers takes a list the example cannot fill; pass it from Python or HTTP
phi jobs submit ESMC \
  --input sequences=NLYIQWLKDGGPSSGRPPPS \
  --param model=6b \
  --param pooling=mean \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    job = phi.jobs.submit(
        "ESMC",
        inputs={
        "sequences": [
                "NLYIQWLKDGGPSSGRPPPS"
        ]
        },
        params={
        "model": "6b",
        "pooling": "mean",
        "layers": []
        },
    )
    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": "ESMC",
  "inputs": {
    "sequences": [
      "NLYIQWLKDGGPSSGRPPPS"
    ]
  },
  "params": {
    "model": "6b",
    "pooling": "mean",
    "layers": []
  }
}'
```

## 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. |
| `model` (essential) | string one of 6b, 600m, 300m | `"6b"` | ESMC checkpoint size. |
| `pooling` (essential) | string one of mean, none | `"mean"` | 'mean' = one vector per sequence; 'none' = per-residue. |
| `layers` (essential) | list of integer | string | `null` | Hidden-state layer indices to return (0..n_layers). 'all' or omit for every layer. Per-residue output ('none') is capped at 4 layers. |
| `score_mutations` | list of string | `null` | Default mutations to score against wild type: substitutions '<wt><1-based pos><mut>' (e.g. 'S104A'), insertions 'ins<pos>:<peptide>' (e.g. 'ins588:PEP', inserted after 1-based position 588), or deletions 'del<start>-<end>' (e.g. 'del588-594', inclusive). Each spec is scored independently against the unedited sequence. Substitutions return a WT-marginal delta_loglik; indels return the variant's mean per-residue loglik and delta_loglik_vs_reference. Applied to every sequence without its own list; override per sequence via the sequence object's 'mutations' key. |
| `reduce` | list of string | `null` | Whole-sequence reductions to compute from the logits and return inline under 'reductions'. Omit to record pll_sum, pll_mean and entropy. Pass a list to record only those names, or an empty list to record none. Names: 'pll_sum', 'pll_mean' (over real residues only), 'entropy' (mean per-position Shannon entropy in nats). 'pll_*' is the single-pass marginal log-likelihood of the observed residues under one unmasked forward pass, not a per-position masked pseudo-log-likelihood. |
| `region` | list of integer | `null` | [start, end] window (1-based, inclusive) on the content axis to restrict pooling, per-residue rows, and logits to. The content axis counts each '<mask>' as one position, so for a masked input the window addresses mask positions too; for an unmasked sequence it is the residue axis. Omit for the whole sequence. Cannot be combined with score_mutations. |

## 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 | ESMCSequenceInput |  | Single-chain sequences to embed (bare strings or objects). |

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