Documentations

Open api.nexio.bio

Mitochondria API · OpenAPI 3.0.3 · v1.0.0

Overview

Purpose: DNA cloning and primer-design microservice for BioNexio workflows—restriction cloning, PCR cloning, Gibson overlap assembly, simple PCR primers, backbone linearization, restriction-site lookup, and codon optimization.

Base path: Routes are mounted under the deployment `PREFIX` from environment (often `/api`). Example: `POST {server}{prefix}/primers/simple`.

Authentication: Every endpoint except `/`, static assets, and Swagger UI requires `Authorization: Bearer <api-key>`. Missing or invalid keys return 403 JSON (not 401).

API keys and usage quotas: Some deployments distinguish admin keys (environment configuration) from standard keys stored in the usage database. Admin keys are not subject to token quotas. Standard keys have per–UTC-day and per–UTC-month token budgets; each successful operation consumes a route-specific token cost. When a budget would be exceeded, the server returns 403 with `error: Payment Required` and a quota message. GET `/quota/limits` returns the current caps and usage without consuming tokens. POST `/admin/api-keys` creates new standard keys and requires an admin bearer key.

Success shape: HTTP 200 bodies are JSON objects with `"status": "success"` and a `"results"` field (object, array, or string depending on the operation). Do not expect `"success": true` on 200 responses.

Errors: 400 invalid JSON or empty body; 422 validation / business rules (`message`, `success: false`, often `errors`); 500 unhandled or processing failures. Clients and AI agents should read `message` and optional `errors` for actionable detail.

Consumers: Descriptions are written for programmatic clients and LLM agents: field semantics, defaults, and edge cases (e.g. linear vs circular backbone) are stated explicitly.

Servers

  • https://app.nexio.bio/apiProduction (HTTPS; path may match deployed PREFIX)

Authentication

  • bearerAuthhttp · bearer

    API key issued for Mitochondria / Nucleus integration (value is not a JWT).

gibson_cloning3 operations

Gibson overlap primers and vector linearization candidates (Type IIP in MCS)

POST/cloning/gibson/primersGibson assembly primers (overlap + annealing)

operationId gibson_cloning_primers

Description

Designs forward/reverse primers for an insert: overlap regions are taken from `start_overlap_seq` / `end_overlap_seq` templates (extended until overlap Tm target), combined with annealing regions designed to `primer_tm`.

Options: All three fields are required (`primer_tm`, `overlap_size`, `overlap_tm`). `overlap_size` is a minimum overlap length in bp (integer ≥ 1).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "end_overlap_seq": {
            "allOf": [
              {
                "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
              }
            ],
            "description": "Template for the 3' overlap."
          },
          "options": {
            "properties": {
              "overlap_size": {
                "description": "Minimum overlap length (bp); actual overlap may grow to meet `overlap_tm`.",
                "example": 25,
                "minimum": 1,
                "type": "integer"
              },
              "overlap_tm": {
                "description": "Target duplex Tm (°C) applied when lengthening homology tails: overlap size grows until a sliding nearest-neighbour estimate reaches this target with simpler ion modelling than the primer melting_temperature fields (those use the fuller mixed-ion recipe on the insert annealing segment only—not the overlap).\n",
                "type": "integer"
              },
              "primer_tm": {
                "description": "Target Tm (°C) for the annealing portion of the primer.",
                "type": "integer"
              }
            },
            "required": [
              "primer_tm",
              "overlap_size",
              "overlap_tm"
            ],
            "type": "object"
          },
          "seq": {
            "allOf": [
              {
                "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
              }
            ],
            "description": "Linear insert sequence to amplify for Gibson assembly."
          },
          "start_overlap_seq": {
            "allOf": [
              {
                "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
              }
            ],
            "description": "Template for the 5' overlap (typically vector-adjacent homology); longer than final overlap."
          }
        },
        "required": [
          "seq",
          "start_overlap_seq",
          "end_overlap_seq",
          "options"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "forward": {
                  "description": "One Gibson assembly primer: overlap (homology) region plus annealing region, full primer sequence, Tm of the annealing part, and ΔG metrics for the full primer (hairpin and homodimer components plus their minimum).\n",
                  "properties": {
                    "annealing_sequence": {
                      "allOf": [
                        {
                          "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
                        }
                      ],
                      "description": "Insert-specific annealing region (designed to target Tm)."
                    },
                    "full_seq": {
                      "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
                    },
                    "gibbs_free_energy": {
                      "allOf": [
                        {
                          "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/gibbs_free_energy"
                        }
                      ],
                      "description": "Minimum of hairpin and homodimer ΔG for the full primer (kcal/mol)."
                    },
                    "hairpin_gibbs_free_energy": {
                      "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/hairpin_gibbs_free_energy"
                    },
                    "homodimer_gibbs_free_energy": {
                      "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/homodimer_gibbs_free_energy"
                    },
                    "melting_temperature": {
                      "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/melting_temperature"
                    },
                    "overlap": {
                      "allOf": [
                        {
                          "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
                        }
                      ],
                      "description": "Homology overhang taken from the provided overlap template."
                    }
                  },
                  "required": [
                    "annealing_sequence",
                    "overlap",
                    "full_seq",
                    "melting_temperature",
                    "hairpin_gibbs_free_energy",
                    "homodimer_gibbs_free_energy",
                    "gibbs_free_energy"
                  ],
                  "type": "object"
                },
                "reverse": {
                  "$ref": "#/paths/~1cloning~1gibson~1primers/post/responses/200/content/application~1json/schema/properties/results/properties/forward"
                }
              },
              "required": [
                "forward",
                "reverse"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Forward and reverse Gibson primers (full sequences include overlaps)."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/cloning/gibson/restrictionCandidate Type IIP enzymes to linearize a circular vector (Gibson prep)

operationId gibson_cloning_restrictases

Description

Lists Type IIP enzymes from the supported catalog (blunt or sticky) that cut exactly once in the backbone and whose site lies in the MCS (`mcs_start`…`mcs_end`). Intended for choosing a linearization cut before overlap assembly—not for in vitro Gibson mastermix conditions.

Linear backbones: Returns [] (no circular MCS).

Shape: Same as `/cloning/pcr/restriction`—flat `{ name, position }[]`, not `restriction_part_pair`.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "backbone": {
            "$ref": "#/paths/~1backbone~1linearize~1selection/post/requestBody/content/application~1json/schema/properties/backbone"
          }
        },
        "required": [
          "backbone"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "items": {
                "$ref": "#/paths/~1cloning~1pcr~1restriction/post/responses/200/content/application~1json/schema/properties/results/items"
              },
              "type": "array"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Sorted candidate enzymes with 1-based cut positions."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
GET/cloning/gibson/restriction/supported_restrictasesSupported Type IIP enzymes (sticky or blunt) for Gibson MCS linearization candidates

operationId gibson_cloning_supported_restrictases_get

Description

Alphabetical list of enzyme names from the curated Type IIP catalog (sticky or blunt) used when proposing single-cut vector linearization sites for `/cloning/gibson/restriction`. Names match the catalog used elsewhere; inclusion does not imply cutting a given backbone.

Authentication: Bearer required.

No request body. Empty GET request.

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Restriction enzyme identifiers, ascending lexicographic order.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Sorted unique enzyme names."
  },
  "403": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
restriction_cloning5 operations

Restriction enzyme cloning—sites, primers, combined primers, GenBank export

POST/cloning/restriction/primersRestriction-cloning primers from user-supplied annealing sequences

operationId restriction_cloning_primers

Description

Builds full primers by adding overhangs and restriction sites to your forward/reverse annealing sequences. Validates optional overhang sizes 1–5 when set.

Products: `results.products` is a `PcrResponse`: `full_seq` (full PCR product), `restricted_seq` (insert cassette for ligation), optional Tm and cross-primer ΔG.

`melting_temperature`: Computed from `annealing_sequence` duplex physics only (cassette/overhang tails in `full_seq` do not inflate that field)—see `melting_temperature` field documentation.

Options: Omit `options` or `{}` for default overhang sizing (typically 4 bp unless overridden).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "forward_primer": {
            "description": "Forward annealing region (DNA, 5'→3' on top strand).",
            "type": "string"
          },
          "insert": {
            "description": "Named insert sequence fragment used in multi-part cloning inputs.",
            "properties": {
              "id": {
                "$ref": "#/paths/~1backbone~1linearize~1selection/post/requestBody/content/application~1json/schema/properties/backbone/properties/id"
              },
              "seq": {
                "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
              }
            },
            "required": [
              "id",
              "seq"
            ],
            "type": "object"
          },
          "options": {
            "description": "Optional; defaults apply when omitted or empty.",
            "properties": {
              "end_overhang_size": {
                "description": "Overhang length (1–5); omit for default.",
                "maximum": 5,
                "minimum": 1,
                "nullable": true,
                "type": "integer"
              },
              "start_overhang_size": {
                "description": "Overhang length (1–5); omit for default.",
                "maximum": 5,
                "minimum": 1,
                "nullable": true,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "restrictases": {
            "properties": {
              "end": {
                "$ref": "#/paths/~1cloning~1restriction~1primers/post/requestBody/content/application~1json/schema/properties/restrictases/properties/start"
              },
              "end_seq": {
                "description": "Optional custom recognition / cut-site sequence for the end enzyme.",
                "nullable": true,
                "type": "string"
              },
              "start": {
                "example": "EcoRI",
                "nullable": true,
                "type": "string"
              },
              "start_seq": {
                "description": "Optional custom recognition / cut-site sequence for the start enzyme.",
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          },
          "reverse_primer": {
            "description": "Reverse annealing region (DNA).",
            "type": "string"
          }
        },
        "required": [
          "insert",
          "forward_primer",
          "reverse_primer",
          "restrictases"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "forward": {
                  "description": "One designed primer for restriction cloning: full primer (overhang + site + annealing), plus the annealing-only and site metadata used for assembly and GenBank export.\n",
                  "properties": {
                    "annealing_sequence": {
                      "description": "Region that anneals to the insert template (no overhang or RE site).",
                      "type": "string"
                    },
                    "full_seq": {
                      "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
                    },
                    "gibbs_free_energy": {
                      "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/gibbs_free_energy"
                    },
                    "hairpin_gibbs_free_energy": {
                      "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/hairpin_gibbs_free_energy"
                    },
                    "homodimer_gibbs_free_energy": {
                      "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/homodimer_gibbs_free_energy"
                    },
                    "melting_temperature": {
                      "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/melting_temperature"
                    },
                    "overhang": {
                      "description": "5' overhang sequence added for compatibility (may be empty in edge cases).",
                      "type": "string"
                    },
                    "restrictase_site": {
                      "description": "Recognition / cut-site sequence used for this end (consensus or custom).",
                      "type": "string"
                    },
                    "restriction_position": {
                      "description": "The position of a nucleotide in a DNA sequence",
                      "example": 3,
                      "format": "int32",
                      "minimum": 0,
                      "type": "number"
                    }
                  },
                  "required": [
                    "full_seq",
                    "annealing_sequence",
                    "overhang",
                    "restrictase_site",
                    "restriction_position",
                    "hairpin_gibbs_free_energy",
                    "homodimer_gibbs_free_energy",
                    "gibbs_free_energy",
                    "melting_temperature"
                  ],
                  "type": "object"
                },
                "products": {
                  "description": "In silico full-length PCR product for restriction-cloning primer design: includes overhangs, recognition sites, and insert; `restricted_seq` is the fragment intended for ligation into the vector.\n",
                  "properties": {
                    "annealing_temperature": {
                      "allOf": [
                        {
                          "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/product/properties/annealing_temperature"
                        }
                      ],
                      "nullable": true
                    },
                    "cross_primer_gibbs_free_energy": {
                      "allOf": [
                        {
                          "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/gibbs_free_energy"
                        }
                      ],
                      "description": "ΔG for forward/reverse primer dimer formation (kcal/mol), if computed.",
                      "nullable": true
                    },
                    "full_seq": {
                      "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
                    },
                    "restricted_seq": {
                      "description": "Insert-region sequence as it will be released for cloning (between cut sites).",
                      "type": "string"
                    }
                  },
                  "required": [
                    "full_seq",
                    "restricted_seq"
                  ],
                  "type": "object"
                },
                "reverse": {
                  "$ref": "#/paths/~1cloning~1restriction~1primers/post/responses/200/content/application~1json/schema/properties/results/properties/forward"
                }
              },
              "required": [
                "forward",
                "reverse",
                "products"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Forward/reverse primer details and PCR product model."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/cloning/restriction/primers_combinedRestriction-cloning primers with auto-designed annealing regions

operationId restriction_cloning_primers_combined

Description

Runs simple primer design on the insert, then adds restriction sites and overhangs like `/cloning/restriction/primers`. If `options.min_tm` is omitted or null, the inner step uses the same default as `/primers/simple` (60 °C).

Validation: If `min_tm` is set, it must be strictly between 30 and 100 °C. Overhang sizes 1–5 when provided.

Options: All optional fields may be omitted; pass `{}` for defaults. `min_length` (15–35 bp, default 18) controls the internal simple-primer step; `min_primer_length` is accepted as an alias.

Returned `melting_temperature` semantics follow `annealing_sequence` (see primer schema), same family of estimates as `/primers/simple`.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "insert": {
            "$ref": "#/paths/~1cloning~1restriction~1primers/post/requestBody/content/application~1json/schema/properties/insert"
          },
          "options": {
            "properties": {
              "end_overhang_size": {
                "maximum": 5,
                "minimum": 1,
                "nullable": true,
                "type": "integer"
              },
              "min_length": {
                "default": 18,
                "description": "Minimum annealing length (bp) for the internal simple-primer step (same as `/primers/simple`).\n",
                "maximum": 35,
                "minimum": 15,
                "type": "integer"
              },
              "min_tm": {
                "description": "Target Tm (°C) for the internal simple-primer step; must be in (30, 100) if set.",
                "format": "double",
                "nullable": true,
                "type": "number"
              },
              "start_overhang_size": {
                "maximum": 5,
                "minimum": 1,
                "nullable": true,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "restrictases": {
            "properties": {
              "end": {
                "$ref": "#/paths/~1cloning~1restriction~1primers/post/requestBody/content/application~1json/schema/properties/restrictases/properties/start"
              },
              "end_seq": {
                "nullable": true,
                "type": "string"
              },
              "start": {
                "$ref": "#/paths/~1cloning~1restriction~1primers/post/requestBody/content/application~1json/schema/properties/restrictases/properties/start"
              },
              "start_seq": {
                "nullable": true,
                "type": "string"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "type": "object"
          }
        },
        "required": [
          "insert",
          "restrictases"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "forward": {
                  "$ref": "#/paths/~1cloning~1restriction~1primers/post/responses/200/content/application~1json/schema/properties/results/properties/forward"
                },
                "products": {
                  "$ref": "#/paths/~1cloning~1restriction~1primers/post/responses/200/content/application~1json/schema/properties/results/properties/products"
                },
                "reverse": {
                  "$ref": "#/paths/~1cloning~1restriction~1primers/post/responses/200/content/application~1json/schema/properties/results/properties/forward"
                }
              },
              "required": [
                "forward",
                "reverse",
                "products"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Same shape as `/cloning/restriction/primers`."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/cloning/restriction/restrictionList compatible restriction enzymes between backbone and inserts

operationId restriction_cloning_restrictases

Description

Computes sticky Type IIP enzymes relevant to each junction: backbone–insert, insert–insert, or backbone-only when `inserts` is empty (max 10 inserts; more returns 422).

Output: An array of objects with `part1_id`, `part2_id`, and `restrictases` (name + optional position for MCS single cutters). This is not the same shape as `/cloning/pcr/restriction` or `/cloning/gibson/restriction`, which return flat enzyme lists.

Request: Only `backbone` and `inserts`—no `options` or `preferred_restrictases` in the current API (ignore older drafts that mentioned them).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "backbone": {
            "$ref": "#/paths/~1backbone~1linearize~1selection/post/requestBody/content/application~1json/schema/properties/backbone"
          },
          "inserts": {
            "description": "Insert fragments in order; empty array triggers backbone-only cutting.",
            "items": {
              "$ref": "#/paths/~1cloning~1restriction~1primers/post/requestBody/content/application~1json/schema/properties/insert"
            },
            "maxItems": 10,
            "type": "array"
          }
        },
        "required": [
          "backbone",
          "inserts"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "items": {
                "description": "One logical junction in a cloning design (e.g. backbone–insert or insert–insert): which two parts are being joined and which Type IIS / IIP sticky enzymes are compatible at that junction (single-site in MCS for backbone cuts).\n",
                "properties": {
                  "part1_id": {
                    "$ref": "#/paths/~1backbone~1linearize~1selection/post/requestBody/content/application~1json/schema/properties/backbone/properties/id"
                  },
                  "part2_id": {
                    "$ref": "#/paths/~1backbone~1linearize~1selection/post/requestBody/content/application~1json/schema/properties/backbone/properties/id"
                  },
                  "restrictases": {
                    "items": {
                      "$ref": "#/paths/~1cloning~1pcr~1restriction/post/responses/200/content/application~1json/schema/properties/results/items"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "part1_id",
                  "part2_id",
                  "restrictases"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Ordered list of junction results."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
GET/cloning/restriction/restriction/supported_restrictasesSupported sticky Type IIP enzymes for restriction cloning

operationId restriction_cloning_supported_restrictases_get

Description

Alphabetical list of enzyme names from the curated sticky-end Type IIP catalog used when scoring backbone MCS cutters and compatible junction enzymes for `/cloning/restriction/restriction` workflows. Names match the restriction enzyme catalog used elsewhere on the API; inclusion here does not imply the enzyme cuts a particular sequence.

Authentication: Bearer required (same as other cloning routes).

No request body: Empty GET request.

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Restriction enzyme identifiers, ascending lexicographic order.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Sorted unique enzyme names."
  },
  "403": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/cloning/restriction/resultBuild GenBank for a restriction-cloning construct

operationId restriction_cloning_result

Description

Merges an insert (with primer binding and restriction annotations) into an existing GenBank record. Used after you have full primer sequences and restrictase positions from the primer endpoints.

Input: Plain-text GenBank (not a file upload)—the entire record as one string, including `ORIGIN` and `//`.

Output: 200 `results` is the full GenBank file as a string (not JSON-wrapped features). Failures in assembly return 500 with `message`, `error`, `success: false`.

Primer features: `primer_bind` entries use `/label` with the restrictase name when that name is recognized in the supported enzyme catalog (e.g. EcoRI, BamHI), so cloning history is visible in the file; unrecognized names use generic `forward_primer` / `reverse_primer` labels. `/note` still describes the restriction-site remnant.

Positions: `insertion_position_1` / `insertion_position_2` control insertion vs replacement modes as described in each field (single insertion when the second position is omitted).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "construct_name": {
            "description": "Locus / construct name for the output record.",
            "example": "pET28a_GFP_restriction",
            "type": "string"
          },
          "forward_primer_full_seq": {
            "description": "Full forward primer including overhangs and restriction site.",
            "example": "GGAATTCCATGGTGAGCAAGGGC",
            "type": "string"
          },
          "forward_primer_restrictase": {
            "description": "Enzyme name (optional). When recognized, used for remnant calculation and as the forward `primer_bind` /label in the output GenBank.\n",
            "example": "EcoRI",
            "nullable": true,
            "type": "string"
          },
          "forward_primer_restrictase_position": {
            "description": "1-based index of the cut/site within the forward primer sequence.",
            "example": 8,
            "minimum": 1,
            "type": "integer"
          },
          "input_gb": {
            "description": "Complete GenBank file content as a single string.",
            "example": "LOCUS       example_plasmid        4361 bp    DNA     circular SYN 01-JAN-1980\nDEFINITION  Example plasmid\nACCESSION   .\nVERSION   .\nKEYWORDS    .\nSOURCE      synthetic DNA construct\n  ORGANISM  synthetic DNA construct\nCOMMENT     \nFEATURES             Location/Qualifiers\n     source          1..4361\n                     /organism=\"synthetic DNA construct\"\n                     /mol_type=\"other DNA\"\nORIGIN      \n        1 atgcgtacgt cgaattcgag ctcggtaccc ggggatcctc tagagtcgac ctgcaggcat\n//\n",
            "type": "string"
          },
          "insert_name": {
            "example": "GFP",
            "type": "string"
          },
          "insert_sequence": {
            "description": "Insert DNA without primer overhangs (feature sequence).",
            "example": "ATGGTGAGCAAGGGCGAGGAG",
            "type": "string"
          },
          "insert_type": {
            "description": "Feature type label (e.g. CDS, gene)—stored in GenBank features.",
            "example": "CDS",
            "type": "string"
          },
          "insertion_position_1": {
            "description": "Primary 1-based insertion index into the sequence coordinate system.",
            "example": 100,
            "minimum": 1,
            "type": "integer"
          },
          "insertion_position_2": {
            "description": "Optional second position. When set with `insertion_position_1`, enables replacement-style logic (order determines whether the span between positions or its complement is replaced).\n",
            "example": 150,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "reverse_primer_full_seq": {
            "description": "Full reverse primer including overhangs and restriction site.",
            "example": "GGATCCCTTGTACAGCTCGTC",
            "type": "string"
          },
          "reverse_primer_restrictase": {
            "description": "Enzyme name (optional). When recognized, used for remnant calculation and as the reverse `primer_bind` /label in the output GenBank.\n",
            "example": "BamHI",
            "nullable": true,
            "type": "string"
          },
          "reverse_primer_restrictase_position": {
            "description": "1-based index of the cut/site within the reverse primer sequence.",
            "example": 7,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "input_gb",
          "construct_name",
          "insert_sequence",
          "insert_name",
          "insert_type",
          "insertion_position_1",
          "forward_primer_full_seq",
          "reverse_primer_full_seq",
          "forward_primer_restrictase_position",
          "reverse_primer_restrictase_position"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Full GenBank after insert and primer_bind annotations; /label carries enzyme names when recognized (see operation description).\n",
              "type": "string"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "GenBank text of the updated construct. primer_bind features use /label with recognized restrictase names when provided (see operation description); /note describes remnants.\n"
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "500": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
restriction1 operation

Restriction enzyme search and cut-site metadata

POST/tools/restrictionMulti-enzyme digest — sites, fragments, and size-sorted lengths

operationId tools_restriction

Description

Searches the given `sequence` for all listed enzymes using the server’s restriction catalog and cut-site search, returns cut sites sorted by position, fragment sequences in order along the sequence, and `sizes_sorted` (fragment lengths sorted ascending).

Circular: When `circular` is true, scanning treats the strand as circular, including recognition motifs whose footprint spans how `sequence` is written between the final and first residues. Fragment assembly wraps: the fragment from last cut through the end plus start up to first cut is the first entry in `sequences`, then intervals between successive cuts along the molecule.

Empty enzyme list: Returns no cuts; `sequences` is the full input (or empty), sizes reflect that.

Agents: Use `restrictases` for plotting cuts; use `sizes_sorted` for agarose band prediction (not the same order as `sequences`).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "circular": {
            "default": false,
            "description": "Treat `sequence` as circular for scanning and fragment generation (including sites across the nominal junction).",
            "type": "boolean"
          },
          "restrictase_names": {
            "description": "Enzyme names from the supported catalog (e.g. EcoRI).",
            "example": [
              "EcoRI",
              "BamHI"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sequence": {
            "description": "DNA sequence to search (linear unless `circular` is true).",
            "example": "ATGCGTACGTCG",
            "type": "string"
          }
        },
        "required": [
          "sequence",
          "restrictase_names"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "restrictases": {
                  "description": "Cuts sorted by ascending genomic position.",
                  "items": {
                    "$ref": "#/paths/~1cloning~1pcr~1restriction/post/responses/200/content/application~1json/schema/properties/results/items"
                  },
                  "type": "array"
                },
                "sequences": {
                  "description": "Fragment sequences in locus order (see circular note above).",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "sizes_sorted": {
                  "description": "Fragment lengths sorted smallest to largest.",
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                }
              },
              "required": [
                "restrictases",
                "sequences",
                "sizes_sorted"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Cut map and fragment breakdown."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
tools4 operations

Sequence utilities (multi-enzyme digest fragments)

POST/tools/sequence/back_transcribeBack-transcribe RNA to DNA

operationId tools_sequence_back_transcribe

Description

Returns the DNA sequence for an RNA template: uracil (U) becomes thymine (T). Whitespace is stripped; letters are case-insensitive. Invalid symbols yield 422.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "sequence": {
            "description": "RNA nucleotide sequence (IUPAC).",
            "example": "AUGC",
            "type": "string"
          }
        },
        "required": [
          "sequence"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Result of RNA→DNA back-transcription. The `sequence` field is DNA: uses A, C, G, and T (no U). Length matches the normalized input RNA; output is uppercase with no whitespace.\n",
              "properties": {
                "sequence": {
                  "description": "DNA sequence (thymine in place of uracil from the RNA).",
                  "example": "ATGC",
                  "type": "string"
                }
              },
              "required": [
                "sequence"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "DNA sequence in `results.sequence`."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/tools/sequence/reverse_complementReverse complement nucleotide sequence

operationId tools_sequence_reverse_complement

Description

Returns the reverse complement of the input. Works for DNA or RNA (alphabet inferred from sequence content). Whitespace is stripped; case is ignored. Invalid letters yield 422.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "sequence": {
            "description": "DNA or RNA nucleotide sequence (IUPAC).",
            "example": "ATGC",
            "type": "string"
          }
        },
        "required": [
          "sequence"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Result of reverse complement. The `sequence` field is nucleotide sequence on the opposite strand, 5'→3' relative to the reverse of the input: same alphabet class as the input (DNA with T and/or RNA with U, as inferred from your input), uppercase, no whitespace, same length as the normalized input.\n",
              "properties": {
                "sequence": {
                  "description": "Reverse-complement nucleotide sequence (DNA or RNA, matching input type).",
                  "example": "GCAT",
                  "type": "string"
                }
              },
              "required": [
                "sequence"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Reverse-complement sequence in `results.sequence`."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/tools/sequence/transcribeTranscribe DNA to RNA

operationId tools_sequence_transcribe

Description

Returns the RNA sequence for a DNA template: thymine (T) is represented as uracil (U) in the output. Input may contain whitespace, which is stripped; letters are treated case-insensitively. Invalid symbols for the alphabet yield 422 with a message.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "sequence": {
            "description": "DNA nucleotide sequence (IUPAC).",
            "example": "ATGC",
            "type": "string"
          }
        },
        "required": [
          "sequence"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Result of DNA→RNA transcription. The `sequence` field is RNA: uses A, C, G, and U (no T). Length matches the normalized input DNA; output is uppercase with no whitespace.\n",
              "properties": {
                "sequence": {
                  "description": "RNA sequence (uracil in place of thymine from the template strand).",
                  "example": "AUGC",
                  "type": "string"
                }
              },
              "required": [
                "sequence"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "RNA sequence in `results.sequence`."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/tools/sequence/translateTranslate nucleotides to protein

operationId tools_sequence_translate

Description

Translates a DNA or RNA coding sequence to a one-letter amino acid sequence using the selected genetic code table (default 1, standard code). Optional flags match common use: stop at first stop codon (`to_stop`), or validate as a complete CDS (`cds`). Length or codon issues yield 422 with `message` (and `errors[].msg`) describing CDS / table rules—not a generic rejection only.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "cds": {
            "default": false,
            "description": "Strict CDS mode: validates the sequence against the genetic table (length divisible by three, leading in-frame start codon, terminating stop codon, and CDS rules).\n",
            "type": "boolean"
          },
          "sequence": {
            "description": "DNA or RNA nucleotide sequence (IUPAC); whitespace stripped.",
            "example": "ATGAAATAG",
            "type": "string"
          },
          "to_stop": {
            "default": false,
            "description": "If true, translation ends at the first in-frame stop codon (excluded).",
            "type": "boolean"
          },
          "translation_table": {
            "default": 1,
            "description": "Genetic code table identifier (NCBI-style numeric id).",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "sequence"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Result of nucleotide→protein translation. The `sequence` field is a protein: standard one-letter amino acid codes (e.g. M, K, * for stop). Stops and length depend on options (`to_stop`, `cds`) and the genetic code table used.\n",
              "properties": {
                "sequence": {
                  "description": "Translated polypeptide as a single-letter amino acid string.",
                  "example": "MK*",
                  "type": "string"
                }
              },
              "required": [
                "sequence"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Protein sequence in `results.sequence`."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
backbone2 operations

Linearize plasmid or fragment by positions or by enzyme digest

POST/backbone/linearize/restrictionLinearize backbone by restriction digest (one or two enzymes)

operationId backbone_linear_restriction

Description

Cuts a circular backbone with the server’s restriction-enzyme catalog: one enzyme (`end_restrictase` empty string) opens the circle once and returns that full-length linear molecule; two enzymes cut once each at distinct sites—typically framing the cloning region—and return rest of the linearized backbone, i.e. the remaining vector molecule after dropping the intervening fragment. Requires that the provided restrictases cut the backbone sequence once and only once (or not at all, if `end_restrictase` is empty).

Request: `start_restrictase` is required. For a single-enzyme linearization, `end_restrictase` can be omitted or sent as `""` (empty string)—the server treats that as “only `start_restrictase`”.

Backbone topology: Supply a circular plasmid sequence for typical cloning use.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "backbone": {
            "$ref": "#/paths/~1backbone~1linearize~1selection/post/requestBody/content/application~1json/schema/properties/backbone"
          },
          "end_restrictase": {
            "description": "Second enzyme, or empty string `\"\"` for single digest (use `\"\"` for one enzyme).\n",
            "example": "BamHI",
            "nullable": true,
            "type": "string"
          },
          "start_restrictase": {
            "description": "First (or only) enzyme name from the supported catalog.",
            "example": "EcoRI",
            "type": "string"
          }
        },
        "required": [
          "backbone",
          "start_restrictase",
          "end_restrictase"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "seq": {
                  "description": "DNA sequence",
                  "example": "GGGTTTCCCAAAGGGTTTCCCAAATTAAGGCCTGCC",
                  "type": "string"
                }
              },
              "required": [
                "seq"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Linear backbone sequence after digest—full circle opened once for single-enzyme, or the longest arm after dual digest."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/backbone/linearize/selectionLinearize backbone by removing a segment (position-based)

operationId backbone_linear_selection

Description

Returns the linearized vector (sequence after excising the inclusive 1-based segment `[left_position, right_position]`). The excised fragment is discarded; this is the backbone you would ligate or amplify after removing an MCS region.

Adjacent cut: To open between two neighboring bases (no segment removed), use `left_position = right_position + 1` (e.g. between base 5 and base 6: `left=6`, `right=5`).

Seam cut (between last base and first): On a circle there is no base “after” the last index inside 1..L, so use `left_position = len(seq) + 1` with `right_position = len(seq)`, or equivalently `left_position = 1` and `right_position = 0`. That linearizes the full sequence without removing bases (same string; annotations stay aligned when using `input_gb`).

Optional GenBank: When `input_gb` is provided (full circular GenBank whose sequence matches `backbone.seq`), the response includes `results.genbank`: a linear record with features remapped to the new coordinates.

When to use enzymes instead: For cloning digests, prefer `/backbone/linearize/restriction` when you know the enzyme pair.

Backbone: `topology`, `mcs_start`, and `mcs_end` default as in the Backbone schema (circular plasmid, MCS often the full sequence unless narrowed).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "backbone": {
            "description": "Plasmid or linear fragment with optional MCS bounds. Omitted `topology`, `mcs_start`, and `mcs_end` default to circular topology, MCS start 1, and MCS end equal to the length of `seq` (whole sequence treated as the cloning region).\n",
            "properties": {
              "id": {
                "description": "The unique identifier of entity",
                "example": "cbaa39ef-97cf-4db7-8eaf-d65d94e11bea",
                "type": "string"
              },
              "mcs_end": {
                "description": "Multi-cloning site end (1-based), inclusive. If omitted, defaults to the length of `seq` (last base of the sequence).\n",
                "format": "int32",
                "minimum": 0,
                "nullable": true,
                "type": "number"
              },
              "mcs_start": {
                "default": 1,
                "description": "Multi-cloning site start (1-based position in `seq`), inclusive. Default 1 (first base); with default `mcs_end` the full sequence is used for MCS restriction logic.\n",
                "format": "int32",
                "minimum": 1,
                "type": "number"
              },
              "seq": {
                "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
              },
              "topology": {
                "default": "circular",
                "description": "Backbone topology; defaults to circular (typical plasmid).",
                "enum": [
                  "linear",
                  "circular"
                ],
                "type": "string"
              }
            },
            "required": [
              "id",
              "seq"
            ],
            "type": "object"
          },
          "input_gb": {
            "description": "Optional circular GenBank (full file text). Sequence must match `backbone.seq`. When set, `results.genbank` is the linearized record with remapped features.\n",
            "nullable": true,
            "type": "string"
          },
          "left_position": {
            "description": "1-based inclusive start of the segment to remove, or `len(seq)+1` for a seam cut (with `right_position = len(seq)`).\n",
            "minimum": 1,
            "type": "integer"
          },
          "right_position": {
            "description": "1-based inclusive end of the segment to remove; use **0** only with `left_position = 1` for a seam cut (between last and first base).\n",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "backbone",
          "left_position",
          "right_position"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "genbank": {
                  "description": "Present when `input_gb` was sent: linear GenBank with features remapped to match `seq`.\n",
                  "nullable": true,
                  "type": "string"
                },
                "seq": {
                  "description": "Linearized backbone (remaining sequence after excision).",
                  "type": "string"
                }
              },
              "required": [
                "seq"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Linear backbone sequence in `results.seq`; optional GenBank in `results.genbank`."
  },
  "400": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "error": {
              "description": "Present on some 500 responses with an implementation error string.",
              "type": "string"
            },
            "errors": {
              "description": "Validation detail; list of structured error objects when present.",
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "array"
            },
            "message": {
              "description": "Human-readable summary (e.g. \"Invalid input\", \"Request body is empty\").",
              "type": "string"
            },
            "success": {
              "example": false,
              "type": "boolean"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "Client or validation failure. Invalid JSON or empty body returns 400 with `message` and `success: false`. Schema or business-rule failures return 422 with `errors` (field-level list) or a single value_error entry. Authentication failures use **403** with a JSON body (shape may differ slightly from validation errors).\n"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
primers1 operation

PCR primer design (simple or cloning-specific)

POST/primers/simpleDesign simple PCR primers for a linear insert

operationId primers_simple

Description

Designs PCR primers for the insert sequence: returns forward/reverse primer metrics (seq, Tm, hairpin ΔG, homodimer ΔG, aggregate ΔG) and a product object with insert `seq`, recommended annealing temperature (min of the two Tm), and cross-primer ΔG.

`melting_temperature` / `annealing_temperature`: Interpret using the duplex Tm model described on those result fields—not hand-tuned NN defaults from typical notebook snippets.

RNA: Uracil is converted to thymine with a warning in logs (not an API error).

Failure: If no primers are found (e.g. extreme constraints), the server returns 500 with a generic error message.

Options: Omit `options` or `{}` for defaults (`min_tm` 60 °C, `min_length` 18 bp). The legacy key `min_primer_length` is still accepted and maps to `min_length`.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "insert": {
            "description": "DNA insert sequence (IUPAC; U→T for RNA-like input).",
            "example": "ATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGC",
            "type": "string"
          },
          "options": {
            "description": "Optional; defaults apply when omitted.",
            "properties": {
              "min_length": {
                "default": 18,
                "description": "Minimum primer length (bp) when extending toward the target Tm.\nDefault 18 bp; 15 bp is allowed for advanced users. Maximum 35 bp.\nClients may still send `min_primer_length` as an alias for this field.\n",
                "maximum": 35,
                "minimum": 15,
                "type": "integer"
              },
              "min_tm": {
                "default": 60,
                "description": "Target melting temperature (°C) for primer extension.",
                "format": "double",
                "maximum": 80,
                "minimum": 50,
                "type": "number"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "insert"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "forward": {
                  "properties": {
                    "gibbs_free_energy": {
                      "description": "For primer objects, the **minimum** (more favorable / more negative) of\n`hairpin_gibbs_free_energy` and `homodimer_gibbs_free_energy` — the dominant self-structure\nconcern in this model (kcal/mol).\n",
                      "example": -3.2,
                      "format": "double",
                      "nullable": true,
                      "type": "number"
                    },
                    "hairpin_gibbs_free_energy": {
                      "description": "Predicted minimum free energy (kcal/mol) of single-strand hairpin secondary structure for this\nDNA sequence, using a standard RNA secondary-structure energy model on a T→U representation of the\nsequence.\n",
                      "format": "double",
                      "type": "number"
                    },
                    "homodimer_gibbs_free_energy": {
                      "description": "Predicted minimum free energy (kcal/mol) of homodimer cofolding (two identical strands), using the\nsame RNA secondary-structure energy model on a T→U representation of the sequence.\n",
                      "format": "double",
                      "type": "number"
                    },
                    "melting_temperature": {
                      "allOf": [
                        {
                          "example": 50,
                          "format": "double",
                          "nullable": true,
                          "type": "number"
                        }
                      ],
                      "description": "Estimated primer **Tm** (°C) using the service’s fixed **nearest-neighbour** DNA duplex model with a\n**PCR-style mixed-ion correction**—monovalent cations allowing for typical buffer alkalinity, **Mg²⁺**, free\nnucleotide triphosphates, and **equimolar primer-sized strand concentrations** in the oligomer-duplex\napproximation (not empirical 2 °C / 4 °C‑per‑base shortcuts).\n\n**Which bases are modeled (by endpoint shape):**\n\n- **`/primers/simple`** — **each primer `seq`**, i.e. the full designed oligomer strand returned.\n\n- **`/cloning/restriction/primers`** and **`/cloning/restriction/primers_combined`** — **`annealing_sequence` only**,\n  the insert-binding core **without** the 5′ overhang fragments or enzyme-site tails aggregated into `full_seq`.\n\n- **`/cloning/gibson/primers`** — **`annealing_sequence` only**. **Homology overlaps** appended for assembly\n  are **excluded from this `Tm`**. Those tails are elongated until a **separate** sliding-window duplex target\n  for `options.overlap_tm`—see overlap option text on that operation—often **lighter ion chemistry**—so overlap\n  and insert **Tm numbers are not directly comparable.**\n\n**Comparing calculators:** Offline **Tm** tooling that skips magnesium and nucleotide corrections, lowers\nassumed strand concentration, sticks to sodium-only shorthand, or uses Wallace-type heuristics often prints\n**several °C lower** for the **same substring**.\n"
                    },
                    "seq": {
                      "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
                    }
                  },
                  "required": [
                    "seq",
                    "hairpin_gibbs_free_energy",
                    "homodimer_gibbs_free_energy",
                    "gibbs_free_energy",
                    "melting_temperature"
                  ],
                  "type": "object"
                },
                "product": {
                  "description": "Full sequence of the PCR product",
                  "properties": {
                    "annealing_temperature": {
                      "allOf": [
                        {
                          "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/melting_temperature/allOf/0"
                        }
                      ],
                      "description": "Recommended PCR anneal (°C) derived from primer **Tm** fields that use the fixed nearest-neighbour +\nmixed-ion model on this API (typically the minimum of forward and reverse melting temperatures).\n"
                    },
                    "cross_primer_gibbs_free_energy": {
                      "allOf": [
                        {
                          "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward/properties/gibbs_free_energy"
                        }
                      ],
                      "description": "Gibbs free energy of forward and reverse primer dimers (kcal/mol)."
                    },
                    "seq": {
                      "$ref": "#/paths/~1backbone~1linearize~1restriction/post/responses/200/content/application~1json/schema/properties/results/properties/seq"
                    }
                  },
                  "type": "object"
                },
                "reverse": {
                  "$ref": "#/paths/~1primers~1simple/post/responses/200/content/application~1json/schema/properties/results/properties/forward"
                }
              },
              "required": [
                "forward",
                "reverse",
                "product"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Designed primers and in silico product summary."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
pcr_cloning3 operations

PCR-based insert–vector constructs, blunt MCS cutters, GenBank export

POST/cloning/pcr/constructsTwo possible insert–vector concatamers (insert vs reverse complement)

operationId pcr_cloning_constructs

Description

Returns two linear sequences: `linear_backbone + insert` and `linear_backbone + reverse_complement(insert)`. Does not check compatibility or open ends— callers use this as a quick combinatorial preview for PCR cloning design.

Inputs: Both strings must be non-empty (else 422).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "insert": {
            "description": "Insert sequence in 5'→3' orientation relative to your design.",
            "example": "ATGCGTACGTCG",
            "type": "string"
          },
          "linear_backbone": {
            "description": "Linearized vector sequence (already cut / ready for ligation context).",
            "example": "ATGCGTACGTCG",
            "type": "string"
          }
        },
        "required": [
          "linear_backbone",
          "insert"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "items": {
                "description": "One possible full-length linear construct.",
                "type": "string"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Exactly two construct strings."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/cloning/pcr/restrictionBlunt MCS cutters for PCR cloning (circular backbone only)

operationId pcr_cloning_restriction

Description

Returns enzymes from the supported catalog that cut once, blunt, with the site in the MCS (`mcs_start`…`mcs_end` on `backbone.seq`). Used to pick a vector linearization enzyme for PCR cloning workflows.

Linear backbones: Returns []—there is no circular MCS context.

Shape: Flat array of `{ name, position }` objects (not `restriction_part_pair`). Same item schema as enzyme rows in `/tools/restriction`.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "backbone": {
            "$ref": "#/paths/~1backbone~1linearize~1selection/post/requestBody/content/application~1json/schema/properties/backbone"
          }
        },
        "required": [
          "backbone"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "items": {
                "description": "One restriction enzyme with optional 1-based cut position. Used for digest tools and MCS enzyme lists; `position` may be null in rare internal cases (enzyme name without a mapped cut).\n",
                "properties": {
                  "name": {
                    "example": "EcoRI",
                    "type": "string"
                  },
                  "position": {
                    "description": "1-based position of the cut on the forward strand when applicable.",
                    "format": "int32",
                    "minimum": 1,
                    "nullable": true,
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Zero or more candidate enzymes with 1-based cut positions in the MCS."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
POST/cloning/pcr/resultBuild GenBank for a PCR cloning construct

operationId pcr_cloning_result

Description

Inserts amplified insert sequence into a GenBank plasmid at defined positions, with optional primer and restriction highlights. 200 returns GenBank text in `results` (string).

Optional primers: `forward_primer` / `reverse_primer` annotate binding sites when provided.

`restrictase_names`: Optional list of enzyme names to add as feature highlights.

`use_reverse_complement`: When true, the insert may be reverse-complemented and primer roles adjusted accordingly for the output record.

500 on processing errors with `message`, `error`, `success: false`.

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "construct_name": {
            "example": "pET28a_GFP",
            "type": "string"
          },
          "forward_primer": {
            "example": "ATGGTGAGCAAGGGC",
            "nullable": true,
            "type": "string"
          },
          "input_gb": {
            "description": "Complete GenBank file as a single string.",
            "example": "LOCUS       example_plasmid        4361 bp    DNA     circular SYN 01-JAN-1980\nDEFINITION  Example plasmid\nACCESSION   .\nVERSION   .\nKEYWORDS    .\nSOURCE      synthetic DNA construct\n  ORGANISM  synthetic DNA construct\nCOMMENT     \nFEATURES             Location/Qualifiers\n     source          1..4361\n                     /organism=\"synthetic DNA construct\"\n                     /mol_type=\"other DNA\"\nORIGIN      \n        1 atgcgtacgt cgaattcgag ctcggtaccc ggggatcctc tagagtcgac ctgcaggcat\n//\n",
            "type": "string"
          },
          "insert_name": {
            "example": "GFP",
            "type": "string"
          },
          "insert_sequence": {
            "example": "ATGGTGAGCAAGGGCGAGGAG",
            "type": "string"
          },
          "insert_type": {
            "example": "CDS",
            "type": "string"
          },
          "insertion_position_1": {
            "example": 100,
            "minimum": 1,
            "type": "integer"
          },
          "insertion_position_2": {
            "example": 150,
            "minimum": 1,
            "nullable": true,
            "type": "integer"
          },
          "restrictase_names": {
            "example": [
              "EcoRI",
              "BamHI",
              "HindIII"
            ],
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "reverse_primer": {
            "example": "CTTGTACAGCTCGTC",
            "nullable": true,
            "type": "string"
          },
          "use_reverse_complement": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "input_gb",
          "construct_name",
          "insert_sequence",
          "insert_name",
          "insert_type",
          "insertion_position_1"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "description": "Full GenBank record text after insertion and annotations.",
              "type": "string"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "GenBank text of the new construct."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "500": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
codon_optimization1 operation

Host-aware codon usage while avoiding specified restriction sites

POST/codon/optimizationCodon optimization with restriction-site avoidance

operationId codon_optimization

Description

Rewrites coding DNA for the given `host` codon usage while eliminating recognition sites for the listed `restrictases`. Returns a single optimized sequence in `results.optimized_seq`.

`restriction_sites_only`: When true, only codons overlapping restriction sites are recoded; remainder of the sequence is unchanged (e.g. targeted mutagenesis).

Failures: Library exceptions return 500 with `message`, `error`, `success: false`.

Host: Default `e.coli`; only host labels supported by the service are accepted (invalid values yield an error response).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "host": {
            "default": "e.coli",
            "description": "Target expression host label for codon tables.",
            "example": "e.coli",
            "type": "string"
          },
          "insert_seq": {
            "description": "DNA coding sequence to optimize (in-frame).",
            "example": "ATGGTGAGCAAGGGCGAGGGCGAGGGCCGACGGC",
            "type": "string"
          },
          "restrictases": {
            "description": "Enzyme names whose sites must not appear in the output.",
            "example": [
              "EcoRI",
              "BamHI"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "restriction_sites_only": {
            "default": false,
            "description": "If true, only recode codons overlapping restriction sites.",
            "type": "boolean"
          }
        },
        "required": [
          "insert_seq",
          "restrictases"
        ],
        "type": "object"
      }
    }
  }
}

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "results": {
              "properties": {
                "optimized_seq": {
                  "description": "DNA sequence after optimization (same protein, no listed cut sites).",
                  "example": "ATGGTGAGCAAGGGCGAGGGCGAGGGCCGACGGC",
                  "type": "string"
                }
              },
              "required": [
                "optimized_seq"
              ],
              "type": "object"
            },
            "status": {
              "enum": [
                "success"
              ],
              "type": "string"
            }
          },
          "required": [
            "status",
            "results"
          ],
          "type": "object"
        }
      }
    },
    "description": "Optimized coding sequence."
  },
  "400": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "422": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  },
  "500": {
    "$ref": "#/paths/~1backbone~1linearize~1selection/post/responses/400"
  }
}
api_admin1 operation

Administrative operations (API key provisioning; admin bearer required)

POST/admin/api-keysCreate a new API key (admin only)

operationId admin_api_keys_create

Description

Provisions a new bearer API key in the usage database with configurable daily and monthly token caps. The returned `api_key` value is the secret clients send as `Authorization: Bearer <api_key>`.

Who may call: Only admin keys (configured via environment; not the same as database-provisioned keys). Any other valid key receives 403 with an admin-only message.

Infrastructure: Requires the API key database to be configured. If it is not, the server returns 503.

Limits: Omitted body fields default to 30 000 daily and 900 000 monthly token units. Values must be non-negative numbers.

Key value: Omit `api_key` (or send `null`) to let the server generate a random UUID. To supply your own secret (e.g. align with another system), pass a non-empty string up to 128 characters; it must not collide with an existing row (409 if duplicate).

Request body

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "api_key": {
            "description": "Optional bearer secret. If omitted or null, a new UUID is generated. If set, must\nbe unique and is stored as-is (trimmed).\n",
            "maxLength": 128,
            "type": "string"
          },
          "daily_limit_tokens": {
            "default": 30000,
            "description": "Maximum token units per UTC day.",
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "monthly_limit_tokens": {
            "default": 900000,
            "description": "Maximum token units per UTC month.",
            "format": "double",
            "minimum": 0,
            "type": "number"
          }
        },
        "type": "object"
      }
    }
  },
  "required": false
}

Responses

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "api_key": {
              "description": "Secret bearer value for `Authorization: Bearer <api_key>`. Store securely; it is not\nshown again by the API.\n",
              "type": "string"
            },
            "created_at": {
              "description": "Creation timestamp (server time).",
              "format": "date-time",
              "type": "string"
            },
            "daily_limit_tokens": {
              "description": "Maximum token units allowed per UTC calendar day for this key.",
              "format": "double",
              "type": "number"
            },
            "id": {
              "description": "Database row id for the new key.",
              "format": "int64",
              "type": "integer"
            },
            "monthly_limit_tokens": {
              "description": "Maximum token units allowed per UTC calendar month for this key.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "id",
            "api_key",
            "daily_limit_tokens",
            "monthly_limit_tokens"
          ],
          "type": "object"
        }
      }
    },
    "description": "Key created; response includes the new secret `api_key` once."
  },
  "400": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "error": {
              "example": "Bad Request",
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "status": {
              "example": 400,
              "type": "integer"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "Invalid body (limits not numbers/negative, or invalid optional `api_key`)."
  },
  "403": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "error": {
              "example": "Forbidden",
              "type": "string"
            },
            "message": {
              "example": "Admin access required.",
              "type": "string"
            },
            "status": {
              "example": 403,
              "type": "integer"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "Missing admin privileges (valid bearer but not an admin key)."
  },
  "409": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "error": {
              "example": "Conflict",
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "status": {
              "example": 409,
              "type": "integer"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "Duplicate `api_key` when a custom value was supplied; choose another or omit to auto-generate."
  },
  "503": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "error": {
              "example": "Service Unavailable",
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "status": {
              "example": 503,
              "type": "integer"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "API key database not configured."
  }
}
quota1 operation

Usage limits and consumption for authenticated keys

GET/quota/limitsGet current usage limits and consumption

operationId quota_limits_get

Description

Returns the authenticated key’s configured caps and how many token units have been used in the current UTC calendar day and month.

Quota behavior: This call does not consume token units or require spare capacity. It remains available even when daily or monthly limits are already exhausted for other endpoints.

Admin keys: Respond with `tier: admin` and `unlimited: true` plus the current UTC `period` labels (no numeric limits).

Standard keys: Keys provisioned via `POST /admin/api-keys` include numeric limits, used amounts, and non-negative remainders.

Errors: 403 if the bearer is not a known key; 503 if the database is not configured for non-admin keys.

Responses

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "description": "Shape depends on `tier`. **admin** keys report unlimited usage. **standard** keys (stored\nkeys) include configured caps and current usage for the UTC day and month in `period`.\n",
          "properties": {
            "api_key_id": {
              "description": "Present when `tier` is `standard`.",
              "format": "int64",
              "type": "integer"
            },
            "daily_limit_tokens": {
              "description": "Configured daily cap (standard keys).",
              "format": "double",
              "type": "number"
            },
            "daily_remaining_tokens": {
              "description": "Non-negative remainder for the current UTC day.",
              "format": "double",
              "type": "number"
            },
            "daily_used_tokens": {
              "description": "Token units consumed so far today (UTC), before this request.",
              "format": "double",
              "type": "number"
            },
            "error": {
              "description": "Present only on rare internal failures when loading metadata.",
              "type": "string"
            },
            "message": {
              "description": "Human-readable detail when `error` is present.",
              "type": "string"
            },
            "monthly_limit_tokens": {
              "description": "Configured monthly cap (standard keys).",
              "format": "double",
              "type": "number"
            },
            "monthly_remaining_tokens": {
              "description": "Non-negative remainder for the current UTC month.",
              "format": "double",
              "type": "number"
            },
            "monthly_used_tokens": {
              "description": "Token units consumed so far this month (UTC), before this request.",
              "format": "double",
              "type": "number"
            },
            "period": {
              "properties": {
                "utc_day": {
                  "description": "UTC date label for the daily window.",
                  "example": "2026-04-03",
                  "type": "string"
                },
                "utc_month": {
                  "description": "UTC year-month label for the monthly window.",
                  "example": "2026-04",
                  "type": "string"
                }
              },
              "required": [
                "utc_day",
                "utc_month"
              ],
              "type": "object"
            },
            "tier": {
              "enum": [
                "admin",
                "standard"
              ],
              "type": "string"
            },
            "unlimited": {
              "description": "Present and `true` when `tier` is `admin`.",
              "type": "boolean"
            }
          },
          "required": [
            "tier",
            "period"
          ],
          "type": "object"
        }
      }
    },
    "description": "Current limits and usage snapshot."
  },
  "403": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "error": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "status": {
              "example": 403,
              "type": "integer"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "Invalid API key (or forbidden for this operation)."
  },
  "503": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "error": {
              "example": "Service Unavailable",
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "status": {
              "example": 503,
              "type": "integer"
            }
          },
          "type": "object"
        }
      }
    },
    "description": "API key database not configured (non-admin callers)."
  }
}

Same OpenAPI document as https://api.nexio.bio/; styling matches this app.