> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.thymia.ai/llms.txt. > For full documentation content, see https://docs.thymia.ai/llms-full.txt. # thymia | Documentation # thymia documentation ![thymia banner](https://files.buildwithfern.com/https://thymia.docs.buildwithfern.com/8671cc68701db38369450fb31db56814b5b4770ca1cab484ce6fea481b65f1d2/docs/assets/banners/documentation-overview-banner.png) ## The health and safety intelligence layer for voice thymia extracts clinically validated health and wellbeing signals from voice — not transcription, not sentiment analysis, but the biological signal contained in sound, made actionable. Voice sits at the intersection of five major biological systems — respiratory, neurological, cardiovascular, metabolic, and musculoskeletal. Change any one of them, and the voice changes with it. Every voice contains thousands of measurable patterns: subtle variations in pitch, rhythm, pauses, and tone. thymia calls the smallest distinct units **neural morphemes™** — the fundamental building blocks of speech that carry meaning beyond words. thymia's foundational models identify these **neural morphemes™** in real time, then combine them into biomarkers — specific signatures that reliably indicate health and wellbeing states. Just as a doctor recognises symptoms that together suggest a diagnosis, our models recognise morpheme patterns that together reveal emotional, mental, and physiological states. From just 15 seconds of speech, processed in real time. | Signal | Examples | | ----------------------- | ------------------------------------------------------------ | | **Acoustic features** | Pitch variation, speech rate, pauses, vocal tremor, loudness | | **Linguistic patterns** | Word choice, sentence structure, semantic content | | **Temporal dynamics** | Response timing, speech rhythm, prosody changes | All capabilities are accessible through a REST API, designed to integrate into any platform or workflow that handles voice. ## Choose your integration thymia integrates into any platform or workflow that handles voice. Whether you are building a remote patient monitoring tool, enriching an existing voice agent, or embedding mental health screening into a clinical pathway, thymia delivers biomarker-grade intelligence from seconds of natural speech.
### thymia API Supply voice recordings directly from your infrastructure. Your backend creates a model run, uploads the recording, and polls for results. Full control over the recording experience and user journey from end to end. ### Sentinel Real-time voice safety and wellbeing monitoring for AI agents. Stream audio and transcripts, run safety policies, and get actionable results — all without storing recordings.
## Choose your model ### Helios #### Wellbeing and safety monitoring Wellbeing monitoring from live voice. Detects distress, stress, fatigue, low self-esteem, and burnout in real time — across human and voice agent interactions — for healthcare, pharma, and safety-critical industries.
### Apollo Clinical
#### Clinical-grade health detection Voice-based depression and anxiety assessment covering all DSM-V criteria with disorder-level results and granular symptom scores. Apollo is a regulated medical device intended for qualified healthcare professionals only.
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Models thymia offers two voice biomarker models, each designed for a distinct use case. Both analyse **neural morphemes™** extracted from natural speech and return clinically validated scores. They differ in their intended setting, output type, regulatory status, and recording requirements. ## Model overviews ### Helios #### Wellbeing and safety monitoring Wellbeing monitoring from live voice. Detects distress, stress, fatigue, low self-esteem, and burnout in real time — across human and voice agent interactions — for healthcare, pharma, and safety-critical industries.
### Apollo Clinical
#### Clinical-grade health detection Voice-based depression and anxiety assessment covering all DSM-V criteria with disorder-level results and granular symptom scores. Apollo is a regulated medical device intended for qualified healthcare professionals only.
## Comparison | | Helios | Apollo | | ---------------------------- | ------------------------------------- | --------------------------------------- | | **Intended setting** | Non-clinical | Clinical | | **Regulated medical device** | No | Yes — UKCA Class I | | **Intended users** | Developers, operators, wellness teams | Qualified healthcare professionals | | **Recordings required** | 1 | 2 | | **Minimum speech duration** | 10 seconds | 15 seconds per recording | | **Maximum recording length** | 3 minutes | 3 minutes per recording | | **Supported formats** | FLAC, MP3, MP4, Ogg, WebM, WAV | FLAC, MP3, MP4, Ogg, WebM, WAV | | **Languages supported** | 11 | 11 | | **Output type** | Wellness biomarker scores | Disorder probabilities + symptom scores | | **Clinical report** | No | Yes — PDF and web view | | **Data deletion** | Configurable | Configurable | ## Which model should I use? **Use Helios if you are:** * Monitoring operator wellbeing or fatigue in safety-critical environments * Tracking patient wellness between clinical appointments * Embedding continuous mental wellness monitoring into a consumer or enterprise product * Running longitudinal wellbeing programmes in pharmaceutical or occupational health contexts **Use Apollo if you are:** * A healthcare professional conducting remote mental health triage * Screening patients for depression or anxiety before a clinical consultation * Tracking symptom-level treatment response over time * Building a regulated clinical decision support tool Apollo requires a separate access agreement with thymia and is intended for use by qualified healthcare professionals only. Contact [support@thymia.ai](mailto:support@thymia.ai) to request access. ## Using models via Sentinel Both Helios and Apollo are also available as real-time streaming biomarkers via [Sentinel](/sentinel/overview) — thymia's monitoring layer for live voice AI applications. Rather than submitting recordings via the REST API, Sentinel streams audio from your existing voice stack and returns biomarker signals in real time during the conversation. | Integration path | Best for | | ------------------- | -------------------------------------------------------------- | | **thymia REST API** | Asynchronous recording submission and result retrieval | | **Sentinel** | Real-time biomarker extraction during live voice conversations |
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Coding agents This page tells your coding agent exactly where to look so it gets current answers instead of plausible-sounding ones. ## Where agents should look — in order Every page on this site is indexed at: * [docs.thymia.ai/llms.txt](https://docs.thymia.ai/llms.txt) — table of contents * [docs.thymia.ai/llms-full.txt](https://docs.thymia.ai/llms-full.txt) — full content Fetch one of these first so the agent has the full map of the docs before drilling in. Append `.md` to any docs URL to get a clean Markdown version — no HTML, no navigation chrome. For example: * Page: [docs.thymia.ai/helios/quickstart](https://docs.thymia.ai/helios/quickstart) * Markdown: [docs.thymia.ai/helios/quickstart.md](https://docs.thymia.ai/helios/quickstart.md) This is the cheapest way to load a single page into context. For endpoint shapes, request and response schemas, and auth details, the OpenAPI spec is authoritative: [api.thymia.ai/openapi.json](https://api.thymia.ai/openapi.json). ## Drop-in `AGENTS.md` for your repo If you are building on thymia, add an `AGENTS.md` (or `.cursorrules`, or `CLAUDE.md`) to your repo so every coding agent that opens the project picks up the same guidance: ```markdown # Working with the thymia API Base URL: https://api.thymia.ai Docs: https://docs.thymia.ai Before writing any code that calls thymia: 1. Fetch https://docs.thymia.ai/llms.txt to find the relevant page, then fetch that page with a `.md` suffix for clean Markdown. 2. For endpoint shapes, fetch https://api.thymia.ai/openapi.json — do not guess field names, enum values, or status codes. Model-specific guides: - Helios (real-time wellbeing): https://docs.thymia.ai/helios/quickstart.md - Apollo (clinical depression/anxiety): https://docs.thymia.ai/apollo/quickstart.md - Sentinel (voice-agent safety): https://docs.thymia.ai/sentinel/overview.md Rules: - Company name is lowercase — "thymia", not "Thymia". - Audio must meet the format requirements in the model's integration guide — check before transcoding. - Results are returned asynchronously via polling; do not assume a synchronous response. ```
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Helios ![thymia banner](https://files.buildwithfern.com/https://thymia.docs.buildwithfern.com/7fe86aaf2f14b0cd7d3fe35d16d78eb204c7d68a055de0084f1beb409ec0ddf9/docs/assets/banners/documentation-helios-banner.png) Helios is thymia's mental wellness model. From just 15 seconds of natural speech, Helios analyses **neural morphemes™** to produce clinical-grade biomarker scores across six dimensions of mental and physical state — in real time, on any device that captures audio. Designed for continuous monitoring outside of clinical settings, Helios applies the same foundational voice biomarker science as Apollo, framed for operational and wellbeing contexts. It is currently deployed across healthcare providers, pharmaceutical companies, and safety-critical industries including transport, logistics, and first response. Helios is a wellness monitoring tool and is not a regulated medical device. It is not intended for clinical diagnosis or to replace clinical judgement. For clinical assessment of depression and anxiety, see [Apollo](/apollo/overview). ## What Helios measures Helios returns scores across six biomarker dimensions. Each score reflects a distinct aspect of the user's mental and physical state at the time of recording: | Biomarker | Description | | ----------------- | ------------------------------------------------------------------------------- | | `mentalStrain` | Overall measure of mental wellness — the composite signal across all dimensions | | `distress` | Levels of worry, nervousness or feeling on edge | | `stress` | How anxious or wound up the user may feel; ability to relax | | `exhaustion` | Physical and mental tiredness resulting from manual or cognitive labour | | `sleepPropensity` | Likelihood of falling asleep if given the opportunity; linked to sleep quality | | `lowSelfEsteem` | How confident and capable the user feels in themselves | Each score is returned in two forms — a bucketed value and a continuous value. See [Interpreting Results](/helios/interpreting-results) for a full explanation. ## Use cases Helios is architecture-agnostic and integrates into any platform or workflow that handles voice. Common use cases include: | Industry | Application | | ------------------- | ------------------------------------------------------------------------------ | | **Safety-critical** | Real-time fatigue and impairment monitoring for drivers, pilots, and operators | | **Healthcare** | Continuous wellness monitoring for patients between appointments | | **Pharmaceutical** | Longitudinal wellbeing tracking across clinical trial participants | | **Contact centres** | Operator wellness and burnout detection during live interactions | ## Explore Helios ### Quickstart Make your first Helios API call and retrieve biomarker results in minutes. ### Integration Guide Step-by-step guide to building a complete Helios integration, including recording upload, polling, and error handling. ### Interpreting Results Understand bucketed and continuous scores, benchmarking, and how to present results to users. ### Error Reference Full reference for Helios error codes and recommended handling.
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Quickstart In this guide you will create a Helios model run, upload a voice recording, and retrieve biomarker scores — the complete end-to-end flow of a Helios integration. ## Prerequisites * A thymia API key. Contact [support@thymia.ai](mailto:support@thymia.ai) to request access. * A voice recording in a supported format (FLAC, MP3, MP4, Ogg, WebM, or WAV) containing at least 10 seconds of speech. ## Step 1 — Create a model run Create a new Helios model run for your user. This returns a unique model run ID and a pre-signed URL to upload the recording to: A successful response returns a model run ID and upload URL: The `userLabel` should be a unique identifier from your system — for example, a user ID or anonymised reference. Model runs submitted with the same `userLabel` are assumed to refer to the same individual. Accurate demographic data directly affects the reliability of benchmarked results. ## Step 2 — Upload the recording Upload your voice recording to the pre-signed URL returned in the previous step via a `PUT` request: ```bash curl "https://path/to/upload" \ -X PUT \ -H 'Content-Type: audio/mpeg' \ --data-binary '@/path/to/recording.mp3' ``` The upload URL is valid for 1 hour. The model will not begin processing until the recording has been successfully uploaded. ## Step 3 — Poll for results Once the recording is uploaded, Helios begins processing automatically. Poll the model run endpoint using the ID returned in Step 1 until results are available: Check the `status` field in the response to determine whether processing is complete: | Status | Meaning | | ---------------- | ----------------------------------------------- | | `CREATED` | Model run created, waiting for recording upload | | `RUNNING` | Recording uploaded, model is processing | | `COMPLETE_OK` | Processing complete, results available | | `COMPLETE_ERROR` | Processing failed, see `errorCode` for details | We recommend polling every 3 seconds. Once processing is complete the response will include a `results` field containing biomarker scores: You have successfully run the Helios model and retrieved biomarker scores for your user. All requests to the thymia API must include your API key in the `x-api-key` header. Keep your key secret and never expose it in client-side code. ## Next steps * [Integration Guide](/helios/integration-guide) — Build a complete production integration including error handling, data deletion, and tagging. * [Interpreting Results](/helios/interpreting-results) — Understand what the scores mean and how to present them to users. * [Error Reference](/helios/error-reference) — Handle `COMPLETE_ERROR` responses correctly in your integration.
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Integration Guide This guide covers everything required to build a production-ready Helios integration — user data, recording requirements, data deletion, tagging, and error handling. If you have not yet made your first Helios API call, start with the [Quickstart](/helios/quickstart). ## Architecture A Helios integration has three components: 1. **Your backend** — creates model runs, handles recording uploads, and polls for results via the thymia API. Your API key must never be exposed in client-side code. 2. **Your frontend** — captures audio from your users and passes it to your backend for upload, or embeds the thymia Widget to handle capture directly. 3. **thymia API** — processes the recording and returns biomarker scores. How your frontend and backend communicate is specific to your infrastructure. The thymia API is called exclusively from your backend. ## User data Every model run requires a `user` object containing three fields. This data is used to benchmark results against a matched population — accuracy is directly affected by the quality of information supplied. | Field | Type | Description | | ------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `userLabel` | string | A unique identifier for the user in your system. Max 50 characters. Model runs with the same `userLabel` are assumed to refer to the same individual. | | `dateOfBirth` | date | ISO 8601 date. If day or month are unknown, supply the known parts and use `01` for the rest. | | `birthSex` | enum | Sex assigned at birth. Accepted values: `MALE`, `FEMALE`, `INTERSEX`, `UNKNOWN`. | ## Language and accent The `language` field specifies the language and dialect the user will be speaking. Choosing the most accurate code for your user improves transcription quality and benchmarking accuracy. | Field | Type | Description | | ---------- | ---- | ---------------------------------------------------------------------------- | | `language` | enum | BCP 47 language code. Required. | | `accent` | enum | Accent in addition to language. Optional. Accepted values: `ID`, `NG`, `KE`. | ## Recording requirements | Requirement | Value | | ------------------------ | ------------------------------ | | Minimum speech duration | 10 seconds | | Maximum recording length | 3 minutes | | Supported formats | FLAC, MP3, MP4, Ogg, WebM, WAV | | Upload URL validity | 1 hour | The upload URL returned when creating a model run is valid for 1 hour. If the URL expires before the recording is uploaded, create a new model run. ### Sleep and recording time For more accurate results, you can optionally pass the user's sleep and wake times alongside the time the recording was made: | Field | Format | Description | | --------------- | ------------------------------ | --------------------------------------------------- | | `sleepTime` | ISO 8601 datetime, no timezone | When the user fell asleep for their last main sleep | | `wakeTime` | ISO 8601 datetime, no timezone | When the user woke from their last main sleep | | `recordingTime` | ISO 8601 datetime, no timezone | When the recording was made | Sleep and recording time fields should not include timezone information. They are assumed to be in the local timezone of the user at the time of recording. ## Tagging model runs Tags are name/value pairs you can attach to a model run for later identification and filtering. | Constraint | Value | | ------------------------ | ---------------------- | | Maximum tags per run | 20 | | Maximum tag name length | 40 characters | | Maximum tag value length | 100 characters | | Tag names | Must be unique per run | ## Data deletion | Field | Type | Description | | -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | `deleteData` | boolean | If `true`, all data associated with the model run is deleted 12 hours after completion. Default: `false`. | | `dataToDelete` | array | Specify which data types to delete. Currently supports `RECORDINGS`. If `deleteData` is `true` and `dataToDelete` is omitted, all data is deleted. | thymia is GDPR and HIPAA compliant. For data processing agreements or privacy queries, contact [support@thymia.ai](mailto:support@thymia.ai). ## Polling for results After uploading the recording, poll `GET /v1/models/mental-wellness/{model_run_id}` until the status field is no longer `RUNNING`. We recommend polling every 3 seconds. | Status | Action | | ---------------- | --------------------------------------------------------------------- | | `CREATED` | Recording not yet uploaded. Check your upload completed successfully. | | `RUNNING` | Model is processing. Continue polling. | | `COMPLETE_OK` | Results available in the `results` field. | | `COMPLETE_ERROR` | Processing failed. Check `errorCode` and `errorReason`. | ## Error handling If the model run completes with `COMPLETE_ERROR`, check the `errorCode` field to determine the cause and next action. See the [Error Reference](/helios/error-reference) for the full list of error codes and recommended responses. The most common errors in production are: | Error code | Cause | Recommended action | | ------------------------------ | -------------------------------------------------- | ----------------------------------------------------------- | | `ERR_RECORDING_TOO_SHORT` | Recording contained less than 10 seconds of speech | Ask the user to speak for longer and submit a new model run | | `ERR_TRANSCRIPTION_FAILED` | No speech detected in the recording | Check audio quality and resubmit | | `ERR_RECORDING_INVALID_FORMAT` | Unsupported file format | Convert to a supported format and resubmit | ## Multi-region | Region | Base URL | | ------------- | -------------------------- | | Default | `https://api.thymia.ai` | | Canada | `https://ca.api.thymia.ai` | | United States | `https://us.api.thymia.ai` | Contact [support@thymia.ai](mailto:support@thymia.ai) to enable regional data storage for your account. ## Next steps * [Interpreting Results](/helios/interpreting-results) — Understand what the scores mean and how to present them to users. * [Error Reference](/helios/error-reference) — Full reference for all Helios error codes. * [API Reference](/api-reference) — Complete endpoint documentation for the Helios API.
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Interpreting Results When a Helios model run completes with status `COMPLETE_OK`, the response contains a `results` object with biomarker scores for the recording. This page explains the structure of those results, how scores are calculated, and how to use them responsibly. ## Results structure Results are returned as an array of `sections`, each covering a timed segment of the recording. Currently, Helios always returns a single section covering the full recording. ```json { "results": { "sections": [ { "startSecs": 0, "finishSecs": 28.6, "transcript": "The North Wind and the Sun had a quarrel...", "mentalStrain": { "value": 0.42 }, "distress": { "value": 0.33 }, "stress": { "value": 0.33 }, "exhaustion": { "value": 0.66 }, "sleepPropensity": { "value": 0.66 }, "lowSelfEsteem": { "value": 0.0 }, "uniformDistress": { "value": 0.48 }, "uniformStress": { "value": 0.39 }, "uniformExhaustion": { "value": 0.61 }, "uniformSleepPropensity": { "value": 0.58 }, "uniformLowSelfEsteem": { "value": 0.21 } } ] } } ``` Each section contains: | Field | Description | | ------------ | ------------------------------------------------------------------------- | | `startSecs` | Time in seconds from the start of the recording where this section begins | | `finishSecs` | Time in seconds from the start of the recording where this section ends | | `transcript` | Transcription of speech within this section | ## Biomarker scores | Biomarker | Description | | ----------------- | ------------------------------------------------------------------------------- | | `mentalStrain` | Overall measure of mental wellness — the composite signal across all dimensions | | `distress` | Levels of worry, nervousness or feeling on edge | | `stress` | How anxious or wound up the user may feel; ability to relax | | `exhaustion` | Physical and mental tiredness resulting from manual or cognitive labour | | `sleepPropensity` | Likelihood of falling asleep if given the opportunity; linked to sleep quality | | `lowSelfEsteem` | How confident and capable the user feels in themselves | ## Bucketed scores Five biomarkers — `distress`, `stress`, `exhaustion`, `sleepPropensity`, and `lowSelfEsteem` — are returned as one of four discrete values: | Value | Label | | ------ | --------------- | | `0.0` | Low | | `0.33` | Moderately low | | `0.66` | Moderately high | | `1.0` | High | Bucketed scores are benchmarked against a matched population in thymia's database — users of the same age, birth sex, and language or accent. Benchmarking accuracy depends directly on the quality of demographic data supplied when creating the model run. Inaccurate `dateOfBirth`, `birthSex`, or `language` values will result in comparisons against a mismatched population and less reliable scores. ## Continuous scores The same five biomarkers are also returned as continuous values under the `uniform` prefix — for example, `uniformDistress`, `uniformExhaustion`. These can take any value between `0` and `1`. `mentalStrain` is returned only as a continuous score and has no bucketed equivalent. ## Score interpretation guide | Score range | Interpretation | | ------------- | ------------------------------------------------------------ | | `0.0 – 0.25` | Low — within normal range for matched population | | `0.25 – 0.50` | Moderately low — slightly elevated | | `0.50 – 0.75` | Moderately high — notably elevated, worth monitoring | | `0.75 – 1.0` | High — significantly elevated relative to matched population | Helios scores reflect the user's state at the time of recording. They are point-in-time measurements and should be interpreted in the context of longitudinal trends where possible. ## Longitudinal monitoring Helios is designed for continuous monitoring. Submitting regular recordings for the same `userLabel` over time allows you to track changes in a user's wellbeing state and identify meaningful trends. For safety-critical applications, we recommend establishing a baseline for each user over several sessions before acting on individual readings. ## Responsible use Helios is a wellness monitoring tool. It is not a regulated medical device and must not be used for clinical diagnosis or as a substitute for clinical judgement. Results should not be presented to users as diagnostic or predictive of any medical condition. For clinical assessment of depression and anxiety, see [Apollo](/apollo/overview). ## Next steps * [Error Reference](/helios/error-reference) — Handle `COMPLETE_ERROR` responses correctly in your integration. * [Apollo](/apollo/overview) — For clinical-grade assessment of depression and anxiety. * [API Reference](/api-reference) — Complete endpoint documentation for the Helios API.
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Error Reference When a Helios model run completes with status `COMPLETE_ERROR`, the response includes two fields to help diagnose the issue: | Field | Description | | ------------- | ------------------------------------------------------------------------------------------------------ | | `errorCode` | A machine-readable code identifying the category of error. Use this to handle errors programmatically. | | `errorReason` | A human-readable description of the error. Intended for debugging, not for display to end users. | ```json { "id": "ddebd75b-99b3-42b4-ac65-5ce852c688e9", "status": "COMPLETE_ERROR", "errorCode": "ERR_RECORDING_TOO_SHORT", "errorReason": "Recording supplied is too short. Please supply a recording containing at least 10 seconds of speech and that is under 3 minutes in length.", "userLabel": "operator-1234" } ``` ## Error codes ### ERR\_RECORDING\_INVALID\_FORMAT The recording supplied was not in a supported file format. **Supported formats:** FLAC, MP3, MP4, Ogg, WebM, WAV **Recommended action:** Verify the file format and convert if necessary before submitting a new model run. *** ### ERR\_RECORDING\_TOO\_SHORT The recording supplied contained less than the minimum required amount of speech. **Minimum speech duration:** 10 seconds **Recommended action:** Ask the user to speak for longer and submit a new model run. *** ### ERR\_RECORDING\_TOO\_LONG The recording supplied exceeded the maximum allowed length. **Maximum recording length:** 3 minutes **Recommended action:** Trim the recording to under 3 minutes and submit a new model run. *** ### ERR\_TRANSCRIPTION\_FAILED No speech was detected in the recording supplied. **Recommended action:** Check audio quality and ask the user to check their microphone before resubmitting. *** ### ERR\_INTERNAL An internal error occurred during model processing. **Recommended action:** Retry the model run. If the error persists, contact [support@thymia.ai](mailto:support@thymia.ai) with the model run ID. *** ## Warnings ```json { "status": "COMPLETE_OK", "warnings": [ "Audio quality may affect result accuracy." ], "results": { ... } } ``` Results returned alongside warnings should be treated with caution. Consider flagging these to your users or discarding them depending on your use case. ## HTTP errors | Status code | Meaning | Common cause | | ----------- | -------------------- | ---------------------------------------------------- | | `401` | Unauthorized | Missing or invalid API key | | `404` | Not found | Model run ID does not exist or data has been deleted | | `422` | Unprocessable entity | Request body is malformed or missing required fields | A `404` response when retrieving results may indicate that data deletion was enabled for the model run and the 12-hour retention window has passed. ## Next steps * [Integration Guide](/helios/integration-guide) — Build a complete production integration including error handling. * [Interpreting Results](/helios/interpreting-results) — Understand what `COMPLETE_OK` results mean and how to use them. * [API Reference](/api-reference) — Complete endpoint documentation for the Helios API.
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Apollo
Clinical
![thymia banner](https://files.buildwithfern.com/https://thymia.docs.buildwithfern.com/ac773140b959bf10a57d9aec2188bc96bbd63a8f153eeb5eef3c73a94c1c9e20/docs/assets/banners/documentation-apollo-banner.png) Apollo is thymia's clinical assessment model. From just 15 seconds of natural speech, Apollo analyses **neural morphemes™** to produce clinical-grade assessments of major depression and generalised anxiety — including disorder-level probabilities, granular symptom scores across all core DSM-V criteria, and a downloadable clinical report. Designed for use by healthcare professionals, Apollo supports remote and rapid mental health triage, enabling precise individual symptom quantification, objective efficacy measurement, and enhanced patient stratification — without requiring an in-person assessment. Apollo is a regulated medical device. It is intended for use by qualified healthcare professionals only and must not be used as a substitute for clinical judgement. Apollo is not intended for self-assessment or consumer use. For non-clinical wellness monitoring, see [Helios](/helios/overview). ## What Apollo measures ### Disorders | Disorder | Description | | ------------ | ------------------------------------------------------- | | `depression` | Likelihood and severity of major depression | | `anxiety` | Likelihood and severity of generalised anxiety disorder | ### Symptoms **Depression symptoms:** | Symptom | Field name | | -------------------------- | --------------------- | | Anhedonia | `anhedonia` | | Low mood | `lowmood` | | Sleep issues | `sleepissues` | | Low energy | `lowenergy` | | Appetite issues | `appetiteissues` | | Worthlessness / guilt | `worthlessnessissues` | | Concentration difficulties | `concentrationissues` | | Psychomotor changes | `psychomotorissues` | **Anxiety symptoms:** | Symptom | Field name | | -------------------- | --------------------- | | Nervousness | `nervousness` | | Uncontrollable worry | `uncontrollableworry` | | Excessive worry | `excessiveworry` | | Trouble relaxing | `troublerelaxing` | | Restlessness | `restlessness` | | Irritability | `irritability` | | Dread | `dread` | ## Use cases | Setting | Application | | ------------------------ | ----------------------------------------------------------------- | | **Remote triage** | Rapid pre-screening of patients before a clinical consultation | | **Patient intake** | Automated intake assessment to stratify patients on waiting lists | | **Monitoring** | Longitudinal tracking of symptom severity between appointments | | **Efficacy measurement** | Objective measurement of treatment response over time | ## Recording requirements | Requirement | Value | | ------------------------ | -------------------------------- | | Recordings required | 2 — mood question and read-aloud | | Minimum speech duration | 15 seconds per recording | | Maximum recording length | 3 minutes per recording | | Supported formats | FLAC, MP3, MP4, Ogg, WebM, WAV | | Upload URL validity | 1 hour per URL | Access to Apollo requires a separate agreement with thymia. Contact [support@thymia.ai](mailto:support@thymia.ai) to request access and integration support. ## Explore Apollo ### Quickstart Make your first Apollo API call and retrieve clinical assessment results in minutes. ### Integration Guide Step-by-step guide to building a complete Apollo integration, including dual recording upload, polling, and error handling. ### Interpreting Results Understand disorder probabilities, symptom scores, and how to use results responsibly in a clinical context. ### Reports Access and use Apollo's downloadable clinical report for each completed model run. ### Error Reference Full reference for Apollo error codes and recommended handling.
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Quickstart In this guide you will create an Apollo model run, upload two voice recordings, and retrieve disorder and symptom scores — the complete end-to-end flow of an Apollo integration. Apollo is a regulated medical device intended for use by qualified healthcare professionals only. It must not be used as a substitute for clinical judgement or for self-assessment. ## Prerequisites * A thymia API key with Apollo access enabled. Contact [support@thymia.ai](mailto:support@thymia.ai) to request access. * Two voice recordings in a supported format (FLAC, MP3, MP4, Ogg, WebM, or WAV), each containing at least 15 seconds of speech: * A **mood question recording** — the patient's spoken response to an open question such as "How are you feeling today?" * A **read-aloud recording** — the patient reading a standard passage aloud ## Step 1 — Create a model run Do not use personally identifiable information such as names or NHS numbers as the `userLabel`. Use an anonymised reference from your system. ## Step 2 — Upload both recordings Both recordings must be uploaded before Apollo will begin processing. **Upload the mood question recording:** ```bash curl "https://path/to/upload/mood" \ -X PUT \ -H 'Content-Type: audio/mpeg' \ --data-binary '@/path/to/mood-question.mp3' ``` **Upload the read-aloud recording:** ```bash curl "https://path/to/upload/read" \ -X PUT \ -H 'Content-Type: audio/mpeg' \ --data-binary '@/path/to/read-aloud.mp3' ``` Both upload URLs are valid for 1 hour. The model will not begin processing until both recordings have been successfully uploaded. ## Step 3 — Poll for results | Status | Meaning | | ---------------- | ------------------------------------------------- | | `CREATED` | Waiting for recordings to be uploaded | | `RUNNING` | Both recordings uploaded, model is processing | | `COMPLETE_OK` | Processing complete, results and report available | | `COMPLETE_ERROR` | Processing failed, see `errorCode` for details | Apollo results must be reviewed and interpreted by a qualified healthcare professional. They must not be communicated directly to patients without clinical review. ## Next steps * [Integration Guide](/apollo/integration-guide) * [Interpreting Results](/apollo/interpreting-results) * [Reports](/apollo/reports) * [Error Reference](/apollo/error-reference)
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Integration Guide This guide covers everything required to build a production-ready Apollo integration — patient data, recording requirements, dual upload, data deletion, and error handling. If you have not yet made your first Apollo API call, start with the [Quickstart](/apollo/quickstart). Apollo is a regulated medical device intended for use by qualified healthcare professionals only. It must not be used as a substitute for clinical judgement or for self-assessment. ## Architecture 1. **Your backend** — creates model runs, handles recording uploads, and polls for results via the thymia API. Your API key must never be exposed in client-side code. 2. **Your frontend** — captures or sources two voice recordings per patient and passes them to your backend for upload. 3. **thymia API** — processes both recordings and returns disorder scores, symptom scores, and a clinical report. ## Patient data | Field | Type | Description | | ------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------- | | `userLabel` | string | A unique, anonymised identifier for the patient in your system. Max 50 characters. Do not use personally identifiable information. | | `dateOfBirth` | date | ISO 8601 date. If day or month are unknown, supply the known parts and use `01` for the rest. | | `birthSex` | enum | Sex assigned at birth. Accepted values: `MALE`, `FEMALE`, `INTERSEX`, `UNKNOWN`. | Do not include personally identifiable information in the `userLabel` field. Use an anonymised reference from your system to ensure compliance with GDPR and HIPAA requirements. ## Recordings | Recording | Description | | ----------------- | -------------------------------------------------------------------------------------- | | **Mood question** | The patient's spoken response to an open question such as "How are you feeling today?" | | **Read-aloud** | The patient reading a standard passage aloud | ### Recording requirements | Requirement | Value | | ------------------------ | ------------------------------ | | Minimum speech duration | 15 seconds per recording | | Maximum recording length | 3 minutes per recording | | Supported formats | FLAC, MP3, MP4, Ogg, WebM, WAV | | Upload URL validity | 1 hour per URL | Both upload URLs expire 1 hour after the model run is created. The model will not begin processing until both recordings have been successfully uploaded. ### Uploading recordings ```bash # Upload mood question recording curl "https://path/to/upload/mood" \ -X PUT \ -H 'Content-Type: audio/mpeg' \ --data-binary '@/path/to/mood-question.mp3' # Upload read-aloud recording curl "https://path/to/upload/read" \ -X PUT \ -H 'Content-Type: audio/mpeg' \ --data-binary '@/path/to/read-aloud.mp3' ``` ## Data deletion | Field | Type | Description | | -------------- | ------- | --------------------------------------------------------------------------- | | `deleteData` | boolean | If `true`, all data is deleted 12 hours after completion. Default: `false`. | | `dataToDelete` | array | Specify which data types to delete. Currently supports `RECORDINGS`. | thymia is GDPR and HIPAA compliant and ISO 13485 certified. For data processing agreements or privacy queries specific to clinical deployments, contact [support@thymia.ai](mailto:support@thymia.ai). ## Polling for results | Status | Action | | ---------------- | ---------------------------------------------------------------- | | `CREATED` | One or both recordings not yet uploaded. | | `RUNNING` | Both recordings uploaded, model is processing. Continue polling. | | `COMPLETE_OK` | Results, symptom scores and report URLs available. | | `COMPLETE_ERROR` | Processing failed. Check `errorCode` and `errorReason`. | ## Accessing results ## Error handling | Error code | Cause | Recommended action | | ------------------------------ | ------------------------------ | ------------------------------------------------ | | `ERR_RECORDING_TOO_SHORT` | Less than 15 seconds of speech | Ask the patient to speak for longer and resubmit | | `ERR_TRANSCRIPTION_FAILED` | No speech detected | Check audio quality and resubmit | | `ERR_RECORDING_INVALID_FORMAT` | Unsupported file format | Convert and resubmit | ## Multi-region | Region | Base URL | | ------------- | -------------------------- | | Default | `https://api.thymia.ai` | | Canada | `https://ca.api.thymia.ai` | | United States | `https://us.api.thymia.ai` | ## Next steps * [Interpreting Results](/apollo/interpreting-results) * [Reports](/apollo/reports) * [Error Reference](/apollo/error-reference) * [API Reference](/api-reference)
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Interpreting Results Apollo results must be reviewed and interpreted by a qualified healthcare professional. They must not be communicated directly to patients without clinical review, and must not be used as a substitute for clinical judgement. ## Results structure ```json { "results": { "disorders": { "depression": { "probability": 0.61, "severity": 0.58 }, "anxiety": { "probability": 0.47, "severity": 0.44 } }, "symptoms": { "depression": { "anhedonia": { "severity": 0.54, "distribution": { "none": 0.18, "mild": 0.31, "moderate": 0.28, "severe": 0.23 } } }, "anxiety": { "nervousness": { "severity": 0.48, "distribution": { "none": 0.26, "mild": 0.28, "moderate": 0.22, "severe": 0.24 } } } } } } ``` ## Disorder-level scores | Score | Description | | ------------- | ------------------------------------------------------------------------------------------- | | `probability` | Likelihood the patient meets the diagnostic threshold, expressed as a value between 0 and 1 | | `severity` | Overall severity of the disorder if present, expressed as a value between 0 and 1 | | Disorder | Field | Clinical reference | | ---------------------------- | ------------ | --------------------------------------- | | Major depression | `depression` | Benchmarked against PHQ-9 gold standard | | Generalised anxiety disorder | `anxiety` | Benchmarked against GAD-7 gold standard | | Probability range | Clinical indication | | ----------------- | ----------------------------------------------------------- | | `0.0 – 0.3` | Low likelihood — below diagnostic threshold | | `0.3 – 0.5` | Borderline — further assessment recommended | | `0.5 – 0.7` | Moderate likelihood — consistent with clinical presentation | | `0.7 – 1.0` | High likelihood — strongly consistent with diagnosis | Apollo probability scores are not diagnostic. They are intended to support clinical decision-making alongside other clinical information. Final diagnosis must be made by a qualified healthcare professional. ## Symptom-level scores | Field | Description | | -------------- | ---------------------------------------------------------------------------------------------- | | `severity` | Overall severity of the symptom, expressed as a continuous value between 0 and 1 | | `distribution` | Estimated probability across `none`, `mild`, `moderate`, `severe` categories. Values sum to 1. | ### Depression symptoms | Symptom | Field name | DSM-V criterion | | -------------------------- | --------------------- | -------------------------------------------- | | Anhedonia | `anhedonia` | Loss of interest or pleasure | | Low mood | `lowmood` | Depressed mood | | Sleep issues | `sleepissues` | Insomnia or hypersomnia | | Low energy | `lowenergy` | Fatigue or loss of energy | | Appetite issues | `appetiteissues` | Changes in weight or appetite | | Worthlessness / guilt | `worthlessnessissues` | Feelings of worthlessness or excessive guilt | | Concentration difficulties | `concentrationissues` | Diminished ability to think or concentrate | | Psychomotor changes | `psychomotorissues` | Psychomotor agitation or retardation | ### Anxiety symptoms | Symptom | Field name | DSM-V criterion | | -------------------- | --------------------- | ------------------------------------------------- | | Nervousness | `nervousness` | Feeling nervous, anxious or on edge | | Uncontrollable worry | `uncontrollableworry` | Unable to stop or control worrying | | Excessive worry | `excessiveworry` | Worrying too much about different things | | Trouble relaxing | `troublerelaxing` | Trouble relaxing | | Restlessness | `restlessness` | Being so restless it is hard to sit still | | Irritability | `irritability` | Becoming easily annoyed or irritable | | Dread | `dread` | Feeling afraid as if something awful might happen | ## Longitudinal monitoring For efficacy measurement, we recommend establishing a baseline assessment before treatment begins and tracking changes at regular intervals. ## Model version ```json { "model": "apollo-1.0" } ``` Results generated by different model versions should not be directly compared. thymia will notify integrators in advance of any model version changes. Contact [support@thymia.ai](mailto:support@thymia.ai) for version change notifications. ## Responsible use Apollo is a regulated medical device. The following requirements apply to all clinical deployments: * Results must be reviewed by a qualified healthcare professional before any clinical action is taken. * Results must not be communicated directly to patients without clinical review. * Apollo must not be used as the sole basis for diagnosis or treatment decisions. * Apollo is not validated for use in emergency or crisis situations. If a patient is in crisis, follow your standard emergency protocols. ## Next steps * [Reports](/apollo/reports) * [Error Reference](/apollo/error-reference) * [API Reference](/api-reference)
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Reports Every Apollo model run that completes with status `COMPLETE_OK` generates a clinical report available in two formats — a web view and a downloadable PDF. Apollo reports must be reviewed and interpreted by a qualified healthcare professional. They must not be shared directly with patients without clinical review. ## Report URLs ```json { "report": { "viewUrl": "https://reports.thymia.ai/v1/reports/a1b2c3d4?token=...", "pdfUrl": "https://reports.thymia.ai/v1/reports/a1b2c3d4/pdf?token=...", "accessExpiresAt": "2024-03-08T09:01:10Z" } } ``` | Field | Description | | ----------------- | ---------------------------------------- | | `viewUrl` | URL to view the report in a browser | | `pdfUrl` | URL to download the report as a PDF | | `accessExpiresAt` | ISO 8601 timestamp when both URLs expire | ## URL expiry Report URLs expire at the time indicated in `accessExpiresAt`. To retrieve fresh URLs, poll the model run endpoint again — new URLs will be returned as long as the model run data has not been deleted. If data deletion is enabled (`deleteData: true`), report URLs will become inaccessible 12 hours after the model run completes, regardless of `accessExpiresAt`. Ensure reports are accessed and stored before this window closes. ## Accessing the report ### Web view ```html ``` ### PDF download ```bash curl "https://reports.thymia.ai/v1/reports/a1b2c3d4/pdf?token=..." \ -o apollo-report-patient-5678.pdf ``` ## Report contents | Section | Description | | --------------------------- | ------------------------------------------------------------ | | **Patient details** | User label, assessment date, and model version | | **Disorder summary** | Probability and severity scores for depression and anxiety | | **Symptom breakdown** | Severity and distribution scores for all core DSM-V symptoms | | **Clinical interpretation** | Guidance on interpreting scores in a clinical context | ## Storing reports For clinical governance and audit purposes, download and store the PDF report in your patient records system as soon as it becomes available — particularly if data deletion is enabled. ## Next steps * [Interpreting Results](/apollo/interpreting-results) * [Error Reference](/apollo/error-reference) * [API Reference](/api-reference)
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Error Reference When an Apollo model run completes with status `COMPLETE_ERROR`, the response includes two fields: | Field | Description | | ------------- | -------------------------------------------------------------------------------- | | `errorCode` | Machine-readable error code. Use this to handle errors programmatically. | | `errorReason` | Human-readable description. Intended for debugging, not for display to patients. | ```json { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "COMPLETE_ERROR", "errorCode": "ERR_RECORDING_TOO_SHORT", "errorReason": "One or more recordings supplied contained less than the minimum required amount of speech.", "userLabel": "patient-5678" } ``` Error details must not be surfaced directly to patients. Present a neutral message and prompt the patient to repeat the recording where applicable. ## Error codes ### ERR\_RECORDING\_INVALID\_FORMAT One or more recordings were not in a supported file format. **Supported formats:** FLAC, MP3, MP4, Ogg, WebM, WAV **Affects:** Either or both recordings. **Recommended action:** Verify the file format of both recordings and convert if necessary before submitting a new model run. *** ### ERR\_RECORDING\_TOO\_SHORT One or more recordings contained less than the minimum required amount of speech. **Minimum speech duration:** 15 seconds per recording **Affects:** Either or both recordings. **Recommended action:** Ask the patient to speak continuously for at least 15 seconds per recording and submit a new model run. *** ### ERR\_RECORDING\_TOO\_LONG One or more recordings exceeded the maximum allowed length. **Maximum recording length:** 3 minutes per recording **Affects:** Either or both recordings. **Recommended action:** Trim the affected recording and submit a new model run. *** ### ERR\_TRANSCRIPTION\_FAILED No speech was detected in one or more recordings. **Affects:** Either or both recordings. **Recommended action:** Check audio quality of both recordings. Ask the patient to record in a quiet environment with a working microphone. *** ### ERR\_INTERNAL An internal error occurred during model processing. **Recommended action:** Retry the model run. If the error persists, contact [support@thymia.ai](mailto:support@thymia.ai) with the model run ID. Document the error for audit purposes. *** ## Warnings ```json { "status": "COMPLETE_OK", "warnings": ["Audio quality may affect result accuracy."], "results": { ... } } ``` In a clinical context, results returned alongside warnings should be flagged to the reviewing clinician before acting on the results. ## HTTP errors | Status code | Meaning | Common cause | | ----------- | -------------------- | ----------------------------------------------------------------------------------- | | `401` | Unauthorized | Missing or invalid API key | | `404` | Not found | Model run ID does not exist, data has been deleted, or Apollo access is not enabled | | `422` | Unprocessable entity | Request body is malformed or missing required fields | A `404` response may indicate the 12-hour data deletion window has passed. Ensure results and reports are stored before deletion occurs. ## Next steps * [Integration Guide](/apollo/integration-guide) * [Interpreting Results](/apollo/interpreting-results) * [Reports](/apollo/reports) * [API Reference](/api-reference)
***
Crown Commercial Service NHS Digital ISO 27001 ISO 13485 HIPAA GDPR Cyber Essentials Certified
# Sentinel ![thymia banner](https://files.buildwithfern.com/https://thymia.docs.buildwithfern.com/e3be6b80e1d6b508b9ca39e34bc92024c3feaa4d70474c9d323ce36c182534c3/docs/assets/banners/documentation-sentinel-banner.png) Sentinel is thymia's real-time monitoring SDK for voice-based AI agents. It analyses audio and transcripts as they stream, runs safety policies, and returns actionable results — all without storing recordings. Sentinel is currently in early access. For access and configuration, contact [support@thymia.ai](mailto:support@thymia.ai). ## How it works Sentinel sits alongside your voice agent pipeline. You stream user and agent audio (plus transcripts) over a WebSocket connection. Sentinel runs biomarker models and safety policies in real time and returns results through callbacks.