Skip to main content
The MedLog API is a set of write-once event endpoints. A collector accepts events but never returns record contents — each call appends one schema-compliant message that is later assembled into a complete record. The interactive endpoint pages in this section are generated directly from the OpenAPI specification.

Authentication

All endpoints require an API key passed in the X-API-Key header.
curl -X POST https://your-collector.example.org/event/inference-start \
  -H "X-API-Key: $MEDLOG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Endpoints

Each endpoint records one part of a MedLog record:
MethodPathRecords
POST/event/inference-startThe beginning of an inference run — creates the event_id and run_id.
POST/event/internal-artifactAn intermediate artifact (reasoning trace, retrieved context, …).
POST/event/human-outputContent shown to a human user.
POST/event/outcomeA downstream patient or system outcome attributed to a prior inference.
POST/event/user-feedbackExplicit user feedback.
Select an endpoint in the sidebar to see its full schema and try it against a server using the built-in API playground.

The event model

Every event extends a shared BaseEvent and adds an event-specific payload. The base fields carry identity and linkage:
FieldTypeNotes
event_iduuidUnique ID for this event. Required.
run_iduuidConstant across all events in the same run.
parent_event_iduuidThe event this one expands on.
timestampdate-timeWhen the event occurred. Required.
medlog_versionstringProtocol version. Required.
system_metadataobjecthostname, app_name, proc_id, latency_ms. Required.
The first event (inference-start) additionally carries the model instance, user and target identities, and inputs. Later events carry a single typed payload — an artifact, output, outcome, or feedback object. See the record fields for the conceptual model behind these payloads.

Responses

StatusMeaning
201Event accepted.
400Bad request — invalid payload or missing fields.
401Unauthorized — missing or invalid credentials.
403Forbidden — insufficient permissions.
Error responses return an Error object with a message, and optionally a code and details.