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

# Get Transcript

> Get the session transcript

Retrieve the transcript with speaker identification, timestamps, and translations.

## Path Parameters

<ParamField path="id" type="string" required>
  Session ID (e.g., `sess_01HXYZ123456789`).
</ParamField>

## Response

<ResponseField name="id" type="string">
  Transcript identifier.
</ResponseField>

<ResponseField name="object" type="string">
  Always `transcript`.
</ResponseField>

<ResponseField name="session_id" type="string">
  Parent session ID.
</ResponseField>

<ResponseField name="status" type="string">
  `in_progress` (session active) or `completed` (session ended).
</ResponseField>

<ResponseField name="turns" type="array">
  Conversation turns.

  <Expandable title="turn properties">
    <ResponseField name="sequence" type="integer">
      Turn number (1-indexed).
    </ResponseField>

    <ResponseField name="speaker" type="string">
      `agent` or `customer`.
    </ResponseField>

    <ResponseField name="language" type="string">
      Detected language code.
    </ResponseField>

    <ResponseField name="text" type="string">
      Original spoken text.
    </ResponseField>

    <ResponseField name="translation" type="object">
      Translation (if applicable).

      <Expandable title="properties">
        <ResponseField name="language" type="string">
          Target language.
        </ResponseField>

        <ResponseField name="text" type="string">
          Translated text.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      Turn timestamp (ISO 8601).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="metadata" type="object">
  Summary statistics.

  <Expandable title="properties">
    <ResponseField name="total_turns" type="integer">
      Number of turns.
    </ResponseField>

    <ResponseField name="duration_seconds" type="number">
      Total duration.
    </ResponseField>

    <ResponseField name="languages_detected" type="array">
      Languages detected.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.kallglot.com/v1/sessions/sess_01HXYZ123456789/transcript \
    -H "Authorization: Bearer sk_live_your_api_key"
  ```

  ```python Python theme={null}
  import os
  import requests

  API_KEY = os.environ.get('KALLGLOT_API_KEY')
  SESSION_ID = 'sess_01HXYZ123456789'

  response = requests.get(
      f'https://api.kallglot.com/v1/sessions/{SESSION_ID}/transcript',
      headers={'Authorization': f'Bearer {API_KEY}'}
  )

  if response.status_code == 200:
      transcript = response.json()
      print(f"Status: {transcript['status']}")
      print(f"Total turns: {transcript['metadata']['total_turns']}")
      print(f"Languages: {', '.join(transcript['metadata']['languages_detected'])}")
      print()

      for turn in transcript['turns']:
          print(f"[{turn['speaker'].upper()}] {turn['text']}")
          if turn.get('translation'):
              print(f"  → {turn['translation']['text']}")
  elif response.status_code == 404:
      print('Session not found')
  else:
      error = response.json()
      print(f"Error: {error['error']['message']}")
  ```

  ```javascript JavaScript theme={null}
  const API_KEY = process.env.KALLGLOT_API_KEY;
  const SESSION_ID = 'sess_01HXYZ123456789';

  const response = await fetch(`https://api.kallglot.com/v1/sessions/${SESSION_ID}/transcript`, {
    headers: { 'Authorization': `Bearer ${API_KEY}` }
  });

  const data = await response.json();

  if (response.ok) {
    console.log('Status:', data.status);
    console.log('Total turns:', data.metadata.total_turns);
    console.log('Languages:', data.metadata.languages_detected.join(', '));
    console.log();

    for (const turn of data.turns) {
      console.log(`[${turn.speaker.toUpperCase()}] ${turn.text}`);
      if (turn.translation) {
        console.log(`  → ${turn.translation.text}`);
      }
    }
  } else {
    console.error('Error:', data.error.message);
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "trn_sess_01HXYZ123456789",
    "object": "transcript",
    "session_id": "sess_01HXYZ123456789",
    "status": "completed",
    "turns": [
      {
        "sequence": 1,
        "speaker": "agent",
        "language": "en",
        "text": "Hello, how can I help you?",
        "timestamp": "2026-03-26T11:00:15Z"
      },
      {
        "sequence": 2,
        "speaker": "customer",
        "language": "de",
        "text": "Ich habe eine Frage zu meiner Bestellung.",
        "translation": {
          "language": "en",
          "text": "I have a question about my order."
        },
        "timestamp": "2026-03-26T11:00:18Z"
      }
    ],
    "metadata": {
      "total_turns": 2,
      "duration_seconds": 180.5,
      "languages_detected": ["en", "de"]
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "session_not_found",
      "message": "Session not found",
      "type": "not_found_error"
    }
  }
  ```
</ResponseExample>

<Note>
  Transcripts build in real-time during active sessions.
</Note>
