Skip to content

Designs

POST /v1/designs designs de novo proteins against a target. Four engines share the endpoint: BoltzGen takes a protein, small-molecule, DNA or RNA target and returns designs ranked by predicted confidence; RFdiffusion3 and RFD4-Proteina each take a pasted structure plus a contig and return all-atom designs ordered on how well they held the motif, not on confidence; PXDesign takes a pasted structure plus the target chains and returns binder backbones with no sequence at all. All four return a job to poll, exactly like a prediction. Every example sends your key from $JAPANFOLD_API_KEY (see Authentication).

The protocol implies the model. You may pass model explicitly (boltzgen, rfd3, pxdesign or rfd4), but it has to match the protocol's model; a mismatch is a 400.

BoltzGen: binders against a protein, ligand or nucleic acid

curl -s -X POST https://api.japanfold.aiand.com/v1/designs \
  -H "Authorization: Bearer $JAPANFOLD_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "protocol":"nanobody-anything",
    "name":"my-nanobodies",
    "spec":"entities:\n  - protein: {id: B, sequence: 80..120}\n  - protein: {id: A, msa: empty, sequence: MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ}\n",
    "params":{"num_designs":10,"budget":10,"fast":true}
  }'
  • spec (required): a BoltzGen YAML spec under entities:, the binder to design (sequence: 80..120 is a length range) and the target. This is not the sequences: YAML a prediction takes. To aim at an epitope, give the target binding_types: {binding: '45..52'} (1-based residues). A spec the engine would reject (unknown keys, no chain to design, pocket constraints) is refused with a 400 at submit, before it is queued or billed.
  • protocol (required): what to design.
  • params: num_designs, budget, fast, seed. See Models & limits.
  • name: optional label.
protocol Designs
protein-anything De novo mini-protein binder against any target.
peptide-anything Short peptide binder.
nanobody-anything Single-domain antibody / nanobody (VHH).
antibody-anything Antibody binder.
protein-small_molecule Protein binder with a binding-affinity step.
protein-redesign Re-design residues of an existing binder.

Crop the target to the part you want bound, about 512 residues or fewer. A larger target still runs and the designs still dock, but far fewer of them refold into the shape they were drawn as. Measured on this hardware with eight designs per cell, GroEL cropped to 512 residues gave a median refold RMSD of 0.9 Å, five of eight under 2 Å; the same target at 1536 residues gave 15.6 Å and none under 4 Å. Which window you keep can matter as much as its length: on glycogen phosphorylase, two 512-residue windows 100 residues apart gave 4.7 Å and 17.8 Å. If a target designs badly, try another window before asking for more designs.

Submits accept the same Idempotency-Key and Prefer: wait headers as predictions.

RFdiffusion3: all-atom design against a structure

RFdiffusion3 diffuses protein structure and sequence together, conditioned on a target structure you provide:

curl -s -X POST https://api.japanfold.aiand.com/v1/designs \
  -H "Authorization: Bearer $JAPANFOLD_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "protocol":"rfd3-binder",
    "name":"my-rfd3-binders",
    "structure":"<the contents of your PDB or mmCIF file>",
    "contig":"A1-150,60-80",
    "params":{"num_designs":4,"num_timesteps":100}
  }'
  • structure (required): the target as PDB or mmCIF text, up to 1,100,000 characters (about a 1,600-residue PDB), or an id the API fetches for you: pdb:1ABC (an RCSB PDB entry; a bare 1ABC works too) or afdb:P69905 (the AlphaFold DB model of a UniProt accession). A fetched entry is the whole mmCIF, checked like a paste, and the job's fetched field records the id, its URL and the sha256 of the text the job ran on. An id that does not exist is a 400 at submit, free. Every design protocol that takes a structure accepts an id the same way.
  • contig (required): comma-separated segments. A chain-range like A1-150 keeps those residues fixed; a bare number like 60-80 designs that many new residues. So "A1-150,60-80" keeps target chain A, then designs a 60 to 80 residue binder. A contig keeps protein and nucleic-acid residues only: RFdiffusion3 drops ions, ligands, waters and modified residues such as MSE before it reads the contig, so naming one is a 400 at submit. Keep a zinc finger and you keep the residues that coordinate the metal, not the metal. A modified residue can be kept by renaming it to its standard parent (MSE to MET) in the file you send.
  • Size: the contig, not the paste, sets how big the run is. Motif plus designed residues has to come to 1,536 or fewer, so a large structure is fine as long as the contig selects less of it.
  • params: num_designs, num_timesteps, seed. See Models & limits.
protocol Designs
rfd3-binder Binder against a protein target structure.
rfd3-scaffold Scaffold around a fixed functional motif: list the motif residues, design between them.
rfd3-na-binder Binder against a fixed DNA or RNA structure.

There is no refold-and-filter step, so a design carries no confidence score. What it does carry is what the service can measure from the output: the motif RMSD, the chain count and a rank over the two (see Motif scaffolds). For a confidence number, fold a design's sequence back onto the target with a prediction and read the interface confidence (iptm).

PXDesign: binder backbones against a structure

PXDesign conditions on a distogram of the target chains you name and generates binder backbones. It is the fastest of the three and the least finished output: coordinates only, no sequence, no ranking, no confidence score. Run the backbones through a sequence-design tool before ordering anything. For a ranked, sequenced binder use BoltzGen.

curl -s -X POST https://api.japanfold.aiand.com/v1/designs \
  -H "Authorization: Bearer $JAPANFOLD_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "protocol":"pxdesign-binder",
    "structure":"<the contents of your PDB or mmCIF file>",
    "chains":"A",
    "binder_length":80,
    "hotspots":"A74,A75,A76",
    "params":{"num_designs":4,"n_step":200}
  }'

chains names the target chains to condition on, binder_length is the residue count of the binder to generate (8 to 200), and hotspots is optional: target residues the binder should aim at. One protocol, pxdesign-binder. Only the named chains count toward the size ceiling, and the binder counts too: their sum has to be 1,536 or fewer, so a large file is fine if you name one small chain.

RFD4-Proteina: all-atom designs with sequences

RFD4-Proteina runs a flow in an autoencoder's latent space and decodes coordinates and a sequence in one step, so every design comes back sequenced. Like RFdiffusion3 it conditions on a target structure plus a contig, and its designs come back scored and ordered the same way (see Motif scaffolds).

curl -s -X POST https://api.japanfold.aiand.com/v1/designs \
  -H "Authorization: Bearer $JAPANFOLD_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "protocol":"rfd4-binder",
    "structure":"<the contents of your mmCIF file>",
    "contig":"60-60, /0, A2-115",
    "params":{"num_designs":4,"recipe":"thinking_medium","nsteps":60}
  }'
  • structure (required): the target as mmCIF text. RFD4 reads mmCIF only, so a pasted PDB is refused at submit: bonds and formal charges are not reliably encoded in PDB and the model needs them.
  • contig (required): comma-separated segments read left to right. A bare number or range designs that many new residues, /0 starts a new chain, and a chain-range like A2-115 keeps that part of the pasted structure. So "60-60, /0, A2-115" designs a 60-residue binder as its own chain against target chain A. The contig has to keep something: RFD4 here always designs against a structure, so a contig that preserves nothing ("60-60") is refused at submit rather than queued.
  • Chain and residue numbering is the file's own (label_asym_id / label_seq_id), which can differ from what a viewer shows: a chain numbered 2-115 in the file may read 2-112 in a PDB-style viewer. A contig that matches no atoms is refused at submit with the ids it looked for. A kept chain whose rows leave label_seq_id empty (.) is refused too: fill it in, with gemmi convert or by taking the mmCIF as RCSB serves it.
  • Two kept ranges in one chain need something designed between them. "A1-40, A60-93" is refused: the output chain would come out in two pieces with no backbone joining them. Write the residues that link them as a designed segment, "A1-40, 19, A60-93" (or a range, "A1-40, 15-25, A60-93").
  • hotspots (optional): target residues to aim the binder at, e.g. "A74,A75,A76". Leave it out and the model picks the site.
  • Size: the contig sets the run, kept plus designed residues, up to 512.
  • params: num_designs, recipe, nsteps, seed. See Models & limits.
protocol Designs
rfd4-binder Binder against a target structure, as its own chain.
rfd4-scaffold Scaffold around a fixed motif: keep the motif residues, design the stretches around them.

Redesigning antibody or nanobody CDRs

There is no separate protocol for this: it is a contig shape. Keep the framework on either side of the loop you want redesigned and put the designed length in between, then keep the antigen as its own chain.

{"protocol":"rfd4-scaffold",
 "contig":"A9-40, 8, A50-93, /0, B3-15"}

That keeps framework residues 9-40 and 50-93 of chain A, designs 8 residues of CDR between them, and keeps chain B as the partner. The two kept ranges must be one continuous output chain, so they have to be separated by a designed segment, not by /0. Each /0 starts a new output chain, named after the input chain it keeps, so A9-40, /0, A50-93 asks for two chains both called A and is refused at submit.

The antigen has to be a separate chain in the file you paste. Paste the complex, or add the partner chain to the file first.

The recipe is a thinking budget, not a quality switch with a free setting: thinking_low spends 120 trunk passes a design, thinking_medium 180, thinking_high 300, and the cost follows. Nine more schedules (low, medium or high, each /flat, /front_loaded or /midpeak) choose where the passes go. Upstream uses medium/front_loaded for binders, high/front_loaded for antibody and nanobody CDRs and medium/midpeak for enzymes and motif scaffolds.

Reading designs

Wait on GET /v1/jobs/{id}?wait=60 until succeeded, then read GET /v1/jobs/{id}/results for the designs and their structure artifacts, or GET /v1/jobs/{id}/archive for everything as one zip. See Jobs → Results and Examples.

Every design carries id, structure and final_rank. The scores beside them are whatever the engine measured, so they differ by protocol.

Motif scaffolds (rfd3-scaffold, rfd4-scaffold)

{
  "id": "design_0",
  "structure": "design_0.cif",
  "motif_rmsd": 0.0,
  "num_chains": 1,
  "designed_length": 57,
  "designed_sequence": "ALGIPSGVALAPASTKPFQCRICMRNFSRSDHLTTHIRTHTGTGSAACRALPASLEP",
  "final_rank": 1
}

motif_rmsd is the backbone RMSD in Angstrom of the residues your contig kept, measured against the structure you submitted after optimal superposition. RFdiffusion3 copies the kept coordinates, so a held motif reads 0.0 and anything above about 0.5 means the run bent what you asked it to hold. RFD4-Proteina conditions on those coordinates instead of copying them, so even a well-held motif reads a few tenths: 0.20, 0.21, 0.21 and 0.36 A across the four designs of one job. Compare designs within a job rather than against zero.

num_chains is how many chains the output has, and chains_expected is how many your contig asked for: one, plus one per /0 chain break. A motif scaffold is normally one, so num_chains of 2 means it came back in disconnected pieces. The engine does not report that as an error, so check it. A binder contig asks for a break between target and binder, and there two chains is the right answer.

final_rank orders the set on the distance from chains_expected, then motif_rmsd. That is a structural sanity order, not a quality or confidence ranking: neither model produces a confidence score, and the API does not invent one. For a confidence number, refold a design you like as its own prediction job and read its pLDDT, which you pay for like any other fold.

designed_sequence is read from the output, which is all-atom, so you can send it straight to a fold or an embedding without parsing the structure yourself.

RFD4-Proteina designs carry the same fields, measured against the file's own numbering (label_seq_id), which is what its contig names, and keep tokens and runtime_s beside them.