Description
Returns machine-readable metadata for the release currently serving traffic, including the rollout timestamp, image URI, and source SHA when present.
Request
Description
Lists station summaries. By default this returns only published stations. Admin callers can add `publication_status=inactive` to inspect inactive stations or `publication_status=all` to inspect both published and inactive stations. Inactive station data is never returned to unauthenticated callers.
Request
Description
Returns available station sections and station categories. Public requests default to published stations only. Admin callers can pass `publication_status=inactive` or `publication_status=all` to inspect the broader catalog.
Request
Description
Returns the full station payload. Public requests can only read published stations. Admin callers can request `publication_status=inactive` for an inactive station or `publication_status=all` to bypass the publication filter. The publication block includes the separate boolean expert_reviewed provenance field.
Path Params
slug string Required Station slug (URL-safe)
Request
{
"slug": "abuse-in-intellectually-disabled-person-history-taking",
"section": "HISTORY TAKING",
"title": "ABUSE IN INTELLECTUALLY DISABLED PERSON - history",
"task": "You have been asked to speak to the key worker of a 26-year-old man with\nmoderate to severe degree of learning disability who attends the day centre. The key\nworker is concerned that Paul has been withdrawn and tearful.Obtain more history from\nthe key worker to identify causes for his presentation and arrive at a diagnosis.\nCASE SYNOPSIS\n: You're key worker for a 27-year-old man with a moderate degree of\nlearning disability who attends the day centre you work at. You contacted the mental\nhealth team because of concerns about him. A couple of days ago you noticed bruises on the\nleft side of his face and neck, they are grey/purple in colour. He hasn't been his usual self\nfor the past few days/weeks. He is easily upset, and it is often difficult to ascertain why,\nalthough he sometimes signs 'home' when distressed. He has been agitated prior to going\nhome in the evening. You have tried contacting his parents but there has been no reply to\nphone calls. He has had epilepsy most of his life, however, in recent weeks, he has been\nhaving fits more frequently, almost every day. He is currently on (tablets) Valproate and a\nnew medication. He has limited speech, mostly communicating in single words and basic\nMakaton signs to communicate basic requests\n\nYou're key worker for a 27-year-old man with a moderate degree of\nlearning disability who attends the day centre you work at. You contacted the mental\nhealth team because of concerns about him. A couple of days ago you noticed bruises on the\nleft side of his face and neck, they are grey/purple in colour. He hasn't been his usual self\nfor the past few days/weeks. He is easily upset, and it is often difficult to ascertain why,\nalthough he sometimes signs 'home' when distressed. He has been agitated prior to going\nhome in the evening. You have tried contacting his parents but there has been no reply to\nphone calls. He has had epilepsy most of his life, however, in recent weeks, he has been\nhaving fits more frequently, almost every day. He is currently on (tablets) Valproate and a\nnew medication. He has limited speech, mostly communicating in single words and basic\nMakaton signs to communicate basic requests",
"prompts": {
"station_name": "ABUSE IN INTELLECTUALLY DISABLED PERSON-HISTORY TAKING",
"case_synopsis": "You have been asked to speak to the key worker of a 26-year-old man with\nmoderate to severe degree of learning disability who attends the day centre. The key\nworker is concerned that Paul has been withdrawn and tearful.Obtain more history from\nthe key worker to identify causes for his presentation and arrive at a diagnosis.\nCASE SYNOPSIS\n: You're key worker for a 27-year-old man with a moderate degree of\nlearning disability who attends the day centre you work at. You contacted the mental\nhealth team because of concerns about him. A couple of days ago you noticed bruises on the\nleft side of his face and neck, they are grey/purple in colour. He hasn't been his usual self\nfor the past few days/weeks. He is easily upset, and it is often difficult to ascertain why,\nalthough he sometimes signs 'home' when distressed. He has been agitated prior to going\nhome in the evening. You have tried contacting his parents but there has been no reply to\nphone calls. He has had epilepsy most of his life, however, in recent weeks, he has been\nhaving fits more frequently, almost every day. He is currently on (tablets) Valproate and a\nnew medication. He has limited speech, mostly communicating in single words and basic\nMakaton signs to communicate basic requests\n\nYou're key worker for a 27-year-old man with a moderate degree of\nlearning disability who attends the day centre you work at. You contacted the mental\nhealth team because of concerns about him. A couple of days ago you noticed bruises on the\nleft side of his face and neck, they are grey/purple in colour. He hasn't been his usual self\nfor the past few days/weeks. He is easily upset, and it is often difficult to ascertain why,\nalthough he sometimes signs 'home' when distressed. He has been agitated prior to going\nhome in the evening. You have tried contacting his parents but there has been no reply to\nphone calls. He has had epilepsy most of his life, however, in recent weeks, he has been\nhaving fits more frequently, almost every day. He is currently on (tablets) Valproate and a\nnew medication. He has limited speech, mostly communicating in single words and basic\nMakaton signs to communicate basic requests"
},
"lead": "You have been asked to speak to the key worker of a 26-year-old man with\nmoderate to severe degree of learning disability who attends the day centre. The key\nworker is concerned that Paul has been withdrawn and tearful.Obtain more history from\nthe key worker to identify causes for his presentation and arrive at a diagnosis.",
"key_points": [
"ABUSE IN INTELLECTUALLY DISABLED PERSON-HISTORY TAKING",
"You have been asked to speak to the key worker of a 26-year-old man with",
"moderate to severe degree of learning disability who attends the day centre.",
"worker is concerned that Paul has been withdrawn and tearful.Obtain more history from",
"the key worker to identify causes for his presentation and arrive at a diagnosis."
],
"persona": {
"name": "Standardized Patient",
"age": 36,
"affect": "low",
"communication_style": "cooperative but guarded",
"goals_concerns": [
"ABUSE IN INTELLECTUALLY DISABLED PERSON-HISTORY TAKING",
"You have been asked to speak to the key worker of a 26-year-old man with"
],
"nonverbal_cues": [
"low"
],
"do_not_volunteer": [
"moderate to severe degree of learning disability who attends the day centre.",
"worker is concerned that Paul has been withdrawn and tearful.Obtain more history from"
]
},
"guardrails": {
"forbidden_topics": [],
"mandatory_disclosures": [
"ABUSE IN INTELLECTUALLY DISABLED PERSON-HISTORY TAKING",
"You have been asked to speak to the key worker of a 26-year-old man with"
],
"handoff_triggers": [],
"privacy_rules": [
"no real third-party identifiers"
],
"out_of_scope_responses": [
"I can describe what has been happening, but I cannot decide my treatment plan myself."
]
},
"rubric": {
"marking_sheet_title": "MARKING SHEET: ABUSE IN INTELLECTUALLY DISABLED PERSON-HISTORY TAKING",
"overall_scale": [
"SEVERE FAIL",
"FAIL",
"BORDERLINE FAIL",
"BORDERLINE PASS",
"PASS",
"EXCELLENT PASS"
],
"domain_rating_scale": [
"0",
"1",
"2",
"3",
"4"
],
"rating_to_score": {
"0": 0.0,
"1": 0.25,
"2": 0.5,
"3": 0.75,
"4": 1.0
},
"competency_items": [
{
"label": "Elicit relevant history - recent change in behaviour, withdrawal, tearfulness, and agitation before going home",
"weight": 1.0,
"scoring_mode": "level",
"critical": true,
"hints": [
"withdrawn",
"tearful",
"agitated before going home",
"past few days or weeks",
"changed behaviour"
]
},
{
"label": "Elicit details of unexplained bruising and possible non-accidental injury",
"weight": 1.0,
"scoring_mode": "level",
"critical": true,
"hints": [
"bruises",
"face and neck",
"grey or purple",
"injury",
"non-accidental"
]
},
{
"label": "Explore communication cues from Paul including distress, signing home, pain, fear, or reluctance to return home",
"weight": 1.0,
"scoring_mode": "level",
"critical": true,
"hints": [
"Makaton",
"signs home",
"limited speech",
"distress",
"fear",
"pain"
]
},
{
"label": "Clarify home circumstances, parental contact, supervision, and possible neglect or abuse by carers",
"weight": 1.0,
"scoring_mode": "level",
"critical": true,
"hints": [
"parents",
"carers",
"home",
"no reply",
"supervision",
"neglect",
"abuse"
]
},
{
"label": "Assess epilepsy history, increased seizure frequency, medication changes, and medical explanations for presentation",
"weight": 1.0,
"scoring_mode": "level",
"critical": false,
"hints": [
"epilepsy",
"fits",
"seizures",
"valproate",
"new medication",
"medical cause"
]
},
{
"label": "Safeguarding and risk assessment - immediate safety, documentation, escalation, and multidisciplinary action",
"weight": 1.0,
"scoring_mode": "level",
"critical": true,
"hints": [
"safeguarding",
"safe",
"document bruises",
"escalate",
"social services",
"police",
"multidisciplinary"
]
},
{
"label": "Synthesise likely abuse or safeguarding concern while considering differential causes such as seizures or medication effects",
"weight": 1.0,
"scoring_mode": "level",
"critical": true,
"hints": [
"abuse",
"safeguarding concern",
"differential",
"seizures",
"medication",
"diagnosis",
"explain"
]
}
],
"feedback_checklist": [
{
"id": 1,
"title": "Missed behavioural change chronology",
"details": "Explore withdrawal, tearfulness, agitation before going home, and timing over days or weeks."
},
{
"id": 2,
"title": "Insufficient injury and safeguarding exploration",
"details": "Ask directly about bruising, possible non-accidental injury, home circumstances, and carer contact."
},
{
"id": 3,
"title": "Poor immediate safety planning",
"details": "Document injuries, escalate safeguarding, consider medical causes, and ensure Paul is not returned to an unsafe setting."
}
]
},
"evaluation": {
"version": "ev-1.0.0"
},
"sources": {
"pdf": "SPMMCourseBooklet2022.pdf"
},
"station_meta": {
"topic": "ABUSE IN INTELLECTUALLY DISABLED PERSON-HISTORY TAKING",
"time_limit_minutes": 7,
"setting": "Clinic",
"expected_diagnosis": "Working diagnosis",
"station_category": "history_taking"
},
"publication": {
"status": "published",
"reason": "Expert reviewed for initial candidate testing",
"expert_reviewed": true
},
"health": {
"issues": [],
"has_rubric": true,
"has_key_points": true,
"has_persona": true,
"has_guardrails": true,
"has_tuning": false,
"simulation_ready": true,
"evaluation_ready": true,
"publishable": true
}
}
Description
Lists immutable snapshots saved whenever a station is created, updated, deleted, or rolled back. This endpoint is admin-only because revisions can contain inactive station data.
Endpoint
POST /stations/{slug}/revisions/{revision_id}/rollback
Description
Restores a previous revision as the current station and writes a new revision entry.
Rollback request
Description
General-purpose assistant endpoint. Accepts text and optional audio/document uploads, stores the raw files, extracts text, and can answer back with AI-generated guidance.
Content-Type
multipart/form-data
Form Fields
text string Optional General question or prompt
audio file Optional Audio upload to transcribe
documents file[] Optional One or more documents to extract text from
station_slug string Optional Station context if the user wants station-specific help
exam_slug string Optional Mock exam context
category string Optional Free-form hint for routing
Request example
{
"text": "Summarize the main differences between psychosis and anxiety in this station.",
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"category": "study-help"
}
Response (200)
{
"interaction": {
"kind": "ask",
"station_slug": "acute-presentation-of-psychosis-in-the-context-of-cannabis-misuse",
"category": "history_taking",
"attachment_paths": [
"raw/document/example.txt"
]
},
"answer": "The main difference is ...",
"provider": "openai",
"model": "gpt-4o-mini"
}
Response (422 example)
{
"detail": "At least one text or attachment input is required."
}
Technical route for submitting review text and receiving a stored AI review response. For practitioner workflow and interpretation, use the Station Review Guide.
Endpoint
POST /review
Description
Accepts review text plus optional station or session context. The backend stores the submission and returns a review in the shared assistant response shape.
Request payload
{
"text": "Please review this station draft for publication readiness. Focus on rubric completeness, persona specificity, key points, and simulation safety.\n\n{\n \"title\": \"Early menopausal symptoms assessment\",\n \"persona\": {\"name\": \"Mrs Whitlock\", \"communication_style\": \"anxious but cooperative\"},\n \"key_points\": [\"timeline\", \"functional impact\", \"risk\", \"ICE\"],\n \"rubric_domains\": [\"history structure\", \"symptom exploration\", \"risk assessment\"]\n}",
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"category": "station-review",
"generate_ai_response": true
}
Response (200)
{
"interaction": {
"id": 8421,
"kind": "review",
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"session_id": null,
"exam_slug": null,
"category": "station-review",
"user_text": "Please review this station draft for publication readiness. Focus on rubric completeness, persona specificity, key points, and simulation safety.\n\n{\n \"title\": \"Early menopausal symptoms assessment\",\n \"persona\": {\"name\": \"Mrs Whitlock\", \"communication_style\": \"anxious but cooperative\"},\n \"key_points\": [\"timeline\", \"functional impact\", \"risk\", \"ICE\"],\n \"rubric_domains\": [\"history structure\", \"symptom exploration\", \"risk assessment\"]\n}",
"ai_text": "Summary: the station is close to publishable, but the rubric language should be more measurable and the persona should include clearer disclosure boundaries. Improve the competency items, add one explicit safety trigger, and tighten the lead so it matches the case synopsis.",
"payload": {
"kind": "review",
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"session_id": null,
"exam_slug": null,
"category": "station-review",
"station_title": "ABUSE IN INTELLECTUALLY DISABLED PERSON - history",
"exam_title": null,
"provider": "openai",
"model": "gpt-5-mini",
"generate_ai_response": true,
"candidate_id": null,
"summary": "Close to publishable; tighten rubric specificity and safety guardrails.",
"tags": [
"station-review",
"publishability",
"rubric"
],
"notes": [
"Add one more measurable competency item.",
"Replace generic persona wording with patient-specific behaviour cues.",
"Include a clear escalation or handoff trigger for unsafe scenarios."
],
"transcript_excerpt": null,
"evaluation_snapshot": null,
"attachments": []
},
"attachment_paths": [],
"created_at": "2026-07-17T10:30:00Z"
},
"extracted_text": "Please review this station draft for publication readiness. Focus on rubric completeness, persona specificity, key points, and simulation safety.\n\n{\n \"title\": \"Early menopausal symptoms assessment\",\n \"persona\": {\"name\": \"Mrs Whitlock\", \"communication_style\": \"anxious but cooperative\"},\n \"key_points\": [\"timeline\", \"functional impact\", \"risk\", \"ICE\"],\n \"rubric_domains\": [\"history structure\", \"symptom exploration\", \"risk assessment\"]\n}",
"attachments": [],
"provider": "openai",
"model": "gpt-5-mini",
"answer": "Summary: the station is close to publishable, but the rubric language should be more measurable and the persona should include clearer disclosure boundaries. Improve the competency items, add one explicit safety trigger, and tighten the lead so it matches the case synopsis.",
"notes": [
"Close to publishable; tighten rubric specificity and safety guardrails.",
"Add one more measurable competency item.",
"Replace generic persona wording with patient-specific behaviour cues."
]
}
Description
Candidate uploads audio and receives the transcribed candidate turn, patient response, and optional TTS.
Content-Type
multipart/form-data
Form Fields
file audio/wav Required 16-bit PCM mono WAV
Request example
Query: ?station=
Form data:
file=@candidate-audio.wav
Parameter options
Query parameter station: any valid station slug from GET /stations
Upload file content type: audio/wav
Failure mode
Returns 503 when the configured ASR provider and its fallback both reject the uploaded audio bytes.
Response (200)
{
"reply": "I'm sorry to hear that. Can you tell me more about when it started?",
"transcript": [
{
"role": "candidate",
"text": "I have been feeling on edge recently."
},
{
"role": "patient",
"text": "I'm sorry to hear that. Can you tell me more about when it started?"
}
],
"tts_url": "/media/tts/example.wav",
"session_id": "session_123",
"metrics": {
"t_asr_ms": 622.15,
"t_nlp_ms": 904.33,
"t_tts_ms": 202.1
},
"metadata": {
"asr_provider": "deepgram",
"nlp_provider": "openai",
"tts_provider": "openai",
"candidate_transcript": "I have been feeling on edge recently."
}
}
Description
Public websocket for realtime text/audio turn-taking. No API key is required. Uses the current live ASR, NLP, TTS, and avatar defaults.
Query options
Purpose
Change the live ASR, NLP, and TTS defaults once, and the stack uses those selections across chat, audio, and websocket flows.
Selectable providers
{
"detail": [
{
"loc": [
"body",
"nlp_provider"
],
"msg": "Input should be 'openai'",
"type": "literal_error"
}
]
}
Audit log
GET /admin/provider-defaults/audit?limit=25
Runtime status
GET /providers/status
Advanced diagnostics
These routes still exist for direct provider inspection:
GET /asr/faster_whisper
POST /asr/faster_whisper/batch
GET /tts/openai
POST /tts/openai/speak
GET /nlp/openai
POST /nlp/openai/simulated-patient
Description
Returns the transcript, timestamps, and current station state.
Response (200)
{
"session_id": "session_123",
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"transcript": [
{
"role": "candidate",
"text": "What brought you in today?"
},
{
"role": "patient",
"text": "I have been anxious for months."
}
]
}
Endpoint
POST /session/end
Description
Closes the session and returns the final examiner summary. The session must already contain transcript turns, or you must provide transcript items in the request body.
Request payload
{
"session_id": "session_123",
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"transcript": [
{
"role": "candidate",
"text": "What brought you in today?"
},
{
"role": "patient",
"text": "I have been anxious for months."
}
]
}
Description
Lower-level internal websocket. Requires API key auth. Uses the same orchestration engine as `/realtime`, but preserves the older internal event names.
Auth
Requires x-api-key header or api_key query parameter when API auth is enabled.
Client event types
start or hello
audio_config
audio_chunk
commit_turn or audio_end
candidate_text
end
Server event types
audio_config_ack
partial_transcript
final_transcript
patient_response_text
avatar_session
avatar_response
tts_audio_chunk
session_state
avatar_session_closed
error
final_transcript example
{
"type": "final_transcript",
"text": "Can you tell me what happened last night?"
}
patient_response_text example
{
"type": "patient_response_text",
"text": "I had to get out of the flat because the voices were getting too much.",
"provider": "openai",
"model": "gpt-5-mini"
}
Response (401 example)
{
"type": "error",
"code": "unauthorized",
"message": "Invalid API key."
}
Description
Evaluates a station transcript and returns the full examiner-scoring payload. You may supply either a transcript directly, a session_id that already has transcript turns, or both.
Request payload
{
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"session_id": "session_123",
"transcript": [
{
"role": "candidate",
"text": "What brought you in today?"
},
{
"role": "patient",
"text": "I have been anxious for months."
}
],
"feedback_mode": "examiner"
}
Response (200)
{
"overall_rating": "PASS",
"total_score": 0.71,
"domain_scores": [
{
"label": "History and symptom exploration",
"rating": "Good",
"score": 0.75,
"rationale": "Explored the main anxiety symptoms and time course clearly.",
"evidence": [
"Clarified chronic course of anxiety",
"Asked about impairment across settings"
]
}
],
"strengths": [
"Good structure overall."
],
"missed_points": [
"Risk assessment needed more depth."
],
"feedback": [
"Good structure overall.",
"Risk assessment needed more depth."
],
"critical_failures": []
}
Response (422 example)
{
"detail": "A transcript or session_id is required."
}
Endpoint
POST /evaluation/score
Description
Scores the session transcript using the station rubric and returns the examiner view.
Request payload
{
"station_slug": "abuse-in-intellectually-disabled-person-history-taking",
"transcript": [
{
"role": "candidate",
"text": "What brought you in today?"
},
{
"role": "patient",
"text": "I have been anxious for months."
}
]
}
Response (200)
{
"overall_rating": "PASS",
"total_score": 0.71,
"feedback": [
"Improve: Explore risk and safety more explicitly.",
"Use open questions early, then narrow into the key diagnosis."
]
}
Authoritative catalog generated from the live OpenAPI schema. Routes intentionally hidden from the public guide are excluded here. Expand any card for exact request bodies, parameters, and documented responses.