Embed & API
Embed versioned physiology models, or read the static JSON API.
Live Embed Preview
DraftThis pre-alpha documents a featherweight iframe contract and build-published JSON. The included sample (High-sugar meal) is an unreviewed draft and the production host artifacts are not published yet.physiology
High-sugar meal — 6 hours
A representative healthy adult model. Move through time to see how the systems respond.
Glucosetypical range70–140mg/dLholding
Insulintypical range2–25µU/mLholding
Heart ratetypical range60–100bpmholding
Energysteadyholding
Typical ranges for a representative healthy adult model — not a measurement.
Time elapsed
01h2h3h4h5h6h
Width: 600pxHeight: 520px
Embed with React
Copy and paste the code below to embed the physiology widget in your React app.
import { PhysiologyEmbed } from '@physiology/embed';
export function Example() {
return (
<PhysiologyEmbed
baseUrl="https://your-physiology-host.example"
eventId="high-sugar-meal"
revision="0.1.0"
timestamp={0}
locale="en"
theme="light"
showControls={true}
showMetrics={true}
renderMode="diagram"
width=600
height={520}
onTimeChange={(seconds) => console.log('time', seconds)}
/>
);
}Configuration
- baseUrlRequired
- https://your-physiology-host.exampleAbsolute HTTPS origin serving the /embed route.
- eventIdRequired
- high-sugar-mealThe ID of the event to embed.
- revisionRequired
- 0.1.0Immutable semantic version; never latest.
- timestampOptional
- 0Time in seconds, clamped to the event duration.
- themeOptional
- Options: light, dark, auto.
- localeOptional
- en or es.
- renderModeOptional
- diagram (recommended) or 3d.
- showControlsOptional
- Show timeline controls.
- showMetricsOptional
- Show key metrics panel.
dark and auto are accepted for forward compatibility; the design system has no dark mode, so v1 renders the light theme.
Available Events
View all eventsDeveloper Tip
All times are in seconds, never milliseconds. Use the embed API to control playback, listen for time updates, and clamp to the duration published in the index.