# PXDesign
Generate all-atom binder backbones with ByteDance PXDesign-d.
- Job type: `PXDESIGN_INFER`
- Task: Binder design
- Price: 10 credits per 100 designs
- Workload: A fixed number of designs; time scales with the count.
- Behavior and limits: `binder_length` is a single required integer, and hotspots are 1-based integers nested under `target_chains`.
- Hotspot input: PXDesign takes hotspots as 1-based sequence positions nested under inputs.target_chains, which cannot be derived from 'A54' chain-and-residue labels. Use phi_run_model to set target_chains directly.
- Source: ByteDance (https://github.com/bytedance/PXDesign)
- Paper: citation pending

## Example

### CLI

```bash
# target_chains is object-shaped; pass it from Python or HTTP
phi jobs submit PXDESIGN_INFER \
  --input target_cif=@target.cif \
  --param binder_length=10 \
  --param n_sample=10 \
  --param seed=1 \
  --wait --out out
```

### Python

```python
from phi import PhiClient

with PhiClient() as phi:
    target_cif = phi.files.upload(path="target.cif")
    job = phi.jobs.submit(
        "PXDESIGN_INFER",
        inputs={
        "target_chains": {},
        "target_cif_gcs_uri": target_cif
        },
        params={
        "binder_length": 10,
        "n_sample": 10,
        "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": "PXDESIGN_INFER",
  "inputs": {
    "target_chains": {},
    "target_cif_gcs_uri": "<gs:// uri from POST /v1/uploads/url>"
  },
  "params": {
    "binder_length": 10,
    "n_sample": 10,
    "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. |
| `binder_length` (essential) | integer |  | Length of the designed binder backbone. |
| `n_sample` (essential) | integer | `10` | Number of backbones to generate. |
| `dtype` | string one of bf16, fp32 | `"bf16"` | Inference precision. |
| `use_fast_ln` | boolean | `true` | Use the fused fast LayerNorm kernel. |
| `use_deepspeed_evo_attention` | boolean | `false` | Use the DeepSpeed EvoFormer attention kernel. |
| `seed` (essential) | integer | `null` | Random seed for reproducible diffusion sampling. |
| `opt_mode` | string one of off, exact, fast, big | `"off"` | Optimization-kit mode. 'off' runs stock PXDesign 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 |
|---|---|---|---|
| `target_cif` | string | `null` | Target structure as base64-encoded CIF (preferred). Falls back to target_cif_gcs_uri, then target_pdb / target_pdb_gcs_uri. |
| `target_cif_gcs_uri` (essential) | string | `null` | gs:// URI to the target CIF. |
| `target_pdb` | string | `null` | Target structure as base64-encoded PDB (CIF is auto-converted). |
| `target_pdb_gcs_uri` | string | `null` | gs:// URI to the target PDB. |
| `target_chains` (essential) | object |  | Per-target-chain spec keyed by chain ID. Each value is 'all' (whole chain) or an object with optional crop ('<start>-<end>' strings), hotspots (1-based label_seq_id ints), and msa_gcs_uri. |

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