## Estimate cost for a protein sequence redesign run

`client.Protein.SequenceRedesign.EstimateCost(ctx, body) (*ProteinSequenceRedesignEstimateCostResponse, error)`

**post** `/compute/v1/protein/sequence-redesign/estimate-cost`

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

### Parameters

- `body ProteinSequenceRedesignEstimateCostParams`

  - `Entities param.Field[[]ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityUnion]`

    Every chain in the input CIF, assigned exactly once as target or binder.

    - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignTargetEntity`

      - `ChainID string`

      - `Role Target`

        - `const TargetTarget Target = "target"`

      - `Type FromTemplate`

        - `const FromTemplateFromTemplate FromTemplate = "from_template"`

    - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntity`

      - `ChainID string`

      - `Role Binder`

        - `const BinderBinder Binder = "binder"`

      - `Type FromTemplate`

        - `const FromTemplateFromTemplate FromTemplate = "from_template"`

      - `DesignMotifs []ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotif`

        Residues to redesign. Omit this field to keep the binder chain fixed.

        - `Filters []ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilterUnion`

          Filters applied to this motif in addition to global_design_filters.

          - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilterExcludedAminoAcidsDesignFilter`

            - `AminoAcids []string`

              Single-letter amino-acid codes that must not occur in the filtered designed region.

            - `Type ExcludedAminoAcids`

              - `const ExcludedAminoAcidsExcludedAminoAcids ExcludedAminoAcids = "excluded_amino_acids"`

          - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilterMaxHydrophobicFractionDesignFilter`

            - `MaxFraction float64`

            - `Type MaxHydrophobicFraction`

              - `const MaxHydrophobicFractionMaxHydrophobicFraction MaxHydrophobicFraction = "max_hydrophobic_fraction"`

          - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilterExcludedSequenceMotifsDesignFilter`

            - `Motifs []string`

              Sequence motifs that must not occur. X matches any single residue.

            - `Type ExcludedSequenceMotifs`

              - `const ExcludedSequenceMotifsExcludedSequenceMotifs ExcludedSequenceMotifs = "excluded_sequence_motifs"`

        - `Residues []int64`

          0-indexed residues to redesign on this chain.

        - `Type Residues`

          - `const ResiduesResidues Residues = "residues"`

  - `NumProteins param.Field[int64]`

    Number of unique filter-passing redesigned proteins to generate.

  - `Structure param.Field[ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputStructureUnion]`

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

    - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputStructureURLSource`

      - `Type URL`

        - `const URLURL URL = "url"`

      - `URL string`

    - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputStructureCifBase64Source`

      - `Data string`

        Base64-encoded CIF file contents

      - `MediaType ChemicalXCif`

        Must be chemical/x-cif for CIF files

        - `const ChemicalXCifChemicalXCif ChemicalXCif = "chemical/x-cif"`

      - `Type Base64`

        - `const Base64Base64 Base64 = "base64"`

  - `Type param.Field[Binder]`

    - `const BinderBinder Binder = "binder"`

  - `GlobalDesignFilters param.Field[[]ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputGlobalDesignFilterUnion]`

    Filters applied to every redesigned region. When omitted, cysteine is excluded. Pass [] to disable global filters.

    - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputGlobalDesignFilterExcludedAminoAcidsDesignFilter`

      - `AminoAcids []string`

        Single-letter amino-acid codes that must not occur in the filtered designed region.

      - `Type ExcludedAminoAcids`

        - `const ExcludedAminoAcidsExcludedAminoAcids ExcludedAminoAcids = "excluded_amino_acids"`

    - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputGlobalDesignFilterMaxHydrophobicFractionDesignFilter`

      - `MaxFraction float64`

      - `Type MaxHydrophobicFraction`

        - `const MaxHydrophobicFractionMaxHydrophobicFraction MaxHydrophobicFraction = "max_hydrophobic_fraction"`

    - `ProteinSequenceRedesignEstimateCostParamsBinderProteinSequenceRedesignRunInputGlobalDesignFilterExcludedSequenceMotifsDesignFilter`

      - `Motifs []string`

        Sequence motifs that must not occur. X matches any single residue.

      - `Type ExcludedSequenceMotifs`

        - `const ExcludedSequenceMotifsExcludedSequenceMotifs ExcludedSequenceMotifs = "excluded_sequence_motifs"`

  - `IdempotencyKey param.Field[string]`

  - `WorkspaceID param.Field[string]`

    Workspace to run this redesign in.

### Returns

- `type ProteinSequenceRedesignEstimateCostResponse struct{…}`

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

  - `Breakdown ProteinSequenceRedesignEstimateCostResponseBreakdown`

    Cost breakdown for the billed application.

    - `Application ProteinSequenceRedesignEstimateCostResponseBreakdownApplication`

      - `const ProteinSequenceRedesignEstimateCostResponseBreakdownApplicationStructureAndBinding ProteinSequenceRedesignEstimateCostResponseBreakdownApplication = "structure_and_binding"`

      - `const ProteinSequenceRedesignEstimateCostResponseBreakdownApplicationSmallMoleculeDesign ProteinSequenceRedesignEstimateCostResponseBreakdownApplication = "small_molecule_design"`

      - `const ProteinSequenceRedesignEstimateCostResponseBreakdownApplicationSmallMoleculeLibraryScreen ProteinSequenceRedesignEstimateCostResponseBreakdownApplication = "small_molecule_library_screen"`

      - `const ProteinSequenceRedesignEstimateCostResponseBreakdownApplicationProteinDesign ProteinSequenceRedesignEstimateCostResponseBreakdownApplication = "protein_design"`

      - `const ProteinSequenceRedesignEstimateCostResponseBreakdownApplicationProteinRedesign ProteinSequenceRedesignEstimateCostResponseBreakdownApplication = "protein_redesign"`

      - `const ProteinSequenceRedesignEstimateCostResponseBreakdownApplicationProteinLibraryScreen ProteinSequenceRedesignEstimateCostResponseBreakdownApplication = "protein_library_screen"`

      - `const ProteinSequenceRedesignEstimateCostResponseBreakdownApplicationAdme ProteinSequenceRedesignEstimateCostResponseBreakdownApplication = "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 billable units in the estimate. The unit depends on the endpoint: samples for structure-and-binding, molecules for ADME, and requested proteins or molecules for design/screen endpoints.

  - `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.Protein.SequenceRedesign.EstimateCost(context.TODO(), boltzapi.ProteinSequenceRedesignEstimateCostParams{
    OfBinderProteinSequenceRedesignRunInput: &boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInput{
      Entities: []boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInputEntityUnion{boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInputEntityUnion{
        OfProteinSequenceRedesignEstimateCostsBodyBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignTargetEntity: &boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignTargetEntity{
          ChainID: "x",
        },
      }, boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInputEntityUnion{
        OfProteinSequenceRedesignEstimateCostsBodyBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignTargetEntity: &boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignTargetEntity{
          ChainID: "x",
        },
      }},
      NumProteins: 1,
      Structure: boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInputStructureUnion{
        OfProteinSequenceRedesignEstimateCostsBodyBinderProteinSequenceRedesignRunInputStructureURLSource: &boltzapi.ProteinSequenceRedesignEstimateCostParamsBodyBinderProteinSequenceRedesignRunInputStructureURLSource{
          URL: "https://example.com",
        },
      },
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Breakdown)
}
```

#### Response

```json
{
  "breakdown": {
    "application": "structure_and_binding",
    "cost_per_unit_usd": "0.0500",
    "num_units": 1
  },
  "disclaimer": "This is an estimate only and may differ from your actual charges. Final billing is based on exact token counts computed at run time. For large library screens, the estimate is extrapolated from a sample and may be less accurate for highly variable inputs.",
  "estimated_cost_usd": "0.0500"
}
```
