Emit your first MedLog record by writing a stream of events to a collector.
A MedLog record is assembled from a stream of write-once messages sent to a collector. You do not
write a record all at once. Instead, you emit one message at inference start and append more messages
as artifacts, outputs, outcomes, and feedback become available. Every message after the first
references the original event_id (and, for multi-step workflows, a shared run_id).This design means a record exists even when inference fails, and lets outcomes or feedback be added
later — sometimes hours or days after the model ran.
All examples below authenticate with an API key passed in the X-API-Key header. Every endpoint is
write-only: collectors accept events but never return record contents.
The first message captures everything available at invocation: the header,
model instance,
user and
target identities, and the
inputs. It mints the event_id (and a run_id if
this is part of a multi-step workflow).
Reasoning traces, retrieved context, uncertainty estimates, and other intermediate artifacts are
referenced back to the same event_id. This field is optional.
MedLog scales down. In low-resource or offline settings you can log only a small set of fields —
Header, Model instance, and
Outputs — and add more fields as local capacity grows.
When connectivity is intermittent, buffer events on-device with write-behind caching and synchronize
once the network returns. See low-resource settings.