# Export session transcript Download a session's transcript as a file in TXT, SRT, or JSON format. Export the complete transcript for a Meeting Buddy session as a downloadable file. Supports plain text, SRT subtitle, and JSON formats. The response is returned as a file download with the appropriate `Content-Disposition` header. #### Path Parameters **`session_id`** string required The unique identifier of the session. Must start with `mbsess_` prefix. #### Query Parameters **`format`** string optional ยท Defaults to `"txt"` Export format. Valid values: - `txt` -- Plain text with speaker labels and timestamps - `srt` -- SubRip subtitle format for video players - `json` -- Structured JSON with all transcript metadata ## Returns Returns the transcript content as a file download. The `Content-Type` header varies by format: | Format | Content-Type | File Extension | | --- | --- | --- | | `txt` | `text/plain` | `.txt` | | `srt` | `text/plain` | `.srt` | | `json` | `application/json` | `.json` | The `Content-Disposition` header includes the filename (e.g., `transcript_mbsess_abc123.txt`). Request ```bash cURL # Export as plain text curl -s -X GET "https://api.aitronos.com/v1/meeting-buddy/sessions/mbsess_abc123def456/transcripts/export?format=txt" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -o transcript.txt # Export as SRT subtitles curl -s -X GET "https://api.aitronos.com/v1/meeting-buddy/sessions/mbsess_abc123def456/transcripts/export?format=srt" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -o transcript.srt # Export as JSON curl -s -X GET "https://api.aitronos.com/v1/meeting-buddy/sessions/mbsess_abc123def456/transcripts/export?format=json" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -o transcript.json ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") # Export as plain text content = client.meeting_buddy.export_transcript( session_id="mbsess_abc123def456", format="txt", ) # Save to file with open("transcript.txt", "w") as f: f.write(content) ``` ```python Python import os import requests access_token = os.environ["ACCESS_TOKEN"] session_id = "mbsess_abc123def456" url = f"https://api.aitronos.com/v1/meeting-buddy/sessions/{session_id}/transcripts/export" headers = {"Authorization": f"Bearer {access_token}"} params = {"format": "txt"} response = requests.get(url, headers=headers, params=params) # Save to file with open("transcript.txt", "wb") as f: f.write(response.content) print(f"Saved transcript ({len(response.content)} bytes)") ``` ```javascript JavaScript const accessToken = process.env.ACCESS_TOKEN; const sessionId = 'mbsess_abc123def456'; const response = await fetch( `https://api.aitronos.com/v1/meeting-buddy/sessions/${sessionId}/transcripts/export?format=txt`, { headers: { 'Authorization': `Bearer ${accessToken}`, }, } ); const content = await response.text(); console.log('Transcript length:', content.length, 'characters'); ``` Response ```text 200 OK - TXT format [00:00:00] John Doe: Hello everyone, welcome to the meeting. [00:00:03] John Doe: Thank you for joining us today. [00:00:07] Jane Smith: Let's start with the agenda. [00:00:12] Jane Smith: First item is the Q4 review. ``` ```text 200 OK - SRT format 1 00:00:00,000 --> 00:00:03,500 Hello everyone, welcome to the meeting. 2 00:00:03,500 --> 00:00:06,200 Thank you for joining us today. 3 00:00:07,000 --> 00:00:09,100 Let's start with the agenda. ``` ```json 200 OK - JSON format [ { "transcript_id": "mbtrans_xyz123", "text": "Hello everyone, welcome to the meeting.", "confidence": 0.95, "start_time": 0.0, "end_time": 3.5, "speaker": "John Doe", "language_code": "en" }, { "transcript_id": "mbtrans_xyz124", "text": "Thank you for joining us today.", "confidence": 0.92, "start_time": 3.5, "end_time": 6.2, "speaker": "John Doe", "language_code": "en" } ] ``` ```json 403 Forbidden { "success": false, "error": { "code": "SESSION_ACCESS_DENIED", "message": "You don't have access to this session", "type": "client_error", "status": 403, "details": { "session_id": "mbsess_abc123def456" }, "trace_id": "abc-123-def", "timestamp": "2025-12-11T10:00:00Z" } } ``` ```json 404 Not Found { "success": false, "error": { "code": "SESSION_NOT_FOUND", "message": "Session not found", "type": "client_error", "status": 404, "details": { "session_id": "mbsess_abc123def456" }, "trace_id": "abc-123-def", "timestamp": "2025-12-11T10:00:00Z" } } ``` ## Related Resources - [Get Transcripts](/docs/api-reference/meeting-buddy/get-transcripts) - [Get Session Details](/docs/api-reference/meeting-buddy/get-session) - [List Sessions](/docs/api-reference/meeting-buddy/list-sessions) - [Stream Transcripts](/docs/api-reference/meeting-buddy/transcript-stream) - [Stream Session Status](/docs/api-reference/meeting-buddy/session-status-stream) - [Stream Logs](/docs/api-reference/meeting-buddy/log-stream) - [Analytics Summary](/docs/api-reference/meeting-buddy/analytics-summary)