Skip to main content

Quickstart

This page walks you through the minimum work required to embed the iframe in your application, run an analysis, and retrieve the resulting DiagnosticReport. Everything described here can be customised further; see the Configure β†’ Customize page for the full parameter reference.

1. Build the iframe URL​

The iframe is served from https://iframe.legit.health and loads from an authenticated URL: your backend obtains a key and appends it to the URL, and your frontend just loads the result. See the Configure β†’ Authentication page for how to get one.

<iframe
src="https://iframe.legit.health/?<your authenticated key>"
width="100%"
height="800"
></iframe>

Use the generator below to preview the iframe's appearance and behaviour and copy a configured URL. For the full parameter reference, see the Configure β†’ Customize page.

This is a demo sandbox, not the real device. Its results do not reflect the real device's performance and have no clinical validity.

This page embeds a mock of the API for testing layout, branding and integration only. It does not run the Legit.Health diagnostic-support algorithm. Its output is simulated, deliberately limited and low-performing, and does not reflect the accuracy or behaviour of the real device.

Because the results do not reflect real performance, there is nothing here to act on. Do not use any output for diagnosis, triage, severity scoring or any other clinical decision, whatever your role or qualifications. It has no clinical validity.

Do not upload identifiable patient images or any personal data. This sandbox is not covered by the data-processing, consent and GDPR safeguards that apply to the real device.

To evaluate the real Legit.Health device under the proper clinical and data-protection terms, talk to our team.

#
#

The generator is a preview only

The generator runs against a demo sandbox and uses a sample credential so the live preview works. It is for previewing the look and behaviour of the iframe; authenticate the real iframe as shown on the Configure β†’ Authentication page.

2. Listen for the result​

When the user finishes the upload, the iframe posts a message announcing that the analysis is complete and includes the identifier of the resulting report:

window.addEventListener("message", function (event) {
if (event.data.message !== "analysis_completed") {
return;
}
const reportId = event.data.id;
// store reportId, fetch the report from your backend, etc.
});

The same message is delivered through different transports on iOS and Android. See the Callbacks β†’ Analysis completed page for the per-platform code, and the Platforms section for the embedding details on each runtime.

3. Retrieve the report​

Once you have a report identifier, your backend fetches the full DiagnosticReport from the API:

curl -X GET "https://{baseUrl}/s2s-api/v3/anonymous-diagnostic-reports/{encryptedId}?format=raw&locale=en" \
-H "X-API-TOKEN: YOUR_S2S_TOKEN" \
-H "accept: application/json"

The response includes a PDF download URL and a live report URL you can embed back into your interface. See the Output β†’ API Endpoint page for the parameters and response shape, and the Output β†’ JSON Schema section for the full payload schema.

End-to-end sequence​

The diagram below shows the full lifecycle of a single analysis. Steps 1, 3, 5 and 6 are the only ones that require integration effort on your side: loading the iframe, storing the reportId from the postMessage, and calling the Legit.Health API from your backend to retrieve the DiagnosticReport. Every other step is handled by the iframe, the user, or the Legit.Health API.

Next Steps​