67trust / 100

Lab Compile

by Laboratory-Protocol Compiler in Developer tools

x402 APIPassing, checked 5 h ago

Compile a liquid-handling plan (Flex robot, pipettes, deck labware, liquids, transfer/distribute/serial-dilute/mix/delay steps) into a self-contained Python protocol, run a static volume tracker and a real opentrons simulation, and return a pass/fail report with platemap, reagent-usage, and simulation-log artifacts. This proves the protocol runs, never that the experiment is scientifically valid.

POST
https://lab.api.williamrobinson.dev/v1/lab/compile
Price
$0.15
per call in USDC
Uptime
96.8%
last 30 days
Response time
807 ms
951 ms slowest 5%
Last check
Passed
5 h ago, next in 58 min

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://lab.api.williamrobinson.dev/v1/lab/compile

Each call costs $0.15 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://lab.api.williamrobinson.dev/v1/lab/compile
content-type: application/json

{
  "labware": [
    {
      "id": "plate",
      "label": "PCR plate",
      "slot": "A1",
      "type": "opentrons_96_wellplate_200ul_pcr_full_skirt"
    },
    {
      "id": "tips50",
      "label": "50 uL tips",
      "slot": "A2",
      "type": "opentrons_flex_96_tiprack_50ul"
    },
    {
      "id": "mmix_res",
      "label": "Master mix reservoir",
      "slot": "B1",
      "type": "nest_12_reservoir_15ml"
    },
    {
      "id": "tubes",
      "label": "Sample tubes",
      "slot": "B2",
      "type": "opentrons_24_tuberack_nest_1.5ml_snapcap"
    }
  ],
  "liquids": [
    {
      "deadVolumeUl": 300,
      "id": "mastermix",
      "location": {
        "labware": "mmix_res",
        "volumeUl": 5000,
        "wells": "A1"
      },
      "name": "PCR master mix"
    },
    {
      "deadVolumeUl": 20,
      "id": "samples",
      "location": {
        "labware": "tubes",
        "volumeUl": 200,
        "wells": "A1:D2"
      },
      "name": "Patient samples"
    }
  ],
  "name": "PCR setup with 8-sample column and column-12 dilution series",
  "options": {
    "defaultNewTip": "once",
    "forbidCrossLiquidTipReuse": true,
    "trashSlot": "A3"
  },
  "pipettes": [
    {
      "model": "flex_8channel_50",
      "mount": "left"
    },
    {
      "model": "flex_1channel_50",
      "mount": "right"
    }
  ],
  "robot": "flex",
  "steps": [
    {
      "dests": {
        "labware": "plate",
        "wells": "A1:H12"
      },
      "kind": "distribute",
      "newTip": "once",
      "source": {
        "labware": "mmix_res",
        "well": "A1"
      },
      "volumeUl": 20
    },
    {
      "dest": {
        "labware": "plate",
        "well": "A1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "A1"
      },
      "volumeUl": 5
    },
    {
      "dest": {
        "labware": "plate",
        "well": "B1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "A2"
      },
      "volumeUl": 5
    },
    {
      "dest": {
        "labware": "plate",
        "well": "C1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "B1"
      },
      "volumeUl": 5
    },
    {
      "dest": {
        "labware": "plate",
        "well": "D1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "B2"
      },
      "volumeUl": 5
    },
    {
      "dest": {
        "labware": "plate",
        "well": "E1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "C1"
      },
      "volumeUl": 5
    },
    {
      "dest": {
        "labware": "plate",
        "well": "F1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "C2"
      },
      "volumeUl": 5
    },
    {
      "dest": {
        "labware": "plate",
        "well": "G1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "D1"
      },
      "volumeUl": 5
    },
    {
      "dest": {
        "labware": "plate",
        "well": "H1"
      },
      "kind": "transfer",
      "newTip": "always",
      "source": {
        "labware": "tubes",
        "well": "D2"
      },
      "volumeUl": 5
    },
    {
      "kind": "serial_dilute",
      "labware": "plate",
      "mixRepetitions": 3,
      "mixUl": 15,
      "newTip": "always",
      "transferUl": 10,
      "wells": "A12:H12"
    },
    {
      "kind": "delay",
      "message": "Incubate before sealing",
      "seconds": 60
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
labwarearray of objectYes
liquidsarray of objectYes
namestringYes
optionsobjectYes
pipettesarray of objectYes
robotanyYesOpentrons Flex only; OT-2 is not supported (opentrons 9.x's simulator refuses OT-2 protocols).
stepsarray of objectYes

Example response

The provider's example. We can't check it without paying. Shortened for display.

Example response, 301 lines
{
  "artifacts": [
    {
      "href": "https://lab.api.williamrobinson.dev/v1/lab/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/protocol.py",
      "mediaType": "text/x-python; charset=utf-8",
      "name": "protocol.py",
      "sha256": "02d424abe63b8fd8b2717803b5f3690504e09d695142ece16d8b0f03f7174dba",
      "sizeBytes": 6561
    },
    {
      "href": "https://lab.api.williamrobinson.dev/v1/lab/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/platemap.csv",
      "mediaType": "text/csv; charset=utf-8",
      "name": "platemap.csv",
      "sha256": "9dc370d60f4ac51c9036bc6d33d90c5af5d24a74ed2adae0a1b7ade1fd76d9f9",
      "sizeBytes": 2425
    },
    {
      "href": "https://lab.api.williamrobinson.dev/v1/lab/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/platemap.svg",
      "mediaType": "image/svg+xml",
      "name": "platemap.svg",
      "sha256": "c2dc914c4c34cb6d879352e0ed8d66e3f285904e82e3f61ba27b659ba03fc70d",
      "sizeBytes": 23733
    },
    {
      "href": "https://lab.api.williamrobinson.dev/v1/lab/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/reagents.csv",
      "mediaType": "text/csv; charset=utf-8",
      "name": "reagents.csv",
      "sha256": "3dabbe14d42a323cf294de9b0219d8d66f2cc5867ab4ea86c4925aca057cf7ce",
      "sizeBytes": 196
    },
    {
      "href": "https://lab.api.williamrobinson.dev/v1/lab/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/simulation-log.txt",
      "mediaType": "text/plain; charset=utf-8",
      "name": "simulation-log.txt",
      "sha256": "11946c6bdbe0ad5d64ecdc45d36fca4422bde6327a0cd9be02e8ebfa2a60d1bb",
      "sizeBytes": 12799
    },
    {
      "href": "https://lab.api.williamrobinson.dev/v1/lab/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/report.json",
      "mediaType": "application/json",
      "name": "report.json",
      "sha256": "bccaa49a8943c4008b6ea10c0126367ec6bc64489151a08de291d9ad834ba173",
      "sizeBytes": 10756
    }
  ],
  "checks": [
    {
      "code": "plan_valid",
      "detail": "111 elementary transfer(s) across 4 labware and 2 pipette(s) resolved cleanly",
      "status": "passed"
    },
    {
      "code": "labware_compatible",
      "detail": "every pipette has a compatible tip rack and every multi-channel step is column-aligned",
      "status": "passed"
    },
    {
      "code": "volumes_within_capacity",
      "detail": "no well exceeds its fill limit",
      "status": "passed"
    },
    {
      "code": "liquids_sufficient",
      "detail": "every source liquid has enough usable volume",
      "status": "passed"
    },
    {
      "code": "pipette_ranges_respected",
      "detail": "every transfer volume is within its pipette's range",
      "status": "passed"
    },
    {
      "code": "tips_sufficient",
      "detail": "loaded tip racks cover every pickup",
      "status": "passed"
    },
    {
      "code": "tip_reuse_safe",
      "detail": "no tip touched two different liquids without a fresh pickup",
      "status": "passed"
    },
    {
      "code": "simulation_passed",
      "detail": "147 simulated command(s)",
      "status": "passed"
    }
  ],
  "expiresAt": "2026-09-12T08:10:35.369Z",
  "findings": [],
  "limitations": [
    "Simulation proves the protocol is executable by Opentrons robot software; it is not proof that the underlying experiment is scientifically valid.",
    "No liquid-class or viscosity modelling is performed; every transfer is assumed ideal (no air gaps, splashing, or evaporation effects).",
    "The static volume tracker assumes declared dead volumes are accurate; it cannot detect physically inaccessible liquid the caller did not declare.",
    "OT-2 robots are not supported in v1; every generated protocol targets Opentrons Flex only.",
    "The simulator does not check well overfill; the well_overflow finding above is this compiler's own static check."
  ],
  "liquids": [
    {
      "availableUl": 5000,
      "consumedUl": 1920,
      "id": "mastermix",
      "name": "PCR master mix",
      "remainingUl": 3080,
      "shortfallUl": 0
    },
    {
      "availableUl": 1600,
      "consumedUl": 40,
      "id": "samples",
      "name": "Patient samples",
      "remainingUl": 1560,
      "shortfallUl": 0
    }
  ],
  "robot": "flex",
  "simulation": {
    "commands": 147,
    "error": null,
    "ok": true,
    "ran": true
  },
  "status": "passed",
  "summary": {
    "estimatedMinutes": 13.63,
    "labware": 4,
    "liquids": 2,
    "steps": 11,
    "tipsUsed": {
      "left": 8,
      "right": 15
    },
    "transfers": 111
  },
  "tools": {
    "apiLevel": "2.20",
    "opentrons": "9.1.2"
  },
  "truncated": true,
  "warnings": [],
  "wells": [
    {
      "labware": "mmix_res",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 3080,
      "well": "A1"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix",
        "samples"
      ],
      "volumeUl": 25,
      "well": "A1"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A2"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A3"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A4"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A5"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A6"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A7"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A8"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A9"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A10"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "A11"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 10,
      "well": "A12"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix",
        "samples"
      ],
      "volumeUl": 25,
      "well": "B1"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "B2"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "B3"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "B4"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "B5"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
      "well": "B6"
    },
    {
      "labware": "plate",
      "liquids": [
        "mastermix"
      ],
      "volumeUl": 20,
…

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.15.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://lab.api.williamrobinson.dev/v1/lab/compile' \
  -H 'content-type: application/json' \
  --data-raw '{"labware":[{"id":"plate","label":"PCR plate","slot":"A1","type":"opentrons_96_wellplate_200ul_pcr_full_skirt"},{"id":"tips50","label":"50 uL tips","slot":"A2","type":"opentrons_flex_96_tiprack_50ul"},{"id":"mmix_res","label":"Master mix reservoir","slot":"B1","type":"nest_12_reservoir_15ml"},{"id":"tubes","label":"Sample tubes","slot":"B2","type":"opentrons_24_tuberack_nest_1.5ml_snapcap"}],"liquids":[{"deadVolumeUl":300,"id":"mastermix","location":{"labware":"mmix_res","volumeUl":5000,"wells":"A1"},"name":"PCR master mix"},{"deadVolumeUl":20,"id":"samples","location":{"labware":"tubes","volumeUl":200,"wells":"A1:D2"},"name":"Patient samples"}],"name":"PCR setup with 8-sample column and column-12 dilution series","options":{"defaultNewTip":"once","forbidCrossLiquidTipReuse":true,"trashSlot":"A3"},"pipettes":[{"model":"flex_8channel_50","mount":"left"},{"model":"flex_1channel_50","mount":"right"}],"robot":"flex","steps":[{"dests":{"labware":"plate","wells":"A1:H12"},"kind":"distribute","newTip":"once","source":{"labware":"mmix_res","well":"A1"},"volumeUl":20},{"dest":{"labware":"plate","well":"A1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"A1"},"volumeUl":5},{"dest":{"labware":"plate","well":"B1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"A2"},"volumeUl":5},{"dest":{"labware":"plate","well":"C1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"B1"},"volumeUl":5},{"dest":{"labware":"plate","well":"D1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"B2"},"volumeUl":5},{"dest":{"labware":"plate","well":"E1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"C1"},"volumeUl":5},{"dest":{"labware":"plate","well":"F1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"C2"},"volumeUl":5},{"dest":{"labware":"plate","well":"G1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"D1"},"volumeUl":5},{"dest":{"labware":"plate","well":"H1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"D2"},"volumeUl":5},{"kind":"serial_dilute","labware":"plate","mixRepetitions":3,"mixUl":15,"newTip":"always","transferUl":10,"wells":"A12:H12"},{"kind":"delay","message":"Incubate before sealing","seconds":60}]}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://lab.api.williamrobinson.dev/v1/lab/compile' \
  -H 'content-type: application/json' \
  --data-raw '{"labware":[{"id":"plate","label":"PCR plate","slot":"A1","type":"opentrons_96_wellplate_200ul_pcr_full_skirt"},{"id":"tips50","label":"50 uL tips","slot":"A2","type":"opentrons_flex_96_tiprack_50ul"},{"id":"mmix_res","label":"Master mix reservoir","slot":"B1","type":"nest_12_reservoir_15ml"},{"id":"tubes","label":"Sample tubes","slot":"B2","type":"opentrons_24_tuberack_nest_1.5ml_snapcap"}],"liquids":[{"deadVolumeUl":300,"id":"mastermix","location":{"labware":"mmix_res","volumeUl":5000,"wells":"A1"},"name":"PCR master mix"},{"deadVolumeUl":20,"id":"samples","location":{"labware":"tubes","volumeUl":200,"wells":"A1:D2"},"name":"Patient samples"}],"name":"PCR setup with 8-sample column and column-12 dilution series","options":{"defaultNewTip":"once","forbidCrossLiquidTipReuse":true,"trashSlot":"A3"},"pipettes":[{"model":"flex_8channel_50","mount":"left"},{"model":"flex_1channel_50","mount":"right"}],"robot":"flex","steps":[{"dests":{"labware":"plate","wells":"A1:H12"},"kind":"distribute","newTip":"once","source":{"labware":"mmix_res","well":"A1"},"volumeUl":20},{"dest":{"labware":"plate","well":"A1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"A1"},"volumeUl":5},{"dest":{"labware":"plate","well":"B1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"A2"},"volumeUl":5},{"dest":{"labware":"plate","well":"C1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"B1"},"volumeUl":5},{"dest":{"labware":"plate","well":"D1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"B2"},"volumeUl":5},{"dest":{"labware":"plate","well":"E1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"C1"},"volumeUl":5},{"dest":{"labware":"plate","well":"F1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"C2"},"volumeUl":5},{"dest":{"labware":"plate","well":"G1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"D1"},"volumeUl":5},{"dest":{"labware":"plate","well":"H1"},"kind":"transfer","newTip":"always","source":{"labware":"tubes","well":"D2"},"volumeUl":5},{"kind":"serial_dilute","labware":"plate","mixRepetitions":3,"mixUl":15,"newTip":"always","transferUl":10,"wells":"A12:H12"},{"kind":"delay","message":"Incubate before sealing","seconds":60}]}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.15 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.15" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.15 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Flab.api.williamrobinson.dev%2Fv1%2Flab%2Fcompile&method=POST
const res = await pay("https://lab.api.williamrobinson.dev/v1/lab/compile", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "labware": [
      {
        "id": "plate",
        "label": "PCR plate",
        "slot": "A1",
        "type": "opentrons_96_wellplate_200ul_pcr_full_skirt"
      },
      {
        "id": "tips50",
        "label": "50 uL tips",
        "slot": "A2",
        "type": "opentrons_flex_96_tiprack_50ul"
      },
      {
        "id": "mmix_res",
        "label": "Master mix reservoir",
        "slot": "B1",
        "type": "nest_12_reservoir_15ml"
      },
      {
        "id": "tubes",
        "label": "Sample tubes",
        "slot": "B2",
        "type": "opentrons_24_tuberack_nest_1.5ml_snapcap"
      }
    ],
    "liquids": [
      {
        "deadVolumeUl": 300,
        "id": "mastermix",
        "location": {
          "labware": "mmix_res",
          "volumeUl": 5000,
          "wells": "A1"
        },
        "name": "PCR master mix"
      },
      {
        "deadVolumeUl": 20,
        "id": "samples",
        "location": {
          "labware": "tubes",
          "volumeUl": 200,
          "wells": "A1:D2"
        },
        "name": "Patient samples"
      }
    ],
    "name": "PCR setup with 8-sample column and column-12 dilution series",
    "options": {
      "defaultNewTip": "once",
      "forbidCrossLiquidTipReuse": true,
      "trashSlot": "A3"
    },
    "pipettes": [
      {
        "model": "flex_8channel_50",
        "mount": "left"
      },
      {
        "model": "flex_1channel_50",
        "mount": "right"
      }
    ],
    "robot": "flex",
    "steps": [
      {
        "dests": {
          "labware": "plate",
          "wells": "A1:H12"
        },
        "kind": "distribute",
        "newTip": "once",
        "source": {
          "labware": "mmix_res",
          "well": "A1"
        },
        "volumeUl": 20
      },
      {
        "dest": {
          "labware": "plate",
          "well": "A1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "A1"
        },
        "volumeUl": 5
      },
      {
        "dest": {
          "labware": "plate",
          "well": "B1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "A2"
        },
        "volumeUl": 5
      },
      {
        "dest": {
          "labware": "plate",
          "well": "C1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "B1"
        },
        "volumeUl": 5
      },
      {
        "dest": {
          "labware": "plate",
          "well": "D1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "B2"
        },
        "volumeUl": 5
      },
      {
        "dest": {
          "labware": "plate",
          "well": "E1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "C1"
        },
        "volumeUl": 5
      },
      {
        "dest": {
          "labware": "plate",
          "well": "F1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "C2"
        },
        "volumeUl": 5
      },
      {
        "dest": {
          "labware": "plate",
          "well": "G1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "D1"
        },
        "volumeUl": 5
      },
      {
        "dest": {
          "labware": "plate",
          "well": "H1"
        },
        "kind": "transfer",
        "newTip": "always",
        "source": {
          "labware": "tubes",
          "well": "D2"
        },
        "volumeUl": 5
      },
      {
        "kind": "serial_dilute",
        "labware": "plate",
        "mixRepetitions": 3,
        "mixUl": 15,
        "newTip": "always",
        "transferUl": 10,
        "wells": "A12:H12"
      },
      {
        "kind": "delay",
        "message": "Incubate before sealing",
        "seconds": 60
      }
    ]
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.15 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.15"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://lab.api.williamrobinson.dev/v1/lab/compile",
        json={
            "labware": [
                {
                    "id": "plate",
                    "label": "PCR plate",
                    "slot": "A1",
                    "type": "opentrons_96_wellplate_200ul_pcr_full_skirt",
                },
                {
                    "id": "tips50",
                    "label": "50 uL tips",
                    "slot": "A2",
                    "type": "opentrons_flex_96_tiprack_50ul",
                },
                {
                    "id": "mmix_res",
                    "label": "Master mix reservoir",
                    "slot": "B1",
                    "type": "nest_12_reservoir_15ml",
                },
                {
                    "id": "tubes",
                    "label": "Sample tubes",
                    "slot": "B2",
                    "type": "opentrons_24_tuberack_nest_1.5ml_snapcap",
                },
            ],
            "liquids": [
                {
                    "deadVolumeUl": 300,
                    "id": "mastermix",
                    "location": {
                        "labware": "mmix_res",
                        "volumeUl": 5000,
                        "wells": "A1",
                    },
                    "name": "PCR master mix",
                },
                {
                    "deadVolumeUl": 20,
                    "id": "samples",
                    "location": {
                        "labware": "tubes",
                        "volumeUl": 200,
                        "wells": "A1:D2",
                    },
                    "name": "Patient samples",
                },
            ],
            "name": "PCR setup with 8-sample column and column-12 dilution series",
            "options": {
                "defaultNewTip": "once",
                "forbidCrossLiquidTipReuse": True,
                "trashSlot": "A3",
            },
            "pipettes": [
                {
                    "model": "flex_8channel_50",
                    "mount": "left",
                },
                {
                    "model": "flex_1channel_50",
                    "mount": "right",
                },
            ],
            "robot": "flex",
            "steps": [
                {
                    "dests": {
                        "labware": "plate",
                        "wells": "A1:H12",
                    },
                    "kind": "distribute",
                    "newTip": "once",
                    "source": {
                        "labware": "mmix_res",
                        "well": "A1",
                    },
                    "volumeUl": 20,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "A1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "A1",
                    },
                    "volumeUl": 5,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "B1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "A2",
                    },
                    "volumeUl": 5,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "C1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "B1",
                    },
                    "volumeUl": 5,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "D1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "B2",
                    },
                    "volumeUl": 5,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "E1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "C1",
                    },
                    "volumeUl": 5,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "F1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "C2",
                    },
                    "volumeUl": 5,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "G1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "D1",
                    },
                    "volumeUl": 5,
                },
                {
                    "dest": {
                        "labware": "plate",
                        "well": "H1",
                    },
                    "kind": "transfer",
                    "newTip": "always",
                    "source": {
                        "labware": "tubes",
                        "well": "D2",
                    },
                    "volumeUl": 5,
                },
                {
                    "kind": "serial_dilute",
                    "labware": "plate",
                    "mixRepetitions": 3,
                    "mixUl": 15,
                    "newTip": "always",
                    "transferUl": 10,
                    "wells": "A12:H12",
                },
                {
                    "kind": "delay",
                    "message": "Incubate before sealing",
                    "seconds": 60,
                },
            ],
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
5 h agoPassed402785 ms$0.15
15 h agoPassed402734 ms$0.15
25 h agoPassed402689 ms$0.15
36 h agoPassed402543 ms$0.15
46 h agoPassed402822 ms$0.15
Show 10 older checks
2 days agoPassed402818 ms$0.15
3 days agoPassed402911 ms$0.15
3 days agoPassed402852 ms$0.15
3 days agoPassed402664 ms$0.15
3 days agoPassed402663 ms$0.15
3 days agoPassed402904 ms$0.15
3 days agoPassed402951 ms$0.15
4 days agoPassed402829 ms$0.15
4 days agoPassed402915 ms$0.15
4 days agoPassed402828 ms$0.15