# Design

## Start

`client.protein.design.start(DesignStartParamsbody, RequestOptionsoptions?): DesignStartResponse`

**post** `/compute/v1/protein/design`

Create a new design run that generates novel protein binder candidates

### Parameters

- `body: DesignStartParams`

  - `binder_specification: StructureTemplateBinderSpec | NoTemplateBinderSpec | BoltzCuratedBinderSpec`

    Binder specification for protein design. Use no_template for sequence-defined binders, structure_template for uploaded binder structures, or boltz_curated for Boltz-managed nanobody and antibody defaults.

    - `StructureTemplateBinderSpec`

      Binder specification starting from an existing 3D structure. Upload a CIF/PDB file and select which chains to include, which residues to keep, and which regions to redesign. Only chains included in chain_selection are part of the engine run.

      - `chain_selection: Record<string, StructureTemplatePolymerChainSpec | StructureTemplateLigandChainSpec>`

        Chains selected from the uploaded binder structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep (crop_residues). Omit design_motifs to include the chain as fixed scaffold context.

        - `StructureTemplatePolymerChainSpec`

          Per-chain crop and design specification for a polymer chain in structure_template mode.

          - `chain_type: "polymer"`

            - `"polymer"`

          - `crop_residues: Array<number> | "all"`

            0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are removed before design.

            - `Array<number>`

            - `"all"`

              - `"all"`

          - `design_motifs?: Array<ReplacementMotif | InsertionMotif>`

            Optional motifs (replacement or insertion) defining which regions to redesign on this chain. Omit this field to include the chain as fixed scaffold context.

            - `ReplacementMotif`

              Replace a contiguous region of the sequence with a designed segment. Residues from start_index to end_index (inclusive) are replaced with a new sequence of the specified length.

              - `design_length_range: DesignLengthRange`

                Allowed sequence length range for designed regions

                - `max: number`

                  Maximum sequence length in residues. Must be >= min.

                - `min: number`

                  Minimum sequence length in residues

              - `end_index: number`

                0-indexed end residue (inclusive)

              - `start_index: number`

                0-indexed start residue (inclusive)

              - `type: "replacement"`

                - `"replacement"`

            - `InsertionMotif`

              Insert a designed segment at a specific position in the sequence.

              - `after_residue_index: number`

                0-indexed position after which to insert. Use -1 to insert before the first residue.

              - `design_length_range: DesignLengthRange`

                Allowed sequence length range for designed regions

                - `max: number`

                  Maximum sequence length in residues. Must be >= min.

                - `min: number`

                  Minimum sequence length in residues

              - `type: "insertion"`

                - `"insertion"`

        - `StructureTemplateLigandChainSpec`

          Per-chain specification for a ligand chain in structure_template mode. The full ligand is always included.

          - `chain_type: "ligand"`

            - `"ligand"`

      - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

        - `"peptide"`

        - `"antibody"`

        - `"nanobody"`

        - `"custom_protein"`

      - `structure: URLSource | CifBase64Source`

        How to provide a CIF structure file. URLs are auto-detected; base64 uploads must use chemical/x-cif media type.

        - `URLSource`

          - `type: "url"`

            - `"url"`

          - `url: string`

        - `CifBase64Source`

          - `data: string`

            Base64-encoded CIF file contents

          - `media_type: "chemical/x-cif"`

            Must be chemical/x-cif for CIF files

            - `"chemical/x-cif"`

          - `type: "base64"`

            - `"base64"`

      - `type: "structure_template"`

        - `"structure_template"`

      - `rules?: Rules`

        Constraints applied during sequence design

        - `excluded_amino_acids?: Array<string>`

          Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

        - `excluded_sequence_motifs?: Array<string>`

          Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

        - `max_hydrophobic_fraction?: number`

          Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

    - `NoTemplateBinderSpec`

      Binder specification without a structural template. Define the binder from sequence components (fixed and designed segments) without providing a starting 3D structure.

      - `entities: Array<DesignedProteinEntity | FixedProteinEntity | FixedRnaEntity | 3 more>`

        Binder entities composing the design. At least one must be a designed_protein entity. Additional fixed entities (RNA, DNA, ligands) can be included as part of the complex.

        - `DesignedProteinEntity`

          Protein binder entity with designed and/or fixed segments.

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "designed_protein"`

            - `"designed_protein"`

          - `value: string`

            Binder sequence specification. Fixed amino acids are written as literal single-letter codes. Designed regions are written as a length (fixed) or a length range (min..max). Example: "MKTAYI5..10VKSHFSRQ" means fixed MKTAYI, then 5-10 designed residues, then fixed VKSHFSRQ. "20" means 20 fully designed residues. "ACDE8GHI" means fixed ACDE, then 8 designed residues, then fixed GHI.

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedProteinEntity`

          A fixed protein entity whose sequence is not redesigned.

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "protein"`

            - `"protein"`

          - `value: string`

            Amino acid sequence (one-letter codes)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedRnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "rna"`

            - `"rna"`

          - `value: string`

            RNA nucleotide sequence (A, C, G, U, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedDnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "dna"`

            - `"dna"`

          - `value: string`

            DNA nucleotide sequence (A, C, G, T, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedLigandSmilesEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "ligand_smiles"`

            - `"ligand_smiles"`

          - `value: string`

            SMILES string representing the ligand

        - `FixedLigandCcdEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "ligand_ccd"`

            - `"ligand_ccd"`

          - `value: string`

            CCD code from RCSB PDB (e.g. 'ATP', 'ADP')

      - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

        - `"peptide"`

        - `"antibody"`

        - `"nanobody"`

        - `"custom_protein"`

      - `type: "no_template"`

        - `"no_template"`

      - `bonds?: Array<Bond>`

        Covalent bond constraints between atoms in the binder complex. If defining bonds where an atom is part of a designed protein chain, assume residue indices count designed regions as the minimum length. Example: designed protein "1..3C1..2", "C" is residue 1 (0-indexed) of the designed protein.

        - `atom1: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

        - `atom2: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

      - `rules?: Rules`

        Constraints applied during sequence design

        - `excluded_amino_acids?: Array<string>`

          Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

        - `excluded_sequence_motifs?: Array<string>`

          Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

        - `max_hydrophobic_fraction?: number`

          Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

    - `BoltzCuratedBinderSpec`

      Boltz-managed curated binder specification. Choose a curated nanobody or antibody family and Boltz will select from maintained template lists during design. The curated lists are managed by Boltz and may be updated over time to improve quality and coverage.

      - `binder: "boltz_nanobody" | "boltz_antibody"`

        Boltz-managed curated binder family. Boltz maintains and may update the underlying template lists on behalf of customers.

        - `"boltz_nanobody"`

        - `"boltz_antibody"`

      - `type: "boltz_curated"`

        - `"boltz_curated"`

      - `rules?: Rules`

        Constraints applied during sequence design

        - `excluded_amino_acids?: Array<string>`

          Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

        - `excluded_sequence_motifs?: Array<string>`

          Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

        - `max_hydrophobic_fraction?: number`

          Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

  - `num_proteins: number`

    Number of protein designs to generate. Must be between 10 and 1,000,000.

  - `target: StructureTemplateTarget | NoTemplateTarget`

    Target specification (structure template or template-free)

    - `StructureTemplateTarget`

      Target defined by an uploaded 3D structure (CIF or PDB file). Only chains included in chain_selection are used.

      - `chain_selection: Record<string, StructureTemplateTargetPolymerChainSpec | StructureTemplateTargetLigandChainSpec>`

        Chains selected from the uploaded structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep, which are epitope residues, and which are flexible.

        - `StructureTemplateTargetPolymerChainSpec`

          Per-chain specification for a polymer (protein/RNA/DNA) chain in a structure template target.

          - `chain_type: "polymer"`

            - `"polymer"`

          - `crop_residues: Array<number> | "all"`

            0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are excluded from the engine run.

            - `Array<number>`

            - `"all"`

              - `"all"`

          - `epitope_residues?: Array<number>`

            0-indexed residue indices where binder contact is desired (the epitope). All indices must be present in crop_residues.

          - `flexible_residues?: Array<number>`

            0-indexed residue indices allowed to move during design (e.g. flexible loop regions). All indices must be present in crop_residues.

        - `StructureTemplateTargetLigandChainSpec`

          Per-chain specification for a ligand chain in a structure template target. The full ligand is always included.

          - `chain_type: "ligand"`

            - `"ligand"`

      - `structure: URLSource | CifBase64Source`

        How to provide a CIF structure file. URLs are auto-detected; base64 uploads must use chemical/x-cif media type.

        - `URLSource`

          - `type: "url"`

            - `"url"`

          - `url: string`

        - `CifBase64Source`

          - `data: string`

            Base64-encoded CIF file contents

          - `media_type: "chemical/x-cif"`

            Must be chemical/x-cif for CIF files

            - `"chemical/x-cif"`

          - `type: "base64"`

            - `"base64"`

      - `type: "structure_template"`

        - `"structure_template"`

    - `NoTemplateTarget`

      Target defined by sequences only, without a 3D structure template

      - `entities: Array<ProteinEntity | RnaEntity | DnaEntity | 2 more>`

        Entities (proteins, RNA, DNA, ligands) defining the target complex.

        - `ProteinEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this entity

          - `type: "protein"`

            - `"protein"`

          - `value: string`

            Amino acid sequence (one-letter codes)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Post-translational modifications. Optional; defaults to an empty list when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `RnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this entity

          - `type: "rna"`

            - `"rna"`

          - `value: string`

            RNA nucleotide sequence (A, C, G, U, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Chemical modifications. Optional; defaults to an empty list when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `DnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this entity

          - `type: "dna"`

            - `"dna"`

          - `value: string`

            DNA nucleotide sequence (A, C, G, T, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Chemical modifications. Optional; defaults to an empty list when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `LigandCcdEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this ligand

          - `type: "ligand_ccd"`

            - `"ligand_ccd"`

          - `value: string`

            CCD code (e.g., ATP, ADP)

        - `LigandSmilesEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this ligand

          - `type: "ligand_smiles"`

            - `"ligand_smiles"`

          - `value: string`

            SMILES string representing the ligand

      - `type: "no_template"`

        - `"no_template"`

      - `bonds?: Array<Bond>`

        Covalent bond constraints between atoms in the target complex. Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

        - `atom1: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

        - `atom2: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

      - `constraints?: Array<PocketConstraint | ContactConstraint>`

        Structural constraints (pocket and contact). Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

        - `PocketConstraint`

          Constrains the binder to interact with specific pocket residues on the target.

          - `binder_chain_id: string`

            Chain ID of the binder molecule

          - `contact_residues: Record<string, Array<number>>`

            Binding pocket residues keyed by chain ID. Each key is a chain ID (e.g. "A") and the value is an array of 0-indexed residue indices that define the pocket on that chain.

          - `max_distance_angstrom: number`

            Maximum allowed distance in Angstroms between binder and pocket residues. Typical range: 4-8 A.

          - `type: "pocket"`

            - `"pocket"`

          - `force?: boolean`

            Whether to force the constraint

        - `ContactConstraint`

          Contact constraint between two tokens. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `max_distance_angstrom: number`

            Maximum distance in Angstroms

          - `token1: PolymerContactToken | LigandContactToken`

            Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `PolymerContactToken`

              - `chain_id: string`

                Chain ID

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_contact"`

                - `"polymer_contact"`

            - `LigandContactToken`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID

              - `type: "ligand_contact"`

                - `"ligand_contact"`

          - `token2: PolymerContactToken | LigandContactToken`

            Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `PolymerContactToken`

              - `chain_id: string`

                Chain ID

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_contact"`

                - `"polymer_contact"`

            - `LigandContactToken`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID

              - `type: "ligand_contact"`

                - `"ligand_contact"`

          - `type: "contact"`

            - `"contact"`

          - `force?: boolean`

            Whether to force the constraint

      - `epitope_ligand_chains?: Array<string>`

        Chain IDs of ligand entities that are part of the binding epitope. Ligands are marked as epitope in full (no residue-level selection).

      - `epitope_residues?: Record<string, Array<number>>`

        Polymer chain residues where binder contact is desired (the epitope). Each key is a chain ID of a polymer entity, each value is an array of 0-indexed residue indices.

  - `idempotency_key?: string`

    Client-provided key to prevent duplicate submissions on retries

  - `workspace_id?: string`

    Target workspace ID (admin keys only; ignored for workspace keys)

### Returns

- `DesignStartResponse`

  A protein design engine run that generates novel protein binders

  - `id: string`

    Unique ProteinDesignRun identifier

  - `completed_at: string | null`

  - `created_at: string`

  - `data_deleted_at: string | null`

    When the input, output, and result data was permanently deleted. Null if data has not been deleted.

  - `engine: "boltz-protein-design"`

    Engine used for protein design

    - `"boltz-protein-design"`

  - `engine_version: string`

    Engine version used for protein design

  - `error: Error | null`

    - `code: string`

      Machine-readable error code

    - `message: string`

      Human-readable error message

    - `details?: unknown`

      Additional field-level error details keyed by input path, when available.

  - `input: Input | null`

    Pipeline input (null if data deleted)

    - `binder_specification: StructureTemplateBinderSpecResponse | NoTemplateBinderSpecResponse | BoltzCuratedBinderSpecResponse`

      Binder specification for protein design. Use no_template for sequence-defined binders, structure_template for uploaded binder structures, or boltz_curated for Boltz-managed nanobody and antibody defaults.

      - `StructureTemplateBinderSpecResponse`

        Binder specification starting from an existing 3D structure. Upload a CIF/PDB file and select which chains to include, which residues to keep, and which regions to redesign. Only chains included in chain_selection are part of the engine run.

        - `chain_selection: Record<string, StructureTemplatePolymerChainSpec | StructureTemplateLigandChainSpec>`

          Chains selected from the uploaded binder structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep (crop_residues). Omit design_motifs to include the chain as fixed scaffold context.

          - `StructureTemplatePolymerChainSpec`

            Per-chain crop and design specification for a polymer chain in structure_template mode.

            - `chain_type: "polymer"`

              - `"polymer"`

            - `crop_residues: Array<number> | "all"`

              0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are removed before design.

              - `Array<number>`

              - `"all"`

                - `"all"`

            - `design_motifs?: Array<ReplacementMotif | InsertionMotif>`

              Optional motifs (replacement or insertion) defining which regions to redesign on this chain. Omit this field to include the chain as fixed scaffold context.

              - `ReplacementMotif`

                Replace a contiguous region of the sequence with a designed segment. Residues from start_index to end_index (inclusive) are replaced with a new sequence of the specified length.

                - `design_length_range: DesignLengthRange`

                  Allowed sequence length range for designed regions

                  - `max: number`

                    Maximum sequence length in residues. Must be >= min.

                  - `min: number`

                    Minimum sequence length in residues

                - `end_index: number`

                  0-indexed end residue (inclusive)

                - `start_index: number`

                  0-indexed start residue (inclusive)

                - `type: "replacement"`

                  - `"replacement"`

              - `InsertionMotif`

                Insert a designed segment at a specific position in the sequence.

                - `after_residue_index: number`

                  0-indexed position after which to insert. Use -1 to insert before the first residue.

                - `design_length_range: DesignLengthRange`

                  Allowed sequence length range for designed regions

                  - `max: number`

                    Maximum sequence length in residues. Must be >= min.

                  - `min: number`

                    Minimum sequence length in residues

                - `type: "insertion"`

                  - `"insertion"`

          - `StructureTemplateLigandChainSpec`

            Per-chain specification for a ligand chain in structure_template mode. The full ligand is always included.

            - `chain_type: "ligand"`

              - `"ligand"`

        - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

          - `"peptide"`

          - `"antibody"`

          - `"nanobody"`

          - `"custom_protein"`

        - `structure: Structure`

          - `url: string`

            URL to download the file

          - `url_expires_at: string`

            When the presigned URL expires

        - `type: "structure_template"`

          - `"structure_template"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

      - `NoTemplateBinderSpecResponse`

        Binder specification without a structural template. Define the binder from sequence components (fixed and designed segments) without providing a starting 3D structure.

        - `entities: Array<DesignedProteinEntityResponse | FixedProteinEntityResponse | FixedRnaEntityResponse | 3 more>`

          Binder entities composing the design. At least one must be a designed_protein entity. Additional fixed entities (RNA, DNA, ligands) can be included as part of the complex.

          - `DesignedProteinEntityResponse`

            Protein binder entity with designed and/or fixed segments.

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "designed_protein"`

              - `"designed_protein"`

            - `value: string`

              Binder sequence specification. Fixed amino acids are written as literal single-letter codes. Designed regions are written as a length (fixed) or a length range (min..max). Example: "MKTAYI5..10VKSHFSRQ" means fixed MKTAYI, then 5-10 designed residues, then fixed VKSHFSRQ. "20" means 20 fully designed residues. "ACDE8GHI" means fixed ACDE, then 8 designed residues, then fixed GHI.

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedProteinEntityResponse`

            A fixed protein entity whose sequence is not redesigned.

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "protein"`

              - `"protein"`

            - `value: string`

              Amino acid sequence (one-letter codes)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedRnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "rna"`

              - `"rna"`

            - `value: string`

              RNA nucleotide sequence (A, C, G, U, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedDnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "dna"`

              - `"dna"`

            - `value: string`

              DNA nucleotide sequence (A, C, G, T, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedLigandSmilesEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "ligand_smiles"`

              - `"ligand_smiles"`

            - `value: string`

              SMILES string representing the ligand

          - `FixedLigandCcdEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "ligand_ccd"`

              - `"ligand_ccd"`

            - `value: string`

              CCD code from RCSB PDB (e.g. 'ATP', 'ADP')

        - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

          - `"peptide"`

          - `"antibody"`

          - `"nanobody"`

          - `"custom_protein"`

        - `type: "no_template"`

          - `"no_template"`

        - `bonds?: Array<Bond>`

          Covalent bond constraints between atoms in the binder complex. If defining bonds where an atom is part of a designed protein chain, assume residue indices count designed regions as the minimum length. Example: designed protein "1..3C1..2", "C" is residue 1 (0-indexed) of the designed protein.

          - `atom1: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

          - `atom2: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

      - `BoltzCuratedBinderSpecResponse`

        Boltz-managed curated binder specification. Choose a curated nanobody or antibody family and Boltz will select from maintained template lists during design. The curated lists are managed by Boltz and may be updated over time to improve quality and coverage.

        - `binder: "boltz_nanobody" | "boltz_antibody"`

          Boltz-managed curated binder family. Boltz maintains and may update the underlying template lists on behalf of customers.

          - `"boltz_nanobody"`

          - `"boltz_antibody"`

        - `type: "boltz_curated"`

          - `"boltz_curated"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

    - `num_proteins: number`

      Number of protein designs to generate. Must be between 10 and 1,000,000.

    - `target: StructureTemplateTargetResponse | NoTemplateTargetResponse`

      Target specification (structure template or template-free)

      - `StructureTemplateTargetResponse`

        Target defined by an uploaded 3D structure (CIF or PDB file). Only chains included in chain_selection are used.

        - `chain_selection: Record<string, StructureTemplateTargetPolymerChainSpec | StructureTemplateTargetLigandChainSpec>`

          Chains selected from the uploaded structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep, which are epitope residues, and which are flexible.

          - `StructureTemplateTargetPolymerChainSpec`

            Per-chain specification for a polymer (protein/RNA/DNA) chain in a structure template target.

            - `chain_type: "polymer"`

              - `"polymer"`

            - `crop_residues: Array<number> | "all"`

              0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are excluded from the engine run.

              - `Array<number>`

              - `"all"`

                - `"all"`

            - `epitope_residues?: Array<number>`

              0-indexed residue indices where binder contact is desired (the epitope). All indices must be present in crop_residues.

            - `flexible_residues?: Array<number>`

              0-indexed residue indices allowed to move during design (e.g. flexible loop regions). All indices must be present in crop_residues.

          - `StructureTemplateTargetLigandChainSpec`

            Per-chain specification for a ligand chain in a structure template target. The full ligand is always included.

            - `chain_type: "ligand"`

              - `"ligand"`

        - `structure: Structure`

          - `url: string`

            URL to download the file

          - `url_expires_at: string`

            When the presigned URL expires

        - `type: "structure_template"`

          - `"structure_template"`

      - `NoTemplateTargetResponse`

        Target defined by sequences only, without a 3D structure template

        - `entities: Array<ProteinEntityResponse | RnaEntityResponse | DnaEntityResponse | 2 more>`

          Entities (proteins, RNA, DNA, ligands) defining the target complex.

          - `ProteinEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "protein"`

              - `"protein"`

            - `value: string`

              Amino acid sequence (one-letter codes)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Post-translational modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `RnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "rna"`

              - `"rna"`

            - `value: string`

              RNA nucleotide sequence (A, C, G, U, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Chemical modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `DnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "dna"`

              - `"dna"`

            - `value: string`

              DNA nucleotide sequence (A, C, G, T, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Chemical modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `LigandCcdEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this ligand

            - `type: "ligand_ccd"`

              - `"ligand_ccd"`

            - `value: string`

              CCD code (e.g., ATP, ADP)

          - `LigandSmilesEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this ligand

            - `type: "ligand_smiles"`

              - `"ligand_smiles"`

            - `value: string`

              SMILES string representing the ligand

        - `type: "no_template"`

          - `"no_template"`

        - `bonds?: Array<Bond>`

          Covalent bond constraints between atoms in the target complex. Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

          - `atom1: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

          - `atom2: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

        - `constraints?: Array<PocketConstraintResponse | ContactConstraintResponse>`

          Structural constraints (pocket and contact). Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

          - `PocketConstraintResponse`

            Constrains the binder to interact with specific pocket residues on the target.

            - `binder_chain_id: string`

              Chain ID of the binder molecule

            - `contact_residues: Record<string, Array<number>>`

              Binding pocket residues keyed by chain ID. Each key is a chain ID (e.g. "A") and the value is an array of 0-indexed residue indices that define the pocket on that chain.

            - `max_distance_angstrom: number`

              Maximum allowed distance in Angstroms between binder and pocket residues. Typical range: 4-8 A.

            - `type: "pocket"`

              - `"pocket"`

            - `force?: boolean`

              Whether to force the constraint

          - `ContactConstraintResponse`

            Contact constraint between two tokens. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `max_distance_angstrom: number`

              Maximum distance in Angstroms

            - `token1: PolymerContactTokenResponse | LigandContactTokenResponse`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `PolymerContactTokenResponse`

                - `chain_id: string`

                  Chain ID

                - `residue_index: number`

                  0-based residue index

                - `type: "polymer_contact"`

                  - `"polymer_contact"`

              - `LigandContactTokenResponse`

                Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

                - `atom_name: string`

                  Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

                - `chain_id: string`

                  Chain ID

                - `type: "ligand_contact"`

                  - `"ligand_contact"`

            - `token2: PolymerContactTokenResponse | LigandContactTokenResponse`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `PolymerContactTokenResponse`

                - `chain_id: string`

                  Chain ID

                - `residue_index: number`

                  0-based residue index

                - `type: "polymer_contact"`

                  - `"polymer_contact"`

              - `LigandContactTokenResponse`

                Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

                - `atom_name: string`

                  Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

                - `chain_id: string`

                  Chain ID

                - `type: "ligand_contact"`

                  - `"ligand_contact"`

            - `type: "contact"`

              - `"contact"`

            - `force?: boolean`

              Whether to force the constraint

        - `epitope_ligand_chains?: Array<string>`

          Chain IDs of ligand entities that are part of the binding epitope. Ligands are marked as epitope in full (no residue-level selection).

        - `epitope_residues?: Record<string, Array<number>>`

          Polymer chain residues where binder contact is desired (the epitope). Each key is a chain ID of a polymer entity, each value is an array of 0-indexed residue indices.

    - `idempotency_key?: string`

      Client-provided key to prevent duplicate submissions on retries

    - `workspace_id?: string`

      Target workspace ID (admin keys only; ignored for workspace keys)

  - `livemode: boolean`

    Whether this resource was created with a live API key.

  - `progress: Progress | null`

    - `num_proteins_generated: number`

      Number of protein binders generated so far

    - `total_proteins_to_generate: number`

      Total number of protein binders requested

    - `latest_result_id?: string`

      ID of the most recently generated result

  - `started_at: string | null`

  - `status: "pending" | "running" | "succeeded" | 2 more`

    - `"pending"`

    - `"running"`

    - `"succeeded"`

    - `"failed"`

    - `"stopped"`

  - `stopped_at: string | null`

  - `workspace_id: string`

    Workspace ID

  - `idempotency_key?: string`

    Client-provided idempotency key

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

const response = await client.protein.design.start({
  binder_specification: {
    chain_selection: {
      B: { chain_type: 'polymer', crop_residues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] },
    },
    modality: 'peptide',
    structure: { type: 'url', url: 'https://example.com' },
    type: 'structure_template',
  },
  num_proteins: 10,
  target: {
    chain_selection: {
      A: { chain_type: 'polymer', crop_residues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] },
    },
    structure: { type: 'url', url: 'https://example.com' },
    type: 'structure_template',
  },
});

console.log(response.id);
```

## List

`client.protein.design.list(DesignListParamsquery?, RequestOptionsoptions?): CursorPage<DesignListResponse>`

**get** `/compute/v1/protein/design`

List protein design runs, optionally filtered by workspace

### Parameters

- `query: DesignListParams`

  - `after_id?: string`

    Return results after this ID

  - `before_id?: string`

    Return results before this ID

  - `limit?: number`

    Max items to return. Defaults to 100.

  - `workspace_id?: string`

    Filter by workspace ID. Only used with admin API keys. If not provided, defaults to the workspace associated with the API key, or the default workspace for admin keys.

### Returns

- `DesignListResponse`

  Summary of a protein design engine run (excludes input)

  - `id: string`

    Unique ProteinDesignRunSummary identifier

  - `completed_at: string | null`

  - `created_at: string`

  - `data_deleted_at: string | null`

    When the input, output, and result data was permanently deleted. Null if data has not been deleted.

  - `engine: "boltz-protein-design"`

    Engine used for protein design

    - `"boltz-protein-design"`

  - `engine_version: string`

    Engine version used for protein design

  - `error: Error | null`

    - `code: string`

      Machine-readable error code

    - `message: string`

      Human-readable error message

    - `details?: unknown`

      Additional field-level error details keyed by input path, when available.

  - `livemode: boolean`

    Whether this resource was created with a live API key.

  - `progress: Progress | null`

    - `num_proteins_generated: number`

      Number of protein binders generated so far

    - `total_proteins_to_generate: number`

      Total number of protein binders requested

    - `latest_result_id?: string`

      ID of the most recently generated result

  - `started_at: string | null`

  - `status: "pending" | "running" | "succeeded" | 2 more`

    - `"pending"`

    - `"running"`

    - `"succeeded"`

    - `"failed"`

    - `"stopped"`

  - `stopped_at: string | null`

  - `workspace_id: string`

    Workspace ID

  - `idempotency_key?: string`

    Client-provided idempotency key

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const designListResponse of client.protein.design.list()) {
  console.log(designListResponse.id);
}
```

## Retrieve

`client.protein.design.retrieve(stringid, DesignRetrieveParamsquery?, RequestOptionsoptions?): DesignRetrieveResponse`

**get** `/compute/v1/protein/design/{id}`

Retrieve a design run by ID, including progress and status

### Parameters

- `id: string`

- `query: DesignRetrieveParams`

  - `workspace_id?: string`

    Workspace ID. Only used with admin API keys. Ignored (or validated) for workspace-scoped keys.

### Returns

- `DesignRetrieveResponse`

  A protein design engine run that generates novel protein binders

  - `id: string`

    Unique ProteinDesignRun identifier

  - `completed_at: string | null`

  - `created_at: string`

  - `data_deleted_at: string | null`

    When the input, output, and result data was permanently deleted. Null if data has not been deleted.

  - `engine: "boltz-protein-design"`

    Engine used for protein design

    - `"boltz-protein-design"`

  - `engine_version: string`

    Engine version used for protein design

  - `error: Error | null`

    - `code: string`

      Machine-readable error code

    - `message: string`

      Human-readable error message

    - `details?: unknown`

      Additional field-level error details keyed by input path, when available.

  - `input: Input | null`

    Pipeline input (null if data deleted)

    - `binder_specification: StructureTemplateBinderSpecResponse | NoTemplateBinderSpecResponse | BoltzCuratedBinderSpecResponse`

      Binder specification for protein design. Use no_template for sequence-defined binders, structure_template for uploaded binder structures, or boltz_curated for Boltz-managed nanobody and antibody defaults.

      - `StructureTemplateBinderSpecResponse`

        Binder specification starting from an existing 3D structure. Upload a CIF/PDB file and select which chains to include, which residues to keep, and which regions to redesign. Only chains included in chain_selection are part of the engine run.

        - `chain_selection: Record<string, StructureTemplatePolymerChainSpec | StructureTemplateLigandChainSpec>`

          Chains selected from the uploaded binder structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep (crop_residues). Omit design_motifs to include the chain as fixed scaffold context.

          - `StructureTemplatePolymerChainSpec`

            Per-chain crop and design specification for a polymer chain in structure_template mode.

            - `chain_type: "polymer"`

              - `"polymer"`

            - `crop_residues: Array<number> | "all"`

              0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are removed before design.

              - `Array<number>`

              - `"all"`

                - `"all"`

            - `design_motifs?: Array<ReplacementMotif | InsertionMotif>`

              Optional motifs (replacement or insertion) defining which regions to redesign on this chain. Omit this field to include the chain as fixed scaffold context.

              - `ReplacementMotif`

                Replace a contiguous region of the sequence with a designed segment. Residues from start_index to end_index (inclusive) are replaced with a new sequence of the specified length.

                - `design_length_range: DesignLengthRange`

                  Allowed sequence length range for designed regions

                  - `max: number`

                    Maximum sequence length in residues. Must be >= min.

                  - `min: number`

                    Minimum sequence length in residues

                - `end_index: number`

                  0-indexed end residue (inclusive)

                - `start_index: number`

                  0-indexed start residue (inclusive)

                - `type: "replacement"`

                  - `"replacement"`

              - `InsertionMotif`

                Insert a designed segment at a specific position in the sequence.

                - `after_residue_index: number`

                  0-indexed position after which to insert. Use -1 to insert before the first residue.

                - `design_length_range: DesignLengthRange`

                  Allowed sequence length range for designed regions

                  - `max: number`

                    Maximum sequence length in residues. Must be >= min.

                  - `min: number`

                    Minimum sequence length in residues

                - `type: "insertion"`

                  - `"insertion"`

          - `StructureTemplateLigandChainSpec`

            Per-chain specification for a ligand chain in structure_template mode. The full ligand is always included.

            - `chain_type: "ligand"`

              - `"ligand"`

        - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

          - `"peptide"`

          - `"antibody"`

          - `"nanobody"`

          - `"custom_protein"`

        - `structure: Structure`

          - `url: string`

            URL to download the file

          - `url_expires_at: string`

            When the presigned URL expires

        - `type: "structure_template"`

          - `"structure_template"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

      - `NoTemplateBinderSpecResponse`

        Binder specification without a structural template. Define the binder from sequence components (fixed and designed segments) without providing a starting 3D structure.

        - `entities: Array<DesignedProteinEntityResponse | FixedProteinEntityResponse | FixedRnaEntityResponse | 3 more>`

          Binder entities composing the design. At least one must be a designed_protein entity. Additional fixed entities (RNA, DNA, ligands) can be included as part of the complex.

          - `DesignedProteinEntityResponse`

            Protein binder entity with designed and/or fixed segments.

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "designed_protein"`

              - `"designed_protein"`

            - `value: string`

              Binder sequence specification. Fixed amino acids are written as literal single-letter codes. Designed regions are written as a length (fixed) or a length range (min..max). Example: "MKTAYI5..10VKSHFSRQ" means fixed MKTAYI, then 5-10 designed residues, then fixed VKSHFSRQ. "20" means 20 fully designed residues. "ACDE8GHI" means fixed ACDE, then 8 designed residues, then fixed GHI.

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedProteinEntityResponse`

            A fixed protein entity whose sequence is not redesigned.

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "protein"`

              - `"protein"`

            - `value: string`

              Amino acid sequence (one-letter codes)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedRnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "rna"`

              - `"rna"`

            - `value: string`

              RNA nucleotide sequence (A, C, G, U, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedDnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "dna"`

              - `"dna"`

            - `value: string`

              DNA nucleotide sequence (A, C, G, T, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedLigandSmilesEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "ligand_smiles"`

              - `"ligand_smiles"`

            - `value: string`

              SMILES string representing the ligand

          - `FixedLigandCcdEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "ligand_ccd"`

              - `"ligand_ccd"`

            - `value: string`

              CCD code from RCSB PDB (e.g. 'ATP', 'ADP')

        - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

          - `"peptide"`

          - `"antibody"`

          - `"nanobody"`

          - `"custom_protein"`

        - `type: "no_template"`

          - `"no_template"`

        - `bonds?: Array<Bond>`

          Covalent bond constraints between atoms in the binder complex. If defining bonds where an atom is part of a designed protein chain, assume residue indices count designed regions as the minimum length. Example: designed protein "1..3C1..2", "C" is residue 1 (0-indexed) of the designed protein.

          - `atom1: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

          - `atom2: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

      - `BoltzCuratedBinderSpecResponse`

        Boltz-managed curated binder specification. Choose a curated nanobody or antibody family and Boltz will select from maintained template lists during design. The curated lists are managed by Boltz and may be updated over time to improve quality and coverage.

        - `binder: "boltz_nanobody" | "boltz_antibody"`

          Boltz-managed curated binder family. Boltz maintains and may update the underlying template lists on behalf of customers.

          - `"boltz_nanobody"`

          - `"boltz_antibody"`

        - `type: "boltz_curated"`

          - `"boltz_curated"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

    - `num_proteins: number`

      Number of protein designs to generate. Must be between 10 and 1,000,000.

    - `target: StructureTemplateTargetResponse | NoTemplateTargetResponse`

      Target specification (structure template or template-free)

      - `StructureTemplateTargetResponse`

        Target defined by an uploaded 3D structure (CIF or PDB file). Only chains included in chain_selection are used.

        - `chain_selection: Record<string, StructureTemplateTargetPolymerChainSpec | StructureTemplateTargetLigandChainSpec>`

          Chains selected from the uploaded structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep, which are epitope residues, and which are flexible.

          - `StructureTemplateTargetPolymerChainSpec`

            Per-chain specification for a polymer (protein/RNA/DNA) chain in a structure template target.

            - `chain_type: "polymer"`

              - `"polymer"`

            - `crop_residues: Array<number> | "all"`

              0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are excluded from the engine run.

              - `Array<number>`

              - `"all"`

                - `"all"`

            - `epitope_residues?: Array<number>`

              0-indexed residue indices where binder contact is desired (the epitope). All indices must be present in crop_residues.

            - `flexible_residues?: Array<number>`

              0-indexed residue indices allowed to move during design (e.g. flexible loop regions). All indices must be present in crop_residues.

          - `StructureTemplateTargetLigandChainSpec`

            Per-chain specification for a ligand chain in a structure template target. The full ligand is always included.

            - `chain_type: "ligand"`

              - `"ligand"`

        - `structure: Structure`

          - `url: string`

            URL to download the file

          - `url_expires_at: string`

            When the presigned URL expires

        - `type: "structure_template"`

          - `"structure_template"`

      - `NoTemplateTargetResponse`

        Target defined by sequences only, without a 3D structure template

        - `entities: Array<ProteinEntityResponse | RnaEntityResponse | DnaEntityResponse | 2 more>`

          Entities (proteins, RNA, DNA, ligands) defining the target complex.

          - `ProteinEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "protein"`

              - `"protein"`

            - `value: string`

              Amino acid sequence (one-letter codes)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Post-translational modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `RnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "rna"`

              - `"rna"`

            - `value: string`

              RNA nucleotide sequence (A, C, G, U, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Chemical modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `DnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "dna"`

              - `"dna"`

            - `value: string`

              DNA nucleotide sequence (A, C, G, T, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Chemical modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `LigandCcdEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this ligand

            - `type: "ligand_ccd"`

              - `"ligand_ccd"`

            - `value: string`

              CCD code (e.g., ATP, ADP)

          - `LigandSmilesEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this ligand

            - `type: "ligand_smiles"`

              - `"ligand_smiles"`

            - `value: string`

              SMILES string representing the ligand

        - `type: "no_template"`

          - `"no_template"`

        - `bonds?: Array<Bond>`

          Covalent bond constraints between atoms in the target complex. Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

          - `atom1: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

          - `atom2: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

        - `constraints?: Array<PocketConstraintResponse | ContactConstraintResponse>`

          Structural constraints (pocket and contact). Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

          - `PocketConstraintResponse`

            Constrains the binder to interact with specific pocket residues on the target.

            - `binder_chain_id: string`

              Chain ID of the binder molecule

            - `contact_residues: Record<string, Array<number>>`

              Binding pocket residues keyed by chain ID. Each key is a chain ID (e.g. "A") and the value is an array of 0-indexed residue indices that define the pocket on that chain.

            - `max_distance_angstrom: number`

              Maximum allowed distance in Angstroms between binder and pocket residues. Typical range: 4-8 A.

            - `type: "pocket"`

              - `"pocket"`

            - `force?: boolean`

              Whether to force the constraint

          - `ContactConstraintResponse`

            Contact constraint between two tokens. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `max_distance_angstrom: number`

              Maximum distance in Angstroms

            - `token1: PolymerContactTokenResponse | LigandContactTokenResponse`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `PolymerContactTokenResponse`

                - `chain_id: string`

                  Chain ID

                - `residue_index: number`

                  0-based residue index

                - `type: "polymer_contact"`

                  - `"polymer_contact"`

              - `LigandContactTokenResponse`

                Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

                - `atom_name: string`

                  Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

                - `chain_id: string`

                  Chain ID

                - `type: "ligand_contact"`

                  - `"ligand_contact"`

            - `token2: PolymerContactTokenResponse | LigandContactTokenResponse`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `PolymerContactTokenResponse`

                - `chain_id: string`

                  Chain ID

                - `residue_index: number`

                  0-based residue index

                - `type: "polymer_contact"`

                  - `"polymer_contact"`

              - `LigandContactTokenResponse`

                Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

                - `atom_name: string`

                  Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

                - `chain_id: string`

                  Chain ID

                - `type: "ligand_contact"`

                  - `"ligand_contact"`

            - `type: "contact"`

              - `"contact"`

            - `force?: boolean`

              Whether to force the constraint

        - `epitope_ligand_chains?: Array<string>`

          Chain IDs of ligand entities that are part of the binding epitope. Ligands are marked as epitope in full (no residue-level selection).

        - `epitope_residues?: Record<string, Array<number>>`

          Polymer chain residues where binder contact is desired (the epitope). Each key is a chain ID of a polymer entity, each value is an array of 0-indexed residue indices.

    - `idempotency_key?: string`

      Client-provided key to prevent duplicate submissions on retries

    - `workspace_id?: string`

      Target workspace ID (admin keys only; ignored for workspace keys)

  - `livemode: boolean`

    Whether this resource was created with a live API key.

  - `progress: Progress | null`

    - `num_proteins_generated: number`

      Number of protein binders generated so far

    - `total_proteins_to_generate: number`

      Total number of protein binders requested

    - `latest_result_id?: string`

      ID of the most recently generated result

  - `started_at: string | null`

  - `status: "pending" | "running" | "succeeded" | 2 more`

    - `"pending"`

    - `"running"`

    - `"succeeded"`

    - `"failed"`

    - `"stopped"`

  - `stopped_at: string | null`

  - `workspace_id: string`

    Workspace ID

  - `idempotency_key?: string`

    Client-provided idempotency key

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

const design = await client.protein.design.retrieve('id');

console.log(design.id);
```

## List Results

`client.protein.design.listResults(stringid, DesignListResultsParamsquery?, RequestOptionsoptions?): CursorPage<DesignListResultsResponse>`

**get** `/compute/v1/protein/design/{id}/results`

Retrieve paginated results from a protein design run

### Parameters

- `id: string`

- `query: DesignListResultsParams`

  - `after_id?: string`

    Return results after this ID

  - `before_id?: string`

    Return results before this ID

  - `limit?: number`

    Max results to return. Defaults to 100.

  - `workspace_id?: string`

    Workspace ID. Only used with admin API keys. Ignored (or validated) for workspace-scoped keys.

### Returns

- `DesignListResultsResponse`

  A single generated protein design

  - `id: string`

    Unique result ID

  - `artifacts: Artifacts`

    - `archive: Archive`

      - `url: string`

        URL to download the file

      - `url_expires_at: string`

        When the presigned URL expires

    - `structure?: Structure`

      - `url: string`

        URL to download the file

      - `url_expires_at: string`

        When the presigned URL expires

  - `created_at: string`

  - `entities: Array<ProteinEntity | RnaEntity | DnaEntity | 2 more>`

    Entities of the designed binder complex. Includes both designed entities and fixed entities from the input.

    - `ProteinEntity`

      - `chain_ids: Array<string>`

        Chain IDs for this entity

      - `type: "protein"`

        - `"protein"`

      - `value: string`

        Amino acid sequence (one-letter codes)

      - `cyclic?: boolean`

        Whether the sequence is cyclic

      - `modifications?: Array<CcdModification | SmilesModification>`

        Post-translational modifications. Optional; defaults to an empty list when omitted.

        - `CcdModification`

          - `residue_index: number`

            0-based index of the residue to modify

          - `type: "ccd"`

            - `"ccd"`

          - `value: string`

            CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

        - `SmilesModification`

          - `residue_index: number`

            0-based index of the residue to modify

          - `type: "smiles"`

            - `"smiles"`

          - `value: string`

            SMILES string for the modification

    - `RnaEntity`

      - `chain_ids: Array<string>`

        Chain IDs for this entity

      - `type: "rna"`

        - `"rna"`

      - `value: string`

        RNA nucleotide sequence (A, C, G, U, N)

      - `cyclic?: boolean`

        Whether the sequence is cyclic

      - `modifications?: Array<CcdModification | SmilesModification>`

        Chemical modifications. Optional; defaults to an empty list when omitted.

        - `CcdModification`

          - `residue_index: number`

            0-based index of the residue to modify

          - `type: "ccd"`

            - `"ccd"`

          - `value: string`

            CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

        - `SmilesModification`

          - `residue_index: number`

            0-based index of the residue to modify

          - `type: "smiles"`

            - `"smiles"`

          - `value: string`

            SMILES string for the modification

    - `DnaEntity`

      - `chain_ids: Array<string>`

        Chain IDs for this entity

      - `type: "dna"`

        - `"dna"`

      - `value: string`

        DNA nucleotide sequence (A, C, G, T, N)

      - `cyclic?: boolean`

        Whether the sequence is cyclic

      - `modifications?: Array<CcdModification | SmilesModification>`

        Chemical modifications. Optional; defaults to an empty list when omitted.

        - `CcdModification`

          - `residue_index: number`

            0-based index of the residue to modify

          - `type: "ccd"`

            - `"ccd"`

          - `value: string`

            CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

        - `SmilesModification`

          - `residue_index: number`

            0-based index of the residue to modify

          - `type: "smiles"`

            - `"smiles"`

          - `value: string`

            SMILES string for the modification

    - `LigandCcdEntity`

      - `chain_ids: Array<string>`

        Chain IDs for this ligand

      - `type: "ligand_ccd"`

        - `"ligand_ccd"`

      - `value: string`

        CCD code (e.g., ATP, ADP)

    - `LigandSmilesEntity`

      - `chain_ids: Array<string>`

        Chain IDs for this ligand

      - `type: "ligand_smiles"`

        - `"ligand_smiles"`

      - `value: string`

        SMILES string representing the ligand

  - `metrics: Metrics`

    Structural and binding quality metrics for a designed protein binder

    - `binding_confidence: number`

      Confidence that the designed binder binds the target (0-1). Primary metric for hit discovery.

    - `helix_fraction: number`

      Fraction of the designed sequence forming alpha helices (0-1).

    - `iptm: number`

      Interface predicted TM score (0-1). Confidence in the protein-protein interface.

    - `loop_fraction: number`

      Fraction of the designed sequence in coil/loop regions (0-1).

    - `min_interaction_pae: number`

      Minimum predicted aligned error at the interface (Angstroms). Lower values indicate higher confidence.

    - `sheet_fraction: number`

      Fraction of the designed sequence forming beta sheets (0-1).

    - `structure_confidence: number`

      Confidence in the predicted 3D structure (0-1).

  - `warnings?: Array<Warning>`

    Warnings about potential quality issues with this result.

    - `code: string`

      Machine-readable warning code (e.g. "low_confidence", "unusual_geometry")

    - `message: string`

      Human-readable description of the warning

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const designListResultsResponse of client.protein.design.listResults('id')) {
  console.log(designListResultsResponse.id);
}
```

## Stop

`client.protein.design.stop(stringid, RequestOptionsoptions?): DesignStopResponse`

**post** `/compute/v1/protein/design/{id}/stop`

Stop an in-progress protein design run early

### Parameters

- `id: string`

### Returns

- `DesignStopResponse`

  A protein design engine run that generates novel protein binders

  - `id: string`

    Unique ProteinDesignRun identifier

  - `completed_at: string | null`

  - `created_at: string`

  - `data_deleted_at: string | null`

    When the input, output, and result data was permanently deleted. Null if data has not been deleted.

  - `engine: "boltz-protein-design"`

    Engine used for protein design

    - `"boltz-protein-design"`

  - `engine_version: string`

    Engine version used for protein design

  - `error: Error | null`

    - `code: string`

      Machine-readable error code

    - `message: string`

      Human-readable error message

    - `details?: unknown`

      Additional field-level error details keyed by input path, when available.

  - `input: Input | null`

    Pipeline input (null if data deleted)

    - `binder_specification: StructureTemplateBinderSpecResponse | NoTemplateBinderSpecResponse | BoltzCuratedBinderSpecResponse`

      Binder specification for protein design. Use no_template for sequence-defined binders, structure_template for uploaded binder structures, or boltz_curated for Boltz-managed nanobody and antibody defaults.

      - `StructureTemplateBinderSpecResponse`

        Binder specification starting from an existing 3D structure. Upload a CIF/PDB file and select which chains to include, which residues to keep, and which regions to redesign. Only chains included in chain_selection are part of the engine run.

        - `chain_selection: Record<string, StructureTemplatePolymerChainSpec | StructureTemplateLigandChainSpec>`

          Chains selected from the uploaded binder structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep (crop_residues). Omit design_motifs to include the chain as fixed scaffold context.

          - `StructureTemplatePolymerChainSpec`

            Per-chain crop and design specification for a polymer chain in structure_template mode.

            - `chain_type: "polymer"`

              - `"polymer"`

            - `crop_residues: Array<number> | "all"`

              0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are removed before design.

              - `Array<number>`

              - `"all"`

                - `"all"`

            - `design_motifs?: Array<ReplacementMotif | InsertionMotif>`

              Optional motifs (replacement or insertion) defining which regions to redesign on this chain. Omit this field to include the chain as fixed scaffold context.

              - `ReplacementMotif`

                Replace a contiguous region of the sequence with a designed segment. Residues from start_index to end_index (inclusive) are replaced with a new sequence of the specified length.

                - `design_length_range: DesignLengthRange`

                  Allowed sequence length range for designed regions

                  - `max: number`

                    Maximum sequence length in residues. Must be >= min.

                  - `min: number`

                    Minimum sequence length in residues

                - `end_index: number`

                  0-indexed end residue (inclusive)

                - `start_index: number`

                  0-indexed start residue (inclusive)

                - `type: "replacement"`

                  - `"replacement"`

              - `InsertionMotif`

                Insert a designed segment at a specific position in the sequence.

                - `after_residue_index: number`

                  0-indexed position after which to insert. Use -1 to insert before the first residue.

                - `design_length_range: DesignLengthRange`

                  Allowed sequence length range for designed regions

                  - `max: number`

                    Maximum sequence length in residues. Must be >= min.

                  - `min: number`

                    Minimum sequence length in residues

                - `type: "insertion"`

                  - `"insertion"`

          - `StructureTemplateLigandChainSpec`

            Per-chain specification for a ligand chain in structure_template mode. The full ligand is always included.

            - `chain_type: "ligand"`

              - `"ligand"`

        - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

          - `"peptide"`

          - `"antibody"`

          - `"nanobody"`

          - `"custom_protein"`

        - `structure: Structure`

          - `url: string`

            URL to download the file

          - `url_expires_at: string`

            When the presigned URL expires

        - `type: "structure_template"`

          - `"structure_template"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

      - `NoTemplateBinderSpecResponse`

        Binder specification without a structural template. Define the binder from sequence components (fixed and designed segments) without providing a starting 3D structure.

        - `entities: Array<DesignedProteinEntityResponse | FixedProteinEntityResponse | FixedRnaEntityResponse | 3 more>`

          Binder entities composing the design. At least one must be a designed_protein entity. Additional fixed entities (RNA, DNA, ligands) can be included as part of the complex.

          - `DesignedProteinEntityResponse`

            Protein binder entity with designed and/or fixed segments.

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "designed_protein"`

              - `"designed_protein"`

            - `value: string`

              Binder sequence specification. Fixed amino acids are written as literal single-letter codes. Designed regions are written as a length (fixed) or a length range (min..max). Example: "MKTAYI5..10VKSHFSRQ" means fixed MKTAYI, then 5-10 designed residues, then fixed VKSHFSRQ. "20" means 20 fully designed residues. "ACDE8GHI" means fixed ACDE, then 8 designed residues, then fixed GHI.

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedProteinEntityResponse`

            A fixed protein entity whose sequence is not redesigned.

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "protein"`

              - `"protein"`

            - `value: string`

              Amino acid sequence (one-letter codes)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedRnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "rna"`

              - `"rna"`

            - `value: string`

              RNA nucleotide sequence (A, C, G, U, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedDnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "dna"`

              - `"dna"`

            - `value: string`

              DNA nucleotide sequence (A, C, G, T, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Optional polymer modifications. Defaults to [] when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `FixedLigandSmilesEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "ligand_smiles"`

              - `"ligand_smiles"`

            - `value: string`

              SMILES string representing the ligand

          - `FixedLigandCcdEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs to assign to this entity

            - `type: "ligand_ccd"`

              - `"ligand_ccd"`

            - `value: string`

              CCD code from RCSB PDB (e.g. 'ATP', 'ADP')

        - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

          - `"peptide"`

          - `"antibody"`

          - `"nanobody"`

          - `"custom_protein"`

        - `type: "no_template"`

          - `"no_template"`

        - `bonds?: Array<Bond>`

          Covalent bond constraints between atoms in the binder complex. If defining bonds where an atom is part of a designed protein chain, assume residue indices count designed regions as the minimum length. Example: designed protein "1..3C1..2", "C" is residue 1 (0-indexed) of the designed protein.

          - `atom1: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

          - `atom2: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

      - `BoltzCuratedBinderSpecResponse`

        Boltz-managed curated binder specification. Choose a curated nanobody or antibody family and Boltz will select from maintained template lists during design. The curated lists are managed by Boltz and may be updated over time to improve quality and coverage.

        - `binder: "boltz_nanobody" | "boltz_antibody"`

          Boltz-managed curated binder family. Boltz maintains and may update the underlying template lists on behalf of customers.

          - `"boltz_nanobody"`

          - `"boltz_antibody"`

        - `type: "boltz_curated"`

          - `"boltz_curated"`

        - `rules?: Rules`

          Constraints applied during sequence design

          - `excluded_amino_acids?: Array<string>`

            Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

          - `excluded_sequence_motifs?: Array<string>`

            Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

          - `max_hydrophobic_fraction?: number`

            Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

    - `num_proteins: number`

      Number of protein designs to generate. Must be between 10 and 1,000,000.

    - `target: StructureTemplateTargetResponse | NoTemplateTargetResponse`

      Target specification (structure template or template-free)

      - `StructureTemplateTargetResponse`

        Target defined by an uploaded 3D structure (CIF or PDB file). Only chains included in chain_selection are used.

        - `chain_selection: Record<string, StructureTemplateTargetPolymerChainSpec | StructureTemplateTargetLigandChainSpec>`

          Chains selected from the uploaded structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep, which are epitope residues, and which are flexible.

          - `StructureTemplateTargetPolymerChainSpec`

            Per-chain specification for a polymer (protein/RNA/DNA) chain in a structure template target.

            - `chain_type: "polymer"`

              - `"polymer"`

            - `crop_residues: Array<number> | "all"`

              0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are excluded from the engine run.

              - `Array<number>`

              - `"all"`

                - `"all"`

            - `epitope_residues?: Array<number>`

              0-indexed residue indices where binder contact is desired (the epitope). All indices must be present in crop_residues.

            - `flexible_residues?: Array<number>`

              0-indexed residue indices allowed to move during design (e.g. flexible loop regions). All indices must be present in crop_residues.

          - `StructureTemplateTargetLigandChainSpec`

            Per-chain specification for a ligand chain in a structure template target. The full ligand is always included.

            - `chain_type: "ligand"`

              - `"ligand"`

        - `structure: Structure`

          - `url: string`

            URL to download the file

          - `url_expires_at: string`

            When the presigned URL expires

        - `type: "structure_template"`

          - `"structure_template"`

      - `NoTemplateTargetResponse`

        Target defined by sequences only, without a 3D structure template

        - `entities: Array<ProteinEntityResponse | RnaEntityResponse | DnaEntityResponse | 2 more>`

          Entities (proteins, RNA, DNA, ligands) defining the target complex.

          - `ProteinEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "protein"`

              - `"protein"`

            - `value: string`

              Amino acid sequence (one-letter codes)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Post-translational modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `RnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "rna"`

              - `"rna"`

            - `value: string`

              RNA nucleotide sequence (A, C, G, U, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Chemical modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `DnaEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this entity

            - `type: "dna"`

              - `"dna"`

            - `value: string`

              DNA nucleotide sequence (A, C, G, T, N)

            - `cyclic?: boolean`

              Whether the sequence is cyclic

            - `modifications?: Array<CcdModificationResponse | SmilesModificationResponse>`

              Chemical modifications. Optional; defaults to an empty list when omitted.

              - `CcdModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "ccd"`

                  - `"ccd"`

                - `value: string`

                  CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

              - `SmilesModificationResponse`

                - `residue_index: number`

                  0-based index of the residue to modify

                - `type: "smiles"`

                  - `"smiles"`

                - `value: string`

                  SMILES string for the modification

          - `LigandCcdEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this ligand

            - `type: "ligand_ccd"`

              - `"ligand_ccd"`

            - `value: string`

              CCD code (e.g., ATP, ADP)

          - `LigandSmilesEntityResponse`

            - `chain_ids: Array<string>`

              Chain IDs for this ligand

            - `type: "ligand_smiles"`

              - `"ligand_smiles"`

            - `value: string`

              SMILES string representing the ligand

        - `type: "no_template"`

          - `"no_template"`

        - `bonds?: Array<Bond>`

          Covalent bond constraints between atoms in the target complex. Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

          - `atom1: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

          - `atom2: LigandAtomResponse | PolymerAtomResponse`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `LigandAtomResponse`

              Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID containing the atom

              - `type: "ligand_atom"`

                - `"ligand_atom"`

            - `PolymerAtomResponse`

              - `atom_name: string`

                Standardized atom name (verifiable in CIF file on RCSB)

              - `chain_id: string`

                Chain ID containing the atom

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_atom"`

                - `"polymer_atom"`

        - `constraints?: Array<PocketConstraintResponse | ContactConstraintResponse>`

          Structural constraints (pocket and contact). Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

          - `PocketConstraintResponse`

            Constrains the binder to interact with specific pocket residues on the target.

            - `binder_chain_id: string`

              Chain ID of the binder molecule

            - `contact_residues: Record<string, Array<number>>`

              Binding pocket residues keyed by chain ID. Each key is a chain ID (e.g. "A") and the value is an array of 0-indexed residue indices that define the pocket on that chain.

            - `max_distance_angstrom: number`

              Maximum allowed distance in Angstroms between binder and pocket residues. Typical range: 4-8 A.

            - `type: "pocket"`

              - `"pocket"`

            - `force?: boolean`

              Whether to force the constraint

          - `ContactConstraintResponse`

            Contact constraint between two tokens. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `max_distance_angstrom: number`

              Maximum distance in Angstroms

            - `token1: PolymerContactTokenResponse | LigandContactTokenResponse`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `PolymerContactTokenResponse`

                - `chain_id: string`

                  Chain ID

                - `residue_index: number`

                  0-based residue index

                - `type: "polymer_contact"`

                  - `"polymer_contact"`

              - `LigandContactTokenResponse`

                Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

                - `atom_name: string`

                  Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

                - `chain_id: string`

                  Chain ID

                - `type: "ligand_contact"`

                  - `"ligand_contact"`

            - `token2: PolymerContactTokenResponse | LigandContactTokenResponse`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `PolymerContactTokenResponse`

                - `chain_id: string`

                  Chain ID

                - `residue_index: number`

                  0-based residue index

                - `type: "polymer_contact"`

                  - `"polymer_contact"`

              - `LigandContactTokenResponse`

                Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

                - `atom_name: string`

                  Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

                - `chain_id: string`

                  Chain ID

                - `type: "ligand_contact"`

                  - `"ligand_contact"`

            - `type: "contact"`

              - `"contact"`

            - `force?: boolean`

              Whether to force the constraint

        - `epitope_ligand_chains?: Array<string>`

          Chain IDs of ligand entities that are part of the binding epitope. Ligands are marked as epitope in full (no residue-level selection).

        - `epitope_residues?: Record<string, Array<number>>`

          Polymer chain residues where binder contact is desired (the epitope). Each key is a chain ID of a polymer entity, each value is an array of 0-indexed residue indices.

    - `idempotency_key?: string`

      Client-provided key to prevent duplicate submissions on retries

    - `workspace_id?: string`

      Target workspace ID (admin keys only; ignored for workspace keys)

  - `livemode: boolean`

    Whether this resource was created with a live API key.

  - `progress: Progress | null`

    - `num_proteins_generated: number`

      Number of protein binders generated so far

    - `total_proteins_to_generate: number`

      Total number of protein binders requested

    - `latest_result_id?: string`

      ID of the most recently generated result

  - `started_at: string | null`

  - `status: "pending" | "running" | "succeeded" | 2 more`

    - `"pending"`

    - `"running"`

    - `"succeeded"`

    - `"failed"`

    - `"stopped"`

  - `stopped_at: string | null`

  - `workspace_id: string`

    Workspace ID

  - `idempotency_key?: string`

    Client-provided idempotency key

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

const response = await client.protein.design.stop('id');

console.log(response.id);
```

## Delete Data

`client.protein.design.deleteData(stringid, RequestOptionsoptions?): DesignDeleteDataResponse`

**post** `/compute/v1/protein/design/{id}/delete-data`

Permanently delete the input, output, and result data associated with this design run. The design run record itself is retained with a `data_deleted_at` timestamp. This action is irreversible.

### Parameters

- `id: string`

### Returns

- `DesignDeleteDataResponse`

  - `id: string`

    ID of the resource whose data was deleted

  - `data_deleted: true`

    - `true`

  - `data_deleted_at: string`

    When the data was deleted

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

const response = await client.protein.design.deleteData('id');

console.log(response.id);
```

## Estimate Cost

`client.protein.design.estimateCost(DesignEstimateCostParamsbody, RequestOptionsoptions?): DesignEstimateCostResponse`

**post** `/compute/v1/protein/design/estimate-cost`

Estimate the cost of a protein design run without creating any resource or consuming GPU.

### Parameters

- `body: DesignEstimateCostParams`

  - `binder_specification: StructureTemplateBinderSpec | NoTemplateBinderSpec | BoltzCuratedBinderSpec`

    Binder specification for protein design. Use no_template for sequence-defined binders, structure_template for uploaded binder structures, or boltz_curated for Boltz-managed nanobody and antibody defaults.

    - `StructureTemplateBinderSpec`

      Binder specification starting from an existing 3D structure. Upload a CIF/PDB file and select which chains to include, which residues to keep, and which regions to redesign. Only chains included in chain_selection are part of the engine run.

      - `chain_selection: Record<string, StructureTemplatePolymerChainSpec | StructureTemplateLigandChainSpec>`

        Chains selected from the uploaded binder structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep (crop_residues). Omit design_motifs to include the chain as fixed scaffold context.

        - `StructureTemplatePolymerChainSpec`

          Per-chain crop and design specification for a polymer chain in structure_template mode.

          - `chain_type: "polymer"`

            - `"polymer"`

          - `crop_residues: Array<number> | "all"`

            0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are removed before design.

            - `Array<number>`

            - `"all"`

              - `"all"`

          - `design_motifs?: Array<ReplacementMotif | InsertionMotif>`

            Optional motifs (replacement or insertion) defining which regions to redesign on this chain. Omit this field to include the chain as fixed scaffold context.

            - `ReplacementMotif`

              Replace a contiguous region of the sequence with a designed segment. Residues from start_index to end_index (inclusive) are replaced with a new sequence of the specified length.

              - `design_length_range: DesignLengthRange`

                Allowed sequence length range for designed regions

                - `max: number`

                  Maximum sequence length in residues. Must be >= min.

                - `min: number`

                  Minimum sequence length in residues

              - `end_index: number`

                0-indexed end residue (inclusive)

              - `start_index: number`

                0-indexed start residue (inclusive)

              - `type: "replacement"`

                - `"replacement"`

            - `InsertionMotif`

              Insert a designed segment at a specific position in the sequence.

              - `after_residue_index: number`

                0-indexed position after which to insert. Use -1 to insert before the first residue.

              - `design_length_range: DesignLengthRange`

                Allowed sequence length range for designed regions

                - `max: number`

                  Maximum sequence length in residues. Must be >= min.

                - `min: number`

                  Minimum sequence length in residues

              - `type: "insertion"`

                - `"insertion"`

        - `StructureTemplateLigandChainSpec`

          Per-chain specification for a ligand chain in structure_template mode. The full ligand is always included.

          - `chain_type: "ligand"`

            - `"ligand"`

      - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

        - `"peptide"`

        - `"antibody"`

        - `"nanobody"`

        - `"custom_protein"`

      - `structure: URLSource | CifBase64Source`

        How to provide a CIF structure file. URLs are auto-detected; base64 uploads must use chemical/x-cif media type.

        - `URLSource`

          - `type: "url"`

            - `"url"`

          - `url: string`

        - `CifBase64Source`

          - `data: string`

            Base64-encoded CIF file contents

          - `media_type: "chemical/x-cif"`

            Must be chemical/x-cif for CIF files

            - `"chemical/x-cif"`

          - `type: "base64"`

            - `"base64"`

      - `type: "structure_template"`

        - `"structure_template"`

      - `rules?: Rules`

        Constraints applied during sequence design

        - `excluded_amino_acids?: Array<string>`

          Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

        - `excluded_sequence_motifs?: Array<string>`

          Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

        - `max_hydrophobic_fraction?: number`

          Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

    - `NoTemplateBinderSpec`

      Binder specification without a structural template. Define the binder from sequence components (fixed and designed segments) without providing a starting 3D structure.

      - `entities: Array<DesignedProteinEntity | FixedProteinEntity | FixedRnaEntity | 3 more>`

        Binder entities composing the design. At least one must be a designed_protein entity. Additional fixed entities (RNA, DNA, ligands) can be included as part of the complex.

        - `DesignedProteinEntity`

          Protein binder entity with designed and/or fixed segments.

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "designed_protein"`

            - `"designed_protein"`

          - `value: string`

            Binder sequence specification. Fixed amino acids are written as literal single-letter codes. Designed regions are written as a length (fixed) or a length range (min..max). Example: "MKTAYI5..10VKSHFSRQ" means fixed MKTAYI, then 5-10 designed residues, then fixed VKSHFSRQ. "20" means 20 fully designed residues. "ACDE8GHI" means fixed ACDE, then 8 designed residues, then fixed GHI.

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedProteinEntity`

          A fixed protein entity whose sequence is not redesigned.

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "protein"`

            - `"protein"`

          - `value: string`

            Amino acid sequence (one-letter codes)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedRnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "rna"`

            - `"rna"`

          - `value: string`

            RNA nucleotide sequence (A, C, G, U, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedDnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "dna"`

            - `"dna"`

          - `value: string`

            DNA nucleotide sequence (A, C, G, T, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Optional polymer modifications. Defaults to [] when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `FixedLigandSmilesEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "ligand_smiles"`

            - `"ligand_smiles"`

          - `value: string`

            SMILES string representing the ligand

        - `FixedLigandCcdEntity`

          - `chain_ids: Array<string>`

            Chain IDs to assign to this entity

          - `type: "ligand_ccd"`

            - `"ligand_ccd"`

          - `value: string`

            CCD code from RCSB PDB (e.g. 'ATP', 'ADP')

      - `modality: "peptide" | "antibody" | "nanobody" | "custom_protein"`

        - `"peptide"`

        - `"antibody"`

        - `"nanobody"`

        - `"custom_protein"`

      - `type: "no_template"`

        - `"no_template"`

      - `bonds?: Array<Bond>`

        Covalent bond constraints between atoms in the binder complex. If defining bonds where an atom is part of a designed protein chain, assume residue indices count designed regions as the minimum length. Example: designed protein "1..3C1..2", "C" is residue 1 (0-indexed) of the designed protein.

        - `atom1: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

        - `atom2: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

      - `rules?: Rules`

        Constraints applied during sequence design

        - `excluded_amino_acids?: Array<string>`

          Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

        - `excluded_sequence_motifs?: Array<string>`

          Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

        - `max_hydrophobic_fraction?: number`

          Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

    - `BoltzCuratedBinderSpec`

      Boltz-managed curated binder specification. Choose a curated nanobody or antibody family and Boltz will select from maintained template lists during design. The curated lists are managed by Boltz and may be updated over time to improve quality and coverage.

      - `binder: "boltz_nanobody" | "boltz_antibody"`

        Boltz-managed curated binder family. Boltz maintains and may update the underlying template lists on behalf of customers.

        - `"boltz_nanobody"`

        - `"boltz_antibody"`

      - `type: "boltz_curated"`

        - `"boltz_curated"`

      - `rules?: Rules`

        Constraints applied during sequence design

        - `excluded_amino_acids?: Array<string>`

          Single-letter amino acid codes to exclude from design (e.g. ['C', 'P'] to exclude cysteine and proline)

        - `excluded_sequence_motifs?: Array<string>`

          Sequence motifs to exclude from designed regions. Designs containing any of these motifs are filtered out before scoring. Use X as a single-residue wildcard (e.g. "NGS", "NXS").

        - `max_hydrophobic_fraction?: number`

          Maximum allowed fraction of hydrophobic residues (I, L, V, M, F, W) in designed regions. Designs exceeding this threshold are filtered out before scoring. Leave empty to disable.

  - `num_proteins: number`

    Number of protein designs to generate. Must be between 10 and 1,000,000.

  - `target: StructureTemplateTarget | NoTemplateTarget`

    Target specification (structure template or template-free)

    - `StructureTemplateTarget`

      Target defined by an uploaded 3D structure (CIF or PDB file). Only chains included in chain_selection are used.

      - `chain_selection: Record<string, StructureTemplateTargetPolymerChainSpec | StructureTemplateTargetLigandChainSpec>`

        Chains selected from the uploaded structure, keyed by chain ID. Only chains listed here are included in the engine run — any chains omitted from this mapping are ignored. Each value defines which residues to keep, which are epitope residues, and which are flexible.

        - `StructureTemplateTargetPolymerChainSpec`

          Per-chain specification for a polymer (protein/RNA/DNA) chain in a structure template target.

          - `chain_type: "polymer"`

            - `"polymer"`

          - `crop_residues: Array<number> | "all"`

            0-indexed residue indices to retain from this chain, or 'all' to keep all residues. Residues not listed are excluded from the engine run.

            - `Array<number>`

            - `"all"`

              - `"all"`

          - `epitope_residues?: Array<number>`

            0-indexed residue indices where binder contact is desired (the epitope). All indices must be present in crop_residues.

          - `flexible_residues?: Array<number>`

            0-indexed residue indices allowed to move during design (e.g. flexible loop regions). All indices must be present in crop_residues.

        - `StructureTemplateTargetLigandChainSpec`

          Per-chain specification for a ligand chain in a structure template target. The full ligand is always included.

          - `chain_type: "ligand"`

            - `"ligand"`

      - `structure: URLSource | CifBase64Source`

        How to provide a CIF structure file. URLs are auto-detected; base64 uploads must use chemical/x-cif media type.

        - `URLSource`

          - `type: "url"`

            - `"url"`

          - `url: string`

        - `CifBase64Source`

          - `data: string`

            Base64-encoded CIF file contents

          - `media_type: "chemical/x-cif"`

            Must be chemical/x-cif for CIF files

            - `"chemical/x-cif"`

          - `type: "base64"`

            - `"base64"`

      - `type: "structure_template"`

        - `"structure_template"`

    - `NoTemplateTarget`

      Target defined by sequences only, without a 3D structure template

      - `entities: Array<ProteinEntity | RnaEntity | DnaEntity | 2 more>`

        Entities (proteins, RNA, DNA, ligands) defining the target complex.

        - `ProteinEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this entity

          - `type: "protein"`

            - `"protein"`

          - `value: string`

            Amino acid sequence (one-letter codes)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Post-translational modifications. Optional; defaults to an empty list when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `RnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this entity

          - `type: "rna"`

            - `"rna"`

          - `value: string`

            RNA nucleotide sequence (A, C, G, U, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Chemical modifications. Optional; defaults to an empty list when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `DnaEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this entity

          - `type: "dna"`

            - `"dna"`

          - `value: string`

            DNA nucleotide sequence (A, C, G, T, N)

          - `cyclic?: boolean`

            Whether the sequence is cyclic

          - `modifications?: Array<CcdModification | SmilesModification>`

            Chemical modifications. Optional; defaults to an empty list when omitted.

            - `CcdModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "ccd"`

                - `"ccd"`

              - `value: string`

                CCD code from RCSB PDB (e.g. 'MSE' for selenomethionine, 'SEP' for phosphoserine)

            - `SmilesModification`

              - `residue_index: number`

                0-based index of the residue to modify

              - `type: "smiles"`

                - `"smiles"`

              - `value: string`

                SMILES string for the modification

        - `LigandCcdEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this ligand

          - `type: "ligand_ccd"`

            - `"ligand_ccd"`

          - `value: string`

            CCD code (e.g., ATP, ADP)

        - `LigandSmilesEntity`

          - `chain_ids: Array<string>`

            Chain IDs for this ligand

          - `type: "ligand_smiles"`

            - `"ligand_smiles"`

          - `value: string`

            SMILES string representing the ligand

      - `type: "no_template"`

        - `"no_template"`

      - `bonds?: Array<Bond>`

        Covalent bond constraints between atoms in the target complex. Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

        - `atom1: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

        - `atom2: LigandAtom | PolymerAtom`

          Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `LigandAtom`

            Ligand atom reference. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB). Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

            - `chain_id: string`

              Chain ID containing the atom

            - `type: "ligand_atom"`

              - `"ligand_atom"`

          - `PolymerAtom`

            - `atom_name: string`

              Standardized atom name (verifiable in CIF file on RCSB)

            - `chain_id: string`

              Chain ID containing the atom

            - `residue_index: number`

              0-based residue index

            - `type: "polymer_atom"`

              - `"polymer_atom"`

      - `constraints?: Array<PocketConstraint | ContactConstraint>`

        Structural constraints (pocket and contact). Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

        - `PocketConstraint`

          Constrains the binder to interact with specific pocket residues on the target.

          - `binder_chain_id: string`

            Chain ID of the binder molecule

          - `contact_residues: Record<string, Array<number>>`

            Binding pocket residues keyed by chain ID. Each key is a chain ID (e.g. "A") and the value is an array of 0-indexed residue indices that define the pocket on that chain.

          - `max_distance_angstrom: number`

            Maximum allowed distance in Angstroms between binder and pocket residues. Typical range: 4-8 A.

          - `type: "pocket"`

            - `"pocket"`

          - `force?: boolean`

            Whether to force the constraint

        - `ContactConstraint`

          Contact constraint between two tokens. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

          - `max_distance_angstrom: number`

            Maximum distance in Angstroms

          - `token1: PolymerContactToken | LigandContactToken`

            Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `PolymerContactToken`

              - `chain_id: string`

                Chain ID

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_contact"`

                - `"polymer_contact"`

            - `LigandContactToken`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID

              - `type: "ligand_contact"`

                - `"ligand_contact"`

          - `token2: PolymerContactToken | LigandContactToken`

            Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

            - `PolymerContactToken`

              - `chain_id: string`

                Chain ID

              - `residue_index: number`

                0-based residue index

              - `type: "polymer_contact"`

                - `"polymer_contact"`

            - `LigandContactToken`

              Ligand contact token. Atom-level ligand references currently support ligand_ccd entities only; ligand_smiles is unsupported.

              - `atom_name: string`

                Atom name. Atom-level references to ligand_smiles entities are currently unsupported; use ligand_ccd instead.

              - `chain_id: string`

                Chain ID

              - `type: "ligand_contact"`

                - `"ligand_contact"`

          - `type: "contact"`

            - `"contact"`

          - `force?: boolean`

            Whether to force the constraint

      - `epitope_ligand_chains?: Array<string>`

        Chain IDs of ligand entities that are part of the binding epitope. Ligands are marked as epitope in full (no residue-level selection).

      - `epitope_residues?: Record<string, Array<number>>`

        Polymer chain residues where binder contact is desired (the epitope). Each key is a chain ID of a polymer entity, each value is an array of 0-indexed residue indices.

  - `idempotency_key?: string`

    Client-provided key to prevent duplicate submissions on retries

  - `workspace_id?: string`

    Target workspace ID (admin keys only; ignored for workspace keys)

### Returns

- `DesignEstimateCostResponse`

  Estimate response with monetary values encoded as decimal strings to preserve precision.

  - `breakdown: Breakdown`

    Cost breakdown for the billed application.

    - `application: "structure_and_binding" | "small_molecule_design" | "small_molecule_library_screen" | 3 more`

      - `"structure_and_binding"`

      - `"small_molecule_design"`

      - `"small_molecule_library_screen"`

      - `"protein_design"`

      - `"protein_library_screen"`

      - `"adme"`

    - `cost_per_unit_usd: string`

      Estimated cost per displayed unit as a decimal string, rounded up to 4 decimal places. This may include token-size multipliers or generation overhead; estimated_cost_usd is the authoritative total.

    - `num_units: number`

      Number of units shown for the estimate. For structure-and-binding, this is the requested number of samples. For protein and small-molecule design/screen endpoints, this is the requested number of proteins or molecules.

  - `disclaimer: string`

  - `estimated_cost_usd: string`

    Estimated total cost as a decimal string

### Example

```typescript
import Boltz from 'boltz-api';

const client = new Boltz({
  apiKey: process.env['BOLTZ_API_KEY'], // This is the default and can be omitted
});

const response = await client.protein.design.estimateCost({
  binder_specification: {
    chain_selection: {
      B: { chain_type: 'polymer', crop_residues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] },
    },
    modality: 'peptide',
    structure: { type: 'url', url: 'https://example.com' },
    type: 'structure_template',
  },
  num_proteins: 10,
  target: {
    chain_selection: {
      A: { chain_type: 'polymer', crop_residues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] },
    },
    structure: { type: 'url', url: 'https://example.com' },
    type: 'structure_template',
  },
});

console.log(response.breakdown);
```
