> ## Documentation Index
> Fetch the complete documentation index at: https://docs.medera.info/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart — Co-Therapy multimodal

> Run a multimodal in-session analysis with Neurobehavioral Construct profiles.

The Co-Therapy Agent is a silent multimodal partner — it never speaks to the patient. It runs the Vocal Acoustic Engine, the Facial Physiological Engine, and the Neurobehavioral Construct Computer to produce a canonical clinical payload with 15 named construct activations.

## Pipeline

<Frame>
  <svg viewBox="0 0 720 380" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="medera/cotherapy-quickstart.svg" style={{ width: '100%', height: 'auto', display: 'block', maxWidth: '780px', margin: '24px auto' }}><defs><pattern id="mdr-dots" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="rgba(0,0,0,0.08)" /></pattern></defs><rect x="0" y="0" width="720" height="380" fill="#ffffff" /><rect x="0" y="0" width="720" height="32" fill="#141413" /><circle cx="14" cy="16" r="3" fill="#ff5f57" /><circle cx="26" cy="16" r="3" fill="#febc2e" /><circle cx="38" cy="16" r="3" fill="#28c840" /><text x="54" y="20" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11" fontWeight="500">medera/cotherapy-quickstart.svg</text><text x="706" y="20" textAnchor="end" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">co-therapy quickstart</text><rect x="0" y="32" width="720" height="348" fill="#fafaf6" /><rect x="0" y="32" width="720" height="348" fill="url(#mdr-dots)" /><rect x="0.5" y="0.5" width="719" height="379" fill="none" stroke="#141413" strokeOpacity="0.18" /><text x="360.0" y="56" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="15" fontWeight="600">Co-Therapy multimodal — quickstart</text><rect x="208.0" y="108.0" width="130" height="44" fill="#76a1fc" stroke="#4f7be0" strokeWidth="1" /><text x="273.0" y="134" textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="700">Open WSS /therapy</text><line x1="333.0" y1="130" x2="345.0" y2="130" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="345.0,126 345.0,134 351.0,130" fill="rgba(20,20,19,0.25)" /><rect x="364.0" y="108.0" width="148" height="44" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="438.0" y="134" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">Stream audio + video</text><path d="M 660 152.0 Q 672 167.0 660 182.0 L 60 182.0 Q 48 197.0 60 212.0" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" fill="none" /><rect x="157.0" y="212.0" width="232" height="44" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="273.0" y="238" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">Subscribe to construct activations</text><line x1="384.0" y1="234" x2="396.0" y2="234" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="396.0,230 396.0,238 402.0,234" fill="rgba(20,20,19,0.25)" /><rect x="415.0" y="212.0" width="148" height="44" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="489.0" y="238" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">Handle crisis events</text><rect x="60" y="220" width="600" height="48" fill="#141413" stroke="none" strokeWidth="1" /><text x="360.0" y="240" textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="12" fontWeight="600">wss\://api.medera.info/therapy/{session_id}</text><text x="360.0" y="258" textAnchor="middle" fill="#dbe5ff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Audio 16 kHz + Video 15 fps · multimodal fusion</text><text x="360.0" y="300" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Neurobehavioral activations · facial physiology · vocal acoustics</text><text x="360.0" y="320" textAnchor="middle" fill="#5c5c5a" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">Live transcript · construct panel · crisis overlay</text></svg>
</Frame>

<Steps>
  <Step title="Create the session">
    <CodeGroup>
      ```bash theme={"system"}
      cURL curl -X POST https://api.medera.info/api/co-therapy-sessions \ -H "X-API-Key: $MEDERA_API_KEY" \ -d '{ "patientId": "pat_abc", "providers": ["prv_xyz"], "scheduledStart": "2026-05-28T15:00:00Z", "scheduledDurationMinutes": 50, "videoPlatform": "telehealth", "recordingEnabled": true, "deploymentId": "dep_abc" }' 
      ```

      ```typescript JavaScript theme={"system"}
      const session = await client.coTherapy.create({ patientId: 'pat_abc', providers: ['prv_xyz'], scheduledStart: '2026-05-28T15:00:00Z', scheduledDurationMinutes: 50, videoPlatform: 'telehealth', recordingEnabled: true, deploymentId: 'dep_abc', }); 
      ```

      ```python Python theme={"system"}
      session = client.co_therapy.create(patient_id="pat_abc", providers=["prv_xyz"], scheduled_start="2026-05-28T15:00:00Z", scheduled_duration_minutes=50, video_platform="telehealth", recording_enabled=True, deployment_id="dep_abc",) 
      ```
    </CodeGroup>
  </Step>

  <Step title="Start the session">
    ```bash theme={"system"}
    curl -X POST https://api.medera.info/api/co-therapy-sessions/{id}/start \ -H "X-API-Key: $MEDERA_API_KEY" 
    ```
  </Step>

  <Step title="Analyze the session">
    Upload audio + video for full multimodal analysis. The analyzer runs the engines, computes the neurobehavioral profile, and (optionally) retrieves clinical RAG evidence.

    <CodeGroup>
      ```bash theme={"system"}
      cURL curl -X POST https://api.medera.info/api/multimodal-therapy/analyze-session \ -H "X-API-Key: $MEDERA_API_KEY" \ -F "session_id={id}" \ -F "audio_file=@session.wav" \ -F "video_file=@session.mp4" \ -F "transcript=The patient reports..." \ -F "duration_seconds=2400" \ -F "patient_id=pat_abc" 
      ```

      ```typescript JavaScript theme={"system"}
      const form = new FormData; form.append('session_id', session.id); form.append('audio_file', audioBlob, 'session.wav'); form.append('video_file', videoBlob, 'session.mp4'); form.append('transcript', transcript); form.append('duration_seconds', '2400'); form.append('patient_id', 'pat_abc'); const res = await fetch('https://api.medera.info/api/multimodal-therapy/analyze-session', { method: 'POST', headers: { 'X-API-Key': process.env.MEDERA_API_KEY! }, body: form, }); 
      ```

      ```python Python theme={"system"}
      with open('session.wav', 'rb') as a, open('session.mp4', 'rb') as v: res = client.multimodal.analyze_session(session_id=session.id, audio_file=a, video_file=v, transcript=transcript, duration_seconds=2400, patient_id="pat_abc",) 
      ```
    </CodeGroup>
  </Step>

  <Step title="Read the canonical payload">
    The response is a canonical payload with flat `ClinicalMetric` envelopes:

    ```json theme={"system"}
    { "facial": { "heart_rate": { "value": 78, "unit": "bpm", "confidence": 0.91 }, "hrv_sdnn": { "value": 42, "unit": "ms", "confidence": 0.83 }, "stress_index": { "value": 62, "unit": "0-100", "confidence": 0.78 } }, "vocal": { "f0_mean": { "value": 168, "unit": "Hz", "confidence": 0.92 }, "jitter": { "value": 0.85, "unit": "%", "confidence": 0.88 }, "prosodic_flatness": { "value": 0.48, "unit": "0-1", "confidence": 0.79 } }, "rdoc": { "constructs": [ { "name": "potential_threat_anxiety", "domain": "negative_valence", "score": 0.74, "confidence": "HIGH", "severity": "high", "interpretation": "Elevated anxiety markers...", "contributors": [ { "feature": "f0_mean", "value": 168, "contribution": 0.31 } ] } ] }, "clinical_context": { "summary": "...", "evidence_blocks": [...], "differentials": [...] } } 
    ```
  </Step>
</Steps>

<Warning>
  The Co-Therapy Agent **never** addresses or interacts with the patient. Recording requires explicit per-session consent (`consent_recorded: true`).
</Warning>

***

## What's next

<CardGroup cols={2}>
  <Card title="Co-Therapy Agent" icon="https://mintcdn.com/medera-357fd587/n1mgcc3nR2sq_PoL/icons/ui/users.svg?fit=max&auto=format&n=n1mgcc3nR2sq_PoL&q=85&s=6cfd2d71e676953927a6cd89be0a86d5" href="/agentic/agents/co-therapy" width="40" height="40" data-path="icons/ui/users.svg">
    Agent-level documentation.
  </Card>

  <Card title="Multimodal architecture" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/diagram-project.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=c34a1c4143b4b177cb3d865464dd7562" href="/multimodal/architecture" width="40" height="40" data-path="icons/ui/diagram-project.svg">
    Pipeline deep dive.
  </Card>

  <Card title="Neurobehavioral Construct Constructs" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/brain.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=0fdc19884888b6cfb111dd1490535243" href="/multimodal/rdoc/overview" width="40" height="40" data-path="icons/ui/brain.svg">
    15 named constructs.
  </Card>

  <Card title="Multimodal API" icon="https://mintcdn.com/medera-357fd587/n1mgcc3nR2sq_PoL/icons/ui/terminal.svg?fit=max&auto=format&n=n1mgcc3nR2sq_PoL&q=85&s=a54c23f663622840fa7b900ec04462a5" href="/api-reference/multimodal/analyze-video" width="40" height="40" data-path="icons/ui/terminal.svg">
    REST surface.
  </Card>
</CardGroup>
