REST · JSON · POST

Body map API for lab results

Turn a laboratory panel into anatomy: each out-of-range or borderline result is placed on one of 13 body regions and returned as a legend your app can draw.

POST /api/v1/body-map/analyze

Body Map

Key capabilities

The Body Map AI API reads the flagged results of a lab panel and assigns them to 13 regions: brain and nerves, thyroid, heart and vessels, liver, pancreas, adrenals, kidneys, gut, reproductive, blood, immune, bones and muscles. By default it is deterministic: marker names are matched against alias tables for 39 report languages, no model is called, and the same panel always returns the same answer.

  • Structured JSON

    Stable English keys and codes, with text in the language you request.

  • Free sandbox

    The sandbox endpoint returns a sample response in the shape of the live one and uses no credits.

  • One credit per call

    A successful analyze call uses one credit. Sandbox calls are free.

  • API key authentication

    Send your key as a Bearer token in the Authorization header. Never put a key in a URL.

Diagram: How it works (Body Map) – Lab report → Kantesti API → Organ systems → Your app
How it works: Lab report → Kantesti API → Organ systems → Your app.

Example request and response

POST /api/v1/body-map/analyze Live

POST /api/v1/body-map/sandbox Sandbox

POST /api/v1/body-map/validate Live

GET /api/v1/body-map/regions Live

GET /api/v1/body-map/info Live

Endpoint reference

curl -X POST "https://app.aibloodtestinterpret.com/api/v1/body-map/sandbox" \
  -H "Authorization: Bearer kt_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language":"en"}'
import requests

resp = requests.post(
    "https://app.aibloodtestinterpret.com/api/v1/body-map/sandbox",
    headers={"Authorization": "Bearer kt_live_YOUR_API_KEY"},
    json={"language": "en"},
    timeout=60,
)
print(resp.json())
const resp = await fetch("https://app.aibloodtestinterpret.com/api/v1/body-map/sandbox", {
  method: "POST",
  headers: {
    Authorization: "Bearer kt_live_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"language":"en"}),
});
console.log(await resp.json());
<?php
$ch = curl_init('https://app.aibloodtestinterpret.com/api/v1/body-map/sandbox');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer kt_live_YOUR_API_KEY',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode(['language' => 'en']),
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);
Response Sandbox
{
  "status": "success",
  "data": {
    "body_map": {
      "v": 4,
      "spec": "v4-thy2-liv2-kid1-bld2",
      "unmapped": 0,
      "image_url": "/static/body_maps/v4-thy2-liv2-kid1-bld2.webp",
      "fallback_url": "/body-map/v4-thy2-liv2-kid1-bld2.0123456789abcdef.webp",
      "regions": [
        {
          "key": "thyroid",
          "level": 2,
          "drawn": true,
          "markers": [
            "…"
          ]
        },
        {
          "key": "heart_vessels",
          "level": 1,
          "drawn": true,
          "markers": [
            "…"
          ]
        },
        "… +3"
      ]
    },
    "engine_version": 4,
    "region_keys": [
      "brain_nerves",
      "thyroid",
      "… +11"
    ],
    "mode": "deterministic",
    "all_clear": false,
    "sandbox_mode": true
  },
  "timestamp": "2026-11-30T12:00:00.000000Z",
  "api_version": "1.0.0",
  "message": "Sandbox body map returned successfully",
  "sandbox": true,
  "sandbox_notice": "This is sandbox test data. No actual analysis was performed and no quota was consumed."
}

Sandbox response, shortened for this page. The playground shows the full body. Sample data only. No real patient data is sent or stored.

Inputs and outputs

  • Request

    What you send

    A JSON array parameters (up to 500 rows). Each row carries the analyte name exactly as the laboratory printed it and an evaluation (high, low, bad, slightly_high, slightly_low, normal); result, unit and reference range are optional. Optional flags: ai_assist to place names the alias tables do not know, include_image and image_wait for the illustration.

  • Response

    What you get back

    A body_map object: a spec identifier, the regions with level (2 = out of range, 1 = borderline), drawn and the markers that put each region there, worst first, the number of unmapped markers, and a signed illustration URL. The output is language-free: region keys plus your own marker names, and an illustration without text. A clean panel returns all_clear: true.

Diagram: Organ systems – Thyroid, Heart, Liver, Kidneys, Metabolism
Organ systems. Results grouped by organ system.

Use cases

  • Add a visual summary to a lab report or patient portal without writing your own marker-to-organ mapping.

  • Colour a body legend in a mobile health app from the two severity levels.

  • Show the same picture in every language: translate the 13 region keys once in your client.

  • Chain it after the blood test API: pass the parameters array of an analysis straight in.

Who uses this API

Sectors that typically integrate this module.

All solutions

Questions

What does the Body Map API need as input?

Structured lab results as JSON: an analyte name and an evaluation per row. It does not read PDFs or photos itself; use the blood test API first and pass its parameters on.

Does the Body Map API call an AI model?

Not by default. The default mode is deterministic and matches marker names against alias tables. A model is used only when you set ai_assist, and an illustration is produced only when you set include_image.

What happens when all results are normal?

The response has all_clear: true and the shared "all clear" body. If flagged markers exist but none can be placed on a region, the API returns error RES_4004 and the call is not charged.

How is a Body Map call priced?

One successful analyze call is one API call (1 credit). The validate, sandbox, regions and info endpoints do not consume quota.

Other API modules

Start building

Free sandbox access. Buy credits only when you go live.

Kantesti® API illustration: Body map API for lab results
Body Map API: send a lab panel as JSON and get every out-of-range result placed on 13 body regions, with severity, markers and an illustration URL.