---
title: "Band size from a gel, against a marked ladder"
method: POST
path: "/gel_band_size"
tags: ["Enzymes & cloning"]
---

# Band size from a gel, against a marked ladder

`POST /gel_band_size`

## Request

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

Calibrate a gel lane against a marked DNA ladder and read the size of any other band from how far it ran. Migration distance is approximately linear in log(size) over a gel's resolving range, so a least-squares line through the marked rungs interpolates between them — and NOT outside them, which is why a band beyond the marked span comes back flagged `extrapolated` rather than quietly clamped to the nearest rung. Reports R² and the per-rung residual, because one mis-marked rung (a doublet marked as one band, a mis-clicked centre) shifts every size on the gel and a single R² hides it. Distances may be in pixels, millimetres or anything else, as long as they are all measured the same way from the same reference line.

## Request body

- object
  - `ladder` string, required: Which ladder is in the marked lane. One of: 1 kb, GeneRuler 1 kb, 1 kb Plus, 1 kb Plus (legacy), 100 bp.
  - `ladderDistances` number[], required: How far each visible ladder band ran, in any consistent unit, measured from the same reference line (the well) as the query bands. Order does not matter — they are sorted and matched to the ladder's sizes largest-first, since a larger fragment runs less far. At least 3: two points fit a line exactly, so they cannot show whether the ladder was marked correctly.
  - `bandDistances` number[]: How far each band you want a size for ran, in the same unit from the same reference line. May be empty: the fit and its per-rung residuals are an answer on their own, and are how you find out the ladder was marked correctly before reading anything off it.

## 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)
