## Estimate Cost

`client.Predictions.StructureAndBinding.EstimateCost(ctx, body) (*PredictionStructureAndBindingEstimateCostResponse, error)`

**post** `/compute/v1/predictions/structure-and-binding/estimate-cost`

Estimate the cost of a prediction without creating any resource or consuming GPU.

### Parameters

- `body PredictionStructureAndBindingEstimateCostParams`

  - `Input param.Field[PredictionStructureAndBindingEstimateCostParamsInput]`

    - `Entities []PredictionStructureAndBindingEstimateCostParamsInputEntityUnion`

      Entities (proteins, RNA, DNA, ligands) forming the complex to predict. Order determines chain assignment.

      - `type PredictionStructureAndBindingEstimateCostParamsInputEntityProteinEntity struct{…}`

        - `ChainIDs []string`

          Chain IDs for this entity

        - `Type Protein`

          - `const ProteinProtein Protein = "protein"`

        - `Value string`

          Amino acid sequence (one-letter codes)

        - `Cyclic bool`

          Whether the sequence is cyclic

        - `Modifications []PredictionStructureAndBindingEstimateCostParamsInputEntityProteinEntityModificationUnion`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputEntityProteinEntityModificationCcdModification struct{…}`

            - `ResidueIndex int64`

              0-based index of the residue to modify

            - `Type Ccd`

              - `const CcdCcd Ccd = "ccd"`

            - `Value string`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputEntityProteinEntityModificationSmilesModification struct{…}`

            - `ResidueIndex int64`

              0-based index of the residue to modify

            - `Type Smiles`

              - `const SmilesSmiles Smiles = "smiles"`

            - `Value string`

              SMILES string for the modification

      - `type PredictionStructureAndBindingEstimateCostParamsInputEntityRnaEntity struct{…}`

        - `ChainIDs []string`

          Chain IDs for this entity

        - `Type Rna`

          - `const RnaRna Rna = "rna"`

        - `Value string`

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

        - `Cyclic bool`

          Whether the sequence is cyclic

        - `Modifications []PredictionStructureAndBindingEstimateCostParamsInputEntityRnaEntityModificationUnion`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputEntityRnaEntityModificationCcdModification struct{…}`

            - `ResidueIndex int64`

              0-based index of the residue to modify

            - `Type Ccd`

              - `const CcdCcd Ccd = "ccd"`

            - `Value string`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputEntityRnaEntityModificationSmilesModification struct{…}`

            - `ResidueIndex int64`

              0-based index of the residue to modify

            - `Type Smiles`

              - `const SmilesSmiles Smiles = "smiles"`

            - `Value string`

              SMILES string for the modification

      - `type PredictionStructureAndBindingEstimateCostParamsInputEntityDnaEntity struct{…}`

        - `ChainIDs []string`

          Chain IDs for this entity

        - `Type Dna`

          - `const DnaDna Dna = "dna"`

        - `Value string`

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

        - `Cyclic bool`

          Whether the sequence is cyclic

        - `Modifications []PredictionStructureAndBindingEstimateCostParamsInputEntityDnaEntityModificationUnion`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputEntityDnaEntityModificationCcdModification struct{…}`

            - `ResidueIndex int64`

              0-based index of the residue to modify

            - `Type Ccd`

              - `const CcdCcd Ccd = "ccd"`

            - `Value string`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputEntityDnaEntityModificationSmilesModification struct{…}`

            - `ResidueIndex int64`

              0-based index of the residue to modify

            - `Type Smiles`

              - `const SmilesSmiles Smiles = "smiles"`

            - `Value string`

              SMILES string for the modification

      - `type PredictionStructureAndBindingEstimateCostParamsInputEntityLigandCcdEntity struct{…}`

        - `ChainIDs []string`

          Chain IDs for this ligand

        - `Type LigandCcd`

          - `const LigandCcdLigandCcd LigandCcd = "ligand_ccd"`

        - `Value string`

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

      - `type PredictionStructureAndBindingEstimateCostParamsInputEntityLigandSmilesEntity struct{…}`

        - `ChainIDs []string`

          Chain IDs for this ligand

        - `Type LigandSmiles`

          - `const LigandSmilesLigandSmiles LigandSmiles = "ligand_smiles"`

        - `Value string`

          SMILES string representing the ligand

    - `Binding PredictionStructureAndBindingEstimateCostParamsInputBindingUnion`

      - `type PredictionStructureAndBindingEstimateCostParamsInputBindingLigandProteinBinding struct{…}`

        - `BinderChainID string`

          Chain ID of the ligand binder (must have exactly 1 copy, <50 atoms, and only ligands+proteins in entities)

        - `Type LigandProteinBinding`

          - `const LigandProteinBindingLigandProteinBinding LigandProteinBinding = "ligand_protein_binding"`

      - `type PredictionStructureAndBindingEstimateCostParamsInputBindingProteinProteinBinding struct{…}`

        - `BinderChainIDs []string`

          Chain IDs of the protein binders

        - `Type ProteinProteinBinding`

          - `const ProteinProteinBindingProteinProteinBinding ProteinProteinBinding = "protein_protein_binding"`

    - `Bonds []PredictionStructureAndBindingEstimateCostParamsInputBond`

      Bond constraints between atoms. Atom-level ligand references currently support ligand_ccd only; ligand_smiles is unsupported.

      - `Atom1 PredictionStructureAndBindingEstimateCostParamsInputBondAtom1Union`

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

        - `type PredictionStructureAndBindingEstimateCostParamsInputBondAtom1LigandAtom struct{…}`

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

          - `AtomName string`

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

          - `ChainID string`

            Chain ID containing the atom

          - `Type LigandAtom`

            - `const LigandAtomLigandAtom LigandAtom = "ligand_atom"`

        - `type PredictionStructureAndBindingEstimateCostParamsInputBondAtom1PolymerAtom struct{…}`

          - `AtomName string`

            Standardized atom name (verifiable in CIF file on RCSB)

          - `ChainID string`

            Chain ID containing the atom

          - `ResidueIndex int64`

            0-based residue index

          - `Type PolymerAtom`

            - `const PolymerAtomPolymerAtom PolymerAtom = "polymer_atom"`

      - `Atom2 PredictionStructureAndBindingEstimateCostParamsInputBondAtom2Union`

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

        - `type PredictionStructureAndBindingEstimateCostParamsInputBondAtom2LigandAtom struct{…}`

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

          - `AtomName string`

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

          - `ChainID string`

            Chain ID containing the atom

          - `Type LigandAtom`

            - `const LigandAtomLigandAtom LigandAtom = "ligand_atom"`

        - `type PredictionStructureAndBindingEstimateCostParamsInputBondAtom2PolymerAtom struct{…}`

          - `AtomName string`

            Standardized atom name (verifiable in CIF file on RCSB)

          - `ChainID string`

            Chain ID containing the atom

          - `ResidueIndex int64`

            0-based residue index

          - `Type PolymerAtom`

            - `const PolymerAtomPolymerAtom PolymerAtom = "polymer_atom"`

    - `Constraints []PredictionStructureAndBindingEstimateCostParamsInputConstraintUnion`

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

      - `type PredictionStructureAndBindingEstimateCostParamsInputConstraintPocketConstraint struct{…}`

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

        - `BinderChainID string`

          Chain ID of the binder molecule

        - `ContactResidues map[string, []int64]`

          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.

        - `MaxDistanceAngstrom float64`

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

        - `Type Pocket`

          - `const PocketPocket Pocket = "pocket"`

        - `Force bool`

          Whether to force the constraint

      - `type PredictionStructureAndBindingEstimateCostParamsInputConstraintContactConstraint struct{…}`

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

        - `MaxDistanceAngstrom float64`

          Maximum distance in Angstroms

        - `Token1 PredictionStructureAndBindingEstimateCostParamsInputConstraintContactConstraintToken1Union`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputConstraintContactConstraintToken1PolymerContactToken struct{…}`

            - `ChainID string`

              Chain ID

            - `ResidueIndex int64`

              0-based residue index

            - `Type PolymerContact`

              - `const PolymerContactPolymerContact PolymerContact = "polymer_contact"`

          - `type PredictionStructureAndBindingEstimateCostParamsInputConstraintContactConstraintToken1LigandContactToken struct{…}`

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

            - `AtomName string`

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

            - `ChainID string`

              Chain ID

            - `Type LigandContact`

              - `const LigandContactLigandContact LigandContact = "ligand_contact"`

        - `Token2 PredictionStructureAndBindingEstimateCostParamsInputConstraintContactConstraintToken2Union`

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

          - `type PredictionStructureAndBindingEstimateCostParamsInputConstraintContactConstraintToken2PolymerContactToken struct{…}`

            - `ChainID string`

              Chain ID

            - `ResidueIndex int64`

              0-based residue index

            - `Type PolymerContact`

              - `const PolymerContactPolymerContact PolymerContact = "polymer_contact"`

          - `type PredictionStructureAndBindingEstimateCostParamsInputConstraintContactConstraintToken2LigandContactToken struct{…}`

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

            - `AtomName string`

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

            - `ChainID string`

              Chain ID

            - `Type LigandContact`

              - `const LigandContactLigandContact LigandContact = "ligand_contact"`

        - `Type Contact`

          - `const ContactContact Contact = "contact"`

        - `Force bool`

          Whether to force the constraint

    - `ModelOptions PredictionStructureAndBindingEstimateCostParamsInputModelOptions`

      - `RecyclingSteps int64`

        The number of recycling steps to use for prediction. Default is 3.

      - `SamplingSteps int64`

        The number of sampling steps to use for prediction. Default is 200.

      - `StepScale float64`

        Diffusion step scale (temperature). Controls sampling diversity — higher values produce more varied structures. Default is 1.638.

    - `NumSamples int64`

      Number of structure samples to generate

  - `Model param.Field[Boltz2_1]`

    Model to use for prediction

    - `const Boltz2_1Boltz2_1 Boltz2_1 = "boltz-2.1"`

  - `IdempotencyKey param.Field[string]`

    Client-provided key to prevent duplicate submissions on retries

  - `WorkspaceID param.Field[string]`

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

### Returns

- `type PredictionStructureAndBindingEstimateCostResponse struct{…}`

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

  - `Breakdown PredictionStructureAndBindingEstimateCostResponseBreakdown`

    Cost breakdown for the billed application.

    - `Application PredictionStructureAndBindingEstimateCostResponseBreakdownApplication`

      - `const PredictionStructureAndBindingEstimateCostResponseBreakdownApplicationStructureAndBinding PredictionStructureAndBindingEstimateCostResponseBreakdownApplication = "structure_and_binding"`

      - `const PredictionStructureAndBindingEstimateCostResponseBreakdownApplicationSmallMoleculeDesign PredictionStructureAndBindingEstimateCostResponseBreakdownApplication = "small_molecule_design"`

      - `const PredictionStructureAndBindingEstimateCostResponseBreakdownApplicationSmallMoleculeLibraryScreen PredictionStructureAndBindingEstimateCostResponseBreakdownApplication = "small_molecule_library_screen"`

      - `const PredictionStructureAndBindingEstimateCostResponseBreakdownApplicationProteinDesign PredictionStructureAndBindingEstimateCostResponseBreakdownApplication = "protein_design"`

      - `const PredictionStructureAndBindingEstimateCostResponseBreakdownApplicationProteinLibraryScreen PredictionStructureAndBindingEstimateCostResponseBreakdownApplication = "protein_library_screen"`

      - `const PredictionStructureAndBindingEstimateCostResponseBreakdownApplicationAdme PredictionStructureAndBindingEstimateCostResponseBreakdownApplication = "adme"`

    - `CostPerUnitUsd 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.

    - `NumUnits int64`

      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`

  - `EstimatedCostUsd string`

    Estimated total cost as a decimal string

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/boltz-bio/boltz-api-go"
  "github.com/boltz-bio/boltz-api-go/option"
)

func main() {
  client := boltzapi.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Predictions.StructureAndBinding.EstimateCost(context.TODO(), boltzapi.PredictionStructureAndBindingEstimateCostParams{
    Input: boltzapi.PredictionStructureAndBindingEstimateCostParamsInput{
      Entities: []boltzapi.PredictionStructureAndBindingEstimateCostParamsInputEntityUnion{boltzapi.PredictionStructureAndBindingEstimateCostParamsInputEntityUnion{
        OfPredictionStructureAndBindingEstimateCostsInputEntityProteinEntity: &boltzapi.PredictionStructureAndBindingEstimateCostParamsInputEntityProteinEntity{
          ChainIDs: []string{"string"},
          Value: "value",
        },
      }},
    },
    Model: "boltz-2.1",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Breakdown)
}
```
