Skip to content
Go to Boltz API

Estimate cost for a protein sequence redesign run

protein.sequence_redesign.estimate_cost(SequenceRedesignEstimateCostParams**kwargs) -> SequenceRedesignEstimateCostResponse
POST/compute/v1/protein/sequence-redesign/estimate-cost

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

ParametersExpand Collapse
entities: Iterable[BinderProteinSequenceRedesignRunInputEntity]

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

One of the following:
class BinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignTargetEntity:

A fixed target chain from the input CIF.

chain_id: str
minLength1
role: Literal["target"]
type: Literal["from_template"]
class BinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntity:
chain_id: str
minLength1
role: Literal["binder"]
type: Literal["from_template"]
design_motifs: Optional[Iterable[BinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotif]]

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

filters: Iterable[BinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilter]

Filters applied to this motif in addition to global_design_filters.

One of the following:
class BinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilterExcludedAminoAcidsDesignFilter:
amino_acids: Sequence[str]

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

type: Literal["excluded_amino_acids"]
class BinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilterMaxHydrophobicFractionDesignFilter:
max_fraction: float
minimum0
maximum1
type: Literal["max_hydrophobic_fraction"]
class BinderProteinSequenceRedesignRunInputEntityBinderSequenceRedesignBinderEntityDesignMotifFilterExcludedSequenceMotifsDesignFilter:
motifs: Sequence[str]

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

type: Literal["excluded_sequence_motifs"]
residues: Iterable[int]

0-indexed residues to redesign on this chain.

type: Literal["residues"]
num_proteins: int

Number of unique filter-passing redesigned proteins to generate.

minimum1
maximum1000

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

One of the following:
class BinderProteinSequenceRedesignRunInputStructureURLSource:
type: Literal["url"]
url: str
formaturi
class BinderProteinSequenceRedesignRunInputStructureCifBase64Source:
data: str

Base64-encoded CIF file contents

media_type: Literal["chemical/x-cif"]

Must be chemical/x-cif for CIF files

type: Literal["base64"]
type: Literal["binder"]
global_design_filters: Optional[Iterable[BinderProteinSequenceRedesignRunInputGlobalDesignFilter]]

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

One of the following:
class BinderProteinSequenceRedesignRunInputGlobalDesignFilterExcludedAminoAcidsDesignFilter:
amino_acids: Sequence[str]

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

type: Literal["excluded_amino_acids"]
class BinderProteinSequenceRedesignRunInputGlobalDesignFilterMaxHydrophobicFractionDesignFilter:
max_fraction: float
minimum0
maximum1
type: Literal["max_hydrophobic_fraction"]
class BinderProteinSequenceRedesignRunInputGlobalDesignFilterExcludedSequenceMotifsDesignFilter:
motifs: Sequence[str]

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

type: Literal["excluded_sequence_motifs"]
idempotency_key: Optional[str]
maxLength255
workspace_id: Optional[str]

Workspace to run this redesign in.

ReturnsExpand Collapse
class SequenceRedesignEstimateCostResponse:

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

breakdown: Breakdown

Cost breakdown for the billed application.

application: Literal["structure_and_binding", "small_molecule_design", "small_molecule_library_screen", 4 more]
One of the following:
"structure_and_binding"
"small_molecule_design"
"small_molecule_library_screen"
"protein_design"
"protein_redesign"
"protein_library_screen"
"adme"
cost_per_unit_usd: str

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: int

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: str
estimated_cost_usd: str

Estimated total cost as a decimal string

Estimate cost for a protein sequence redesign run

import os
from boltz_api import Boltz

client = Boltz(
    api_key=os.environ.get("BOLTZ_API_KEY"),  # This is the default and can be omitted
)
response = client.protein.sequence_redesign.estimate_cost(
    entities=[{
        "chain_id": "x",
        "role": "target",
        "type": "from_template",
    }, {
        "chain_id": "x",
        "role": "target",
        "type": "from_template",
    }],
    num_proteins=1,
    structure={
        "type": "url",
        "url": "https://example.com",
    },
    type="binder",
)
print(response.breakdown)
{
  "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"
}
Returns Examples
{
  "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"
}