Pharma API weighing control with AI — one misplaced decimal is one lost batch.

The API weighing is where most OOS results are born in oral solids — a misplaced decimal, a supplier batch mixed up, a balance out of calibration. iLEAN Edge sees the balance, Connect reads the supplier batch from the ERP, and the agents cross-check against the GMP recipe. The person signs — the batch does not move on by itself.

← See all pharma solutions

Pharma dispensing booth with an analytical balance, an operator weighing API with a tablet, an iLEAN Edge terminal over the balance verifying the reading and labeled bags on the shelf
The problem

The recipe is in the MES. The balance has the weight. The operator has the marker pen.

The dispensing booth is where one rushed morning turns into a three-week OOS investigation. The GMP recipe is sound. The balance is calibrated. The operator knows what they are doing. And even so, API weighing error is one of the most recurrent sources of OOS in oral solids, because the dispensing booth is a crossroads of things that almost never sit in the same system:

  1. The batch recipe — from the MES, with the theoretical weight and tolerance.
  2. The material — a bag of API or excipient with its supplier batch, CAS identity and certificate of analysis (CoA). Identical bags with different batches on the same shelf.
  3. The balance — Mettler, Sartorius, Ohaus, with its current calibration. A display the operator reads, or a serial/Ethernet output that connects to the system.
  4. The signature — the first operator weighs, the second operator verifies, both sign on paper or on screen.

The manufacturing manager knows it. Every weighing done right is good management; every weighing done wrong is an investigation, a CAPA, a root cause that has to be closed out. The classic system (paper + eyes + double check) works 99% of the time. That 1% is the OOS that reaches the committee — and the cost of one lost batch of an expensive API is worth several full pilots.

How it fits the IRIS system

iLEAN does not change the balance or the recipe — it puts a safety net under every weighing.

The API weighing problem is not one of instrumentation: it is information on islands spread across the MES (recipe), the ERP (supplier batch), the balance (actual weight) and the operator's paperwork. iLEAN acts as the putty that fills those gaps without asking you to change your balances, your MES or your dispensing booth.

Edge sees the balance and the label on the bag. Connect holds the recipe and the supplier's CoA. The agent validates in milliseconds — theoretical vs. actual weight, correct batch, balance in calibration. Stack light red if something does not add up. The person signs.

The iLEAN pieces applied to API weighing control:

  • Edge — a terminal with machine vision (CNN) at the balance. It reads the display directly if the balance is old with no digital output, or connects over serial/Ethernet if it is modern. It also reads the QR code/label on the supplier bag before weighing starts. It fires the stack light and a lockout if the reading does not match the recipe. It works with no network.
  • Connect — captures the recipe from the MES (theoretical weight + tolerance + the API's CAS identity), the dispensed batch from the ERP, the supplier's certificate of analysis (CoA, extracted from email or from the supplier portal with less than 1.5% error), and the balance's current calibration from the equipment system.
  • Agent — validates every weighing in milliseconds: is the bag on the balance the one the recipe calls for? Is the actual weight within tolerance? Is the balance inside its calibration window? Is the supplier's CoA within spec? If everything checks out, it records and moves on. If something does not add up, it holds the weighing and raises the alert. The responsible person signs. And at the end of the batch, the agent generates the ALCOA+ dossier ready for the EBR.

See the full IRIS architecture →

Before and after

Manual weighing + double signature vs. weighing cross-checked with iLEAN

AspectRecipe on screen + logbook + double signatureWith iLEAN Edge + Connect + Agent
Material identityLabel read by the operatorEdge reads the QR/label and validates vs. MES
Theoretical vs. actual weightTranscribed by hand into the logbookCompared in milliseconds, stack light
Balance calibrationChecked manually if doubts come upAutomatic lockout if the window has expired
Supplier CoAIn a folder, consulted occasionallyCross-checked at second zero
Error detectionSecond signature or final QCAt the balance itself, before moving on
File for the auditorManual rebuild from the logbookALCOA+ dossier per batch, one click away
Impact estimate

Impact estimate for your plant — to be validated with your numbers.

The block below is an estimate to be validated with the specific data of your plant. We put it forward so the committee has an order of magnitude; we refine it during the diagnostic.

  • Pharma plant with a central dispensing booth, 4-8 analytical and precision balances (Mettler, Sartorius), a validated MES, an ERP with a materials module, oral solids or liquids.
  • Edge pilot on 1-2 balances + Connect over MES/ERP/CoA + a validation agent running in milliseconds. First value expected within a few weeks.
  • Indicative payback between 4 and 9 months, depending on the documented frequency of weighing-related OOS and the average cost of an API batch in your portfolio.
  • The hard lever is a ≥30% reduction in OOS from weighing errors + a single batch rescued through in-line detection. One batch of an expensive API pays for the pilot several times over.

And the manufacturing director's reasonable doubt

“What if the AI gets it wrong reading the balance display?” — reading a display is the most anchored task there is: reading a number with a decimal point on a screen and comparing it with a recipe. In anchored tasks, the best models bring error below 1.5% [1]. And even so, in pharma what is critical is never decided alone: the agent holds the weighing and the person signs. The human double check does not disappear — it becomes faster and more reliable, because the agent's safety net catches the errors a tired eye lets through. The operator gains time for the control that matters.

[1] OpenAI paper “Why Language Models Hallucinate”, 2025 — on the reliability of AI in anchored tasks.

Frequently asked questions

What people ask about API weighing control with AI

What does GMP require for API weighing in pharma?

EU GMP Chapter 4 and 21 CFR 211.101 require every weighing of an API or excipient to be documented with: the operator's identity, the material's identity (supplier batch + CAS number), the theoretical weight from the recipe, the actual measured weight, the balance used with its current calibration, and an independent double-check signature. The dispensing booth is a critical point in the chain — one misplaced decimal, one supplier bag mixed up, one balance out of calibration, and the batch is OOS before it has even been blended.

How do you remove the human decimal-point error at the balance?

iLEAN Edge sees the balance in real time (reading the display with machine vision or over the serial/Ethernet output), Connect holds the MES recipe and the supplier batch from the ERP, and the Agents validate in milliseconds. If the weighing is out of tolerance, the stack light goes red and the balance does not move on. The person signs — the batch does not move on by itself.

Can iLEAN integrate with existing Mettler/Sartorius balances without touching the recipe?

Yes. Modern balances have serial/Ethernet outputs with open protocols — iLEAN Connect reads them directly. On older balances with nothing but a display, Edge uses machine vision to read the weight off the physical display. The MES recipe is not modified, the balance firmware is not touched, the GAMP 5 qualification is not altered. The integration lives in ring 3 and the data passes to ring 1 through a hardened mailbox.

How do you avoid mixing up supplier batches in identical bags?

With iLEAN, Edge reads the bag's QR code/label as it enters the dispensing booth and validates it against the batch dispensed by the MES. If they do not match, the stack light goes red. Connect has the supplier's certificate cross-referenced and, if the CoA says something other than expected, the Agents escalate to quality before the weighing starts. The person signs — the material does not move on unless it is validated.

What weighing dossier is delivered for an audit?

iLEAN generates the ALCOA+ dossier per batch: every weighing with a cryptographic timestamp, the operator's identity, the material's identity, theoretical vs. actual weight, the balance used with its current calibration, and the electronic double-check signature. It connects with the digital EBR and with the always-ready FDA/EMA audit. Rebuilding the file by hand — weeks of work today — becomes a single click.

Let's talk

Tell us your case and in 48h we'll send you the estimated ROI of this AI project for your dispensing booth.

We work on your plant's real data, not ours. Diagnostic with no commitment.

Request estimated ROI in 48h See pharma