---
title: "Cloning simulator"
method: POST
path: "/cloning_simulate"
tags: ["Enzymes & cloning"]
---

# Cloning simulator

`POST /cloning_simulate`

## Request

- Base URL: `https://seqbench.com/api/v1`
- URL: `https://seqbench.com/api/v1/cloning_simulate`
- Auth: none required

Assemble fragments by Gibson/overlap, Golden Gate (Type IIS), restriction–ligation (sticky or blunt), TOPO/TA, LIC or SLIC (T4-polymerase chew-back) or In-Fusion/CPEC, returning the product, the junctions and — for the primer-design methods — the junction primers. Each method is modeled as its own chemistry rather than as one product model with different labels: LIC's chew-back stops at the first occurrence of the single dNTP supplied, so a tail carrying that base stops it early and a tail without one lets it run past the junction, and both are refused with the offending base and position named.

Not a workflow step (it does not take a single sequence argument), but its `product` field is the sequence to carry into the next call yourself.

## Request body

- object
  - `method` 'gibson' | 'goldengate' | 'restriction' | 'topo' | 'lic' | 'slic' | 'infusion' | 'gateway' | 'homology', required: Assembly method. gibson/goldengate design the junction primers for bare fragments; restriction and topo build a product from a vector and an insert; lic and slic model T4-polymerase chew-back (sequence-defined and time-stopped respectively); infusion is In-Fusion/CPEC, 15 bp terminal homology with no exonuclease, and works out the fragment ORDER for itself; gateway runs a BP or LR recombination between att sites (see `reaction`); homology starts from the CIRCULAR vector instead of a linear fragment — say how to open it with `openWith` and it designs the arm-carrying primers for the insert (NEBuilder/ClonExpress/In-Fusion kits).
  - `reaction` 'BP' | 'LR': gateway method: BP recombines ONE attB-flanked PCR product (`fragments[0]`, a bare sequence is fine) into an attP donor (`vector`) to make an attL entry clone; LR recombines one to four ORDERED attL/attR entry clones (`fragments`) into an attR destination (`vector`) to make the attB expression clone. Vectors and entry clones must be GenBank records with their att sites annotated — attP/attL/attR sites are found by label, then checked base by base at the crossover core.
  - `fragments` string[]: Fragments (5′→3′). Used by gibson/goldengate/slic/infusion. gibson and goldengate assemble them head-to-tail in the order given and add the junctions by primer; slic needs the homology already ON the fragments and keeps the order given; infusion needs it on the fragments too but derives the order from the homologies, so the order listed here is ignored. slic and infusion take at most 24.
  - `names` string[]: Optional labels for each fragment.
  - `circular` boolean: Produce a circular product.
  - `overlapLen` integer: Gibson homology-arm length (bp).
  - `mergePreAddedArms` boolean: Gibson only. When two fragments already share terminal sequence, count that share ONCE (the default — it is a homology arm the fragments already carry) or set false to concatenate it twice. The second reading is the right one when the shared block is a genuine tandem repeat, e.g. a 2x tag or enhancer split between its copies: nothing in the two fragments can tell the two apart, so the choice belongs to the caller. Either way the share is reported in preAddedArms and both readings are returned in `readings`.
  - `armTmTarget` number: Target annealing Tm (°C) for primer arms.
  - `enzyme` string: Type IIS enzyme for Golden Gate — one of BsaI, BbsI, Esp3I (BsmBI); "BsmBI" also resolves to Esp3I. Any other name is rejected rather than substituted.
  - `vector` string: Vector sequence (restriction, topo and lic methods; for lic, the LINEARIZED vector).
  - `insert` string: Insert sequence (restriction, topo and lic methods).
  - `enzyme5` string: Insert 5′ enzyme (restriction method).
  - `enzyme3` string: Insert 3′ enzyme (restriction method).
  - `vectorEnzyme5` string: Vector 5′ enzyme (restriction method); defaults to enzyme5. Set a different, compatible enzyme (e.g. BglII for a BamHI insert) to model heterologous-overhang cloning.
  - `vectorEnzyme3` string: Vector 3′ enzyme (restriction method); defaults to enzyme3.
  - `dephosphorylateVector` boolean: CIP/rSAP-dephosphorylate the vector to suppress self-ligation background (restriction method).
  - `topoMode` 'ta' | 'blunt' | 'directional': TOPO chemistry (topo method): TA (Taq 3′-A), blunt, or directional (pENTR/D-TOPO, needs 5′-CACC on the insert).
  - `vectorNucleotide` 'A' | 'C' | 'G' | 'T': lic method: the single dNTP the VECTOR's chew-back was run with (T for dTTP…). Required — T4 pol's exonuclease stops at the first occurrence of this base reading inward from each 3′ end, so there is no answer without it.
  - `insertNucleotide` 'A' | 'C' | 'G' | 'T': lic method: the single dNTP the INSERT's chew-back was run with. Normally the COMPLEMENT of vectorNucleotide (the classic pair is dTTP on the vector, dATP on the insert) — with the same base for both, each junction's shared block would have to avoid that base and its complement at once.
  - `chewBackLen` integer: slic method: nucleotides removed from each 3′ end. A SLIC chew-back has no dNTP to arrest it and is stopped by time, so this is an input rather than a property of the sequence. 0 (default) models the intended reaction — chewed to the full homology and no further; any positive value is checked against each junction's own homology, and both overrunning it and falling short of meeting the chew-back coming the other way are reported.
  - `openWith` 'single' | 'double' | 'inverse-pcr': homology method: how the circular vector is opened. single uses vectorEnzyme5 and REFUSES if it does not cut exactly once; double removes the arc running forward from vectorEnzyme5's cut to vectorEnzyme3's; inverse-pcr opens at `openAt` and, with `deleteTo`, deletes that span.
  - `armLength` integer: homology method: homology-arm length in bp, clamped to 15-25 — the range the kit manuals specify (CE Design 15-20, In-Fusion 15, NEBuilder 15-25).
  - `openAt` integer: homology method, inverse-pcr: 1-based base the linearised vector starts at.
  - `deleteTo` integer: homology method, inverse-pcr: delete openAt..deleteTo (inclusive, wrapping past the origin) instead of only opening.
  - `homologyLen` integer: infusion method: terminal homology required at every junction, in bp. At least 15 — the junction is annealed and extended by a polymerase with no exonuclease to widen it and no ligase to seal it, so a shorter overlap is a different chemistry rather than a weaker version of this one.

## Response `200`

Tool ran successfully.

- SuccessResponse: Standard success envelope returned by every single-tool call.
  - `ok` unknown, required
  - `tool` string, required: The tool slug that ran.
  - `result` object, required: Tool-specific output object. Its shape depends on the tool — call `GET /{tool}` or see the docs for each tool's fields.
  - `gate` GateResult
    - `pass` boolean, required: True if and only if every hard check passed.
    - `checks` GateCheck[], required
      - `id` string, required
      - `label` string, required
      - `severity` 'hard' | 'soft', required
      - `pass` boolean, required
      - `message` string, required
      - `value` number
      - `threshold` string
    - `notChecked` string[], required: Honest list of what this gate does NOT verify.
  - `provenance` Provenance, required
    - `apiVersion` string, required
    - `tool` union, required: Tool slug, or an array of slugs (one per step) for a workflow.
      - string
      - string[]
    - `generatedAt` string, date-time, required: ISO 8601 timestamp of when the result was generated.

## Other responses

- `400`: Invalid argument or the tool could not run.
- `404`: Unknown tool.
- `429`: Rate limited (metered tools only). Body carries code `rate_limited` and retryable `true`; honor the Retry-After header.
- `503`: A metered tool is momentarily at capacity. The identical request should succeed after Retry-After; body carries code `upstream_unavailable`.

---

[API](https://skmtc.dev/seqbench/apis/seqbench-api.md) · [All operations](https://skmtc.dev/seqbench/apis/seqbench-api/llms.txt) · [OpenAPI document](https://skmtc.dev/seqbench/apis/seqbench-api/revisions/132575216865?raw)
