> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/api/api-reference/hui-yi-ji-lu.md).

# 會議記錄

會議記錄端點讓您的系統建立會議、匯入音檔轉錄、讀取逐字稿與摘要，並把逐字稿存入知識庫。匯入音檔前先用 `POST /api/v1/upload-presigned-url/`（`modelName` 為 `meeting-record`、`fieldName` 為 `audio`）上傳檔案，見 [附件與檔案](/api/api-reference/fu-jian-he-dang-an.md)。功能說明見使用者手冊[會議記錄](https://docs.maiagent.ai/work/meeting-records)。

### 列出會議記錄 <a href="#meeting-records-list" id="meeting-records-list"></a>

GET `/api/v1/meeting-records/`

#### 參數

| 參數名稱        | 必填 | 類型      | 說明                                                                                                                            |
| ----------- | -- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `endDate`   | ❌  |         |                                                                                                                               |
| `page`      | ❌  | integer | A page number within the paginated result set.                                                                                |
| `pageSize`  | ❌  | integer | Number of results to return per page.                                                                                         |
| `query`     | ❌  |         |                                                                                                                               |
| `startDate` | ❌  |         |                                                                                                                               |
| `status`    | ❌  | string  | \`pending\`: Pending ; \`recording\`: Recording ; \`processing\`: Processing ; \`completed\`: Completed ; \`failed\`: Failed; |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/meeting-records/?endDate=example&page=1&pageSize=1&query=example&startDate=example&status=completed" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/meeting-records/?endDate=example&page=1&pageSize=1&query=example&startDate=example&status=completed", config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/?endDate=example&page=1&pageSize=1&query=example&startDate=example&status=completed"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/meeting-records/?endDate=example&page=1&pageSize=1&query=example&startDate=example&status=completed", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
{
  "count": integer
  "next"?: string (uri) // 非必填
  "previous"?: string (uri) // 非必填
  "results": [
    {
      "id": string (uuid)
      "sttContext"?: string // 非必填
      "sttContextLlmId"?: string (uuid) // 非必填
      "liveTranscriptionResult": object
      "eventContext"?: object // 非必填
      "meetingRecordSttProvider": 
      {
        "id": string (uuid)
        "name": string // Display name for this STT provider
        "provider": string (enum: whisperlive, azure, deepgram, assemblyai, bronci, alibaba, localai, openai, rap) // * `whisperlive` - Whisperlive
* `azure` - Azure
* `deepgram` - Deepgram
* `assemblyai` - Assemblyai
* `bronci` - Bronci
* `alibaba` - Alibaba
* `localai` - Localai
* `openai` - Openai
* `rap` - Rap
        "modelName": string
      }
      "offlineTranscriptProviderDetail": 
      {
        "id": string (uuid)
        "name": string // Display name for this provider
        "provider": string (enum: whisper_openai, whisper_groq, whisper_offline, localai, azure, bronci, alibaba, rap, deepgram, assemblyai) // * `whisper_openai` - whisper_openai
* `whisper_groq` - whisper_groq
* `whisper_offline` - whisper_offline
* `localai` - localai
* `azure` - azure
* `bronci` - bronci
* `alibaba` - alibaba
* `rap` - rap
* `deepgram` - deepgram
* `assemblyai` - assemblyai
        "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
      }
      "meetingRecordSttProviderId"?: string (uuid) // 非必填
      "speakerDiarizationProvider": 
      {
        "id": string (uuid)
        "name": string // Display name for this provider
        "provider": string (enum: pyannoteai) // * `pyannoteai` - pyannoteai
        "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
      }
      "enableTranslation"?: boolean // 非必填
      "targetLanguages"?: [ // Target language codes for live transcript translation. (非必填)
        string
      ]
      "translationLlmId"?: string (uuid) // 非必填
      "knowledgeBaseId"?: string (uuid) // 非必填
      "audioUrl": string
      "transcriptUrl": string
      "mp3Url": string
      "backupAudioUrl": string
      "backupSyncStatus": string
      "backupUnavailableReason": string
      "backupError": object
      "backupDurationSeconds": number (double)
      "backupTotalParts": integer
      "backupTotalChunks": integer
      "backupRecordingStartedAt": string (timestamp)
      "backupLastActivityAt": string (timestamp)
      "backupFinalizedAt": string (timestamp)
      "knowledgeBase": object
      "transcriptFile": object
      "qaConfig": object // Generate qa_config for frontend to use with chatbot completion API.
      "availableChatbots": [ // Get chatbots that have this meeting's knowledge base (detail view only).
        object
      ]
      "createdBy": 
      {
        "id": string (uuid)
        "name": string
      }
      "members": [ // The meeting's access roster, visible to anyone who can see the meeting.

Editing (add/remove) is gated separately on the members endpoint; here the
list is read-only context so members can see who participated and who else
was granted view access.
        object
      ]
      "myRole": string // The requesting user's role on this meeting, or None if not a member.
      "createdAt": string (timestamp)
      "updatedAt": string (timestamp)
      "meetingName": string
      "participants"?: object // List of meeting participants (非必填)
      "durationSeconds"?: number (double) // 非必填
      "status"?: string (enum: pending, recording, processing, completed, failed) // * `pending` - Pending
* `recording` - Recording
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed (非必填)
      "stopRequestedAt": string (timestamp) // When a user explicitly requested to stop the recording. A finished recording without this set ended on the server side (e.g. the client connection was lost).
      "recordingLimitReachedAt": string (timestamp) // When LiveKit ended the egress at its maximum recording duration. The main audio file ends here; the STT agent and the browser backup keep going until the room closes, and the meeting completes on room end.
      "failureReason": // 可能有不同的類型
      string (enum: egress_not_started, egress_failed, finalize_timeout) // Why the live recording ended as failed. Empty for meetings that did not fail.

* `` - None
* `egress_not_started` - Recording did not start
* `egress_failed` - Recording failed
* `finalize_timeout` - Recording was never finalized
      "clientSurface":  // Durable client entry point captured when recording starts. Legacy records remain unknown.

* `unknown` - Unknown
* `web` - Web
* `desktop` - Desktop
      {
      }
      "requestedSourceMode":  // Audio source mode requested by the client when recording starts.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
      {
      }
      "effectiveSourceMode":  // Server-resolved audio source mode used for runtime and billing reconciliation.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
      {
      }
      "sourceLanguages"?: object // Source languages for transcription (非必填)
      "speakerDiarizationConfig": object // Per-meeting non-secret speaker diarization hints, such as numSpeakers.
      "offlineAsrRequestOptions": object // Per-request ASR payload for the offline audio import, keyed by the selected provider row request_option_specs contract. EMPTY MEANS: no extra parameters.
      "audioProcessingSnapshot": object // Immutable audio processing policy snapshot frozen from the platform active profile at meeting start (via MeetingAudioProcessingProfile.to_snapshot). Downlinked to the LiveKit Agent with this meeting client/source facts and used to correlate per-track usage.
      "translationInputTokens"?: integer (int64) // Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. (非必填)
      "translationOutputTokens"?: integer (int64) // Cumulative LLM output tokens consumed by realtime translation. (非必填)
      "deletedAt"?: string (timestamp) // 非必填
      "translationLlm"?: string (uuid) // LLM model to use for translation when enabled (非必填)
    }
  ]
}
```

**回應範例值**

```json
{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "meeting_name": "產品規劃會議",
      "participants": [
        "張三",
        "李四",
        "王五"
      ],
      "duration_seconds": 3600.5,
      "status": "completed",
      "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
      "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
      "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
      "source_languages": [
        "zh-TW"
      ],
      "enable_translation": true,
      "target_languages": [
        "en-US",
        "ja-JP"
      ],
      "meeting_record_stt_provider": {
        "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
        "provider": "deepgram",
        "model_name": "nova-2",
        "supported_languages": [
          "zh-TW",
          "en-US",
          "ja-JP"
        ],
        "config": {
          "punctuate": true,
          "diarize": true
        },
        "created_at": "2025-01-15T10:00:00Z",
        "updated_at": "2025-01-15T10:00:00Z"
      },
      "created_at": "2025-01-15T14:00:00Z",
      "updated_at": "2025-01-15T15:00:00Z"
    }
  ]
}
```

***

### 建立會議記錄 <a href="#meeting-records-create" id="meeting-records-create"></a>

POST `/api/v1/meeting-records/`

#### 請求內容

**請求參數**

| 欄位                         | 類型                                                               | 必填 | 說明                                                                                                                                       |
| -------------------------- | ---------------------------------------------------------------- | -- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| sttContext                 | string                                                           | 否  |                                                                                                                                          |
| sttContextLlmId            | string (uuid)                                                    | 否  |                                                                                                                                          |
| eventContext               | object                                                           | 否  |                                                                                                                                          |
| meetingRecordSttProviderId | string (uuid)                                                    | 否  |                                                                                                                                          |
| enableTranslation          | boolean                                                          | 否  |                                                                                                                                          |
| targetLanguages            | array\[string]                                                   | 否  | Target language codes for live transcript translation.                                                                                   |
| translationLlmId           | string (uuid)                                                    | 否  |                                                                                                                                          |
| knowledgeBaseId            | string (uuid)                                                    | 否  |                                                                                                                                          |
| meetingName                | string                                                           | 是  |                                                                                                                                          |
| participants               | object                                                           | 否  | List of meeting participants                                                                                                             |
| durationSeconds            | number (double)                                                  | 否  |                                                                                                                                          |
| status                     | string (enum: pending, recording, processing, completed, failed) | 否  | `pending`: Pending ; `recording`: Recording ; `processing`: Processing ; `completed`: Completed ; `failed`: Failed;                      |
| sourceLanguages            | object                                                           | 否  | Source languages for transcription                                                                                                       |
| translationInputTokens     | integer (int64)                                                  | 否  | Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. |
| translationOutputTokens    | integer (int64)                                                  | 否  | Cumulative LLM output tokens consumed by realtime translation.                                                                           |
| deletedAt                  | string (timestamp)                                               | 否  |                                                                                                                                          |
| translationLlm             | string (uuid)                                                    | 否  | LLM model to use for translation when enabled                                                                                            |

**請求結構範例**

```typescript
{
  "sttContext"?: string // 非必填
  "sttContextLlmId"?: string (uuid) // 非必填
  "eventContext"?: object // 非必填
  "meetingRecordSttProviderId"?: string (uuid) // 非必填
  "enableTranslation"?: boolean // 非必填
  "targetLanguages"?: [ // Target language codes for live transcript translation. (非必填)
    string
  ]
  "translationLlmId"?: string (uuid) // 非必填
  "knowledgeBaseId"?: string (uuid) // 非必填
  "meetingName": string
  "participants"?: object // List of meeting participants (非必填)
  "durationSeconds"?: number (double) // 非必填
  "status"?: string (enum: pending, recording, processing, completed, failed) // * `pending` - Pending
* `recording` - Recording
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed (非必填)
  "sourceLanguages"?: object // Source languages for transcription (非必填)
  "translationInputTokens"?: integer (int64) // Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. (非必填)
  "translationOutputTokens"?: integer (int64) // Cumulative LLM output tokens consumed by realtime translation. (非必填)
  "deletedAt"?: string (timestamp) // 非必填
  "translationLlm"?: string (uuid) // LLM model to use for translation when enabled (非必填)
}
```

**請求範例值**

```json
{
  "meeting_name": "產品規劃會議",
  "participants": [
    "張三",
    "李四",
    "王五"
  ],
  "source_languages": [
    "zh-TW"
  ],
  "enable_translation": true,
  "target_languages": [
    "en-US",
    "ja-JP"
  ]
}
```

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/v1/meeting-records/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "meeting_name": "產品規劃會議",
    "participants": [
      "張三",
      "李四",
      "王五"
    ],
    "source_languages": [
      "zh-TW"
    ],
    "enable_translation": true,
    "target_languages": [
      "en-US",
      "ja-JP"
    ]
  }'

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// 請求內容 (payload)
const data = {
    "meeting_name": "產品規劃會議",
    "participants": [
      "張三",
      "李四",
      "王五"
    ],
    "source_languages": [
      "zh-TW"
    ],
    "enable_translation": true,
    "target_languages": [
      "en-US",
      "ja-JP"
    ]
  };

axios.post("https://api.maiagent.ai/api/v1/meeting-records/", data, config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# 請求內容 (payload)
data = {
    "meeting_name": "產品規劃會議",
    "participants": [
        "張三",
        "李四",
        "王五"
    ],
    "source_languages": [
        "zh-TW"
    ],
    "enable_translation": True,
    "target_languages": [
        "en-US",
        "ja-JP"
    ]
}

response = requests.post(url, json=data, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/v1/meeting-records/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => [
            'meeting_name' => '產品規劃會議',
            'participants' => [
                '張三',
                '李四',
                '王五'
            ],
            'source_languages' => [
                'zh-TW'
            ],
            'enable_translation' => true,
            'target_languages' => [
                'en-US',
                'ja-JP'
            ]
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 201**

**回應結構範例**

```typescript
{
  "id": string (uuid)
  "sttContext"?: string // 非必填
  "sttContextLlmId"?: string (uuid) // 非必填
  "liveTranscriptionResult": object
  "eventContext"?: object // 非必填
  "meetingRecordSttProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this STT provider
    "provider": string (enum: whisperlive, azure, deepgram, assemblyai, bronci, alibaba, localai, openai, rap) // * `whisperlive` - Whisperlive
* `azure` - Azure
* `deepgram` - Deepgram
* `assemblyai` - Assemblyai
* `bronci` - Bronci
* `alibaba` - Alibaba
* `localai` - Localai
* `openai` - Openai
* `rap` - Rap
    "modelName": string
  }
  "offlineTranscriptProviderDetail": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: whisper_openai, whisper_groq, whisper_offline, localai, azure, bronci, alibaba, rap, deepgram, assemblyai) // * `whisper_openai` - whisper_openai
* `whisper_groq` - whisper_groq
* `whisper_offline` - whisper_offline
* `localai` - localai
* `azure` - azure
* `bronci` - bronci
* `alibaba` - alibaba
* `rap` - rap
* `deepgram` - deepgram
* `assemblyai` - assemblyai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "meetingRecordSttProviderId"?: string (uuid) // 非必填
  "speakerDiarizationProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: pyannoteai) // * `pyannoteai` - pyannoteai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "enableTranslation"?: boolean // 非必填
  "targetLanguages"?: [ // Target language codes for live transcript translation. (非必填)
    string
  ]
  "translationLlmId"?: string (uuid) // 非必填
  "knowledgeBaseId"?: string (uuid) // 非必填
  "audioUrl": string
  "transcriptUrl": string
  "mp3Url": string
  "backupAudioUrl": string
  "backupSyncStatus": string
  "backupUnavailableReason": string
  "backupError": object
  "backupDurationSeconds": number (double)
  "backupTotalParts": integer
  "backupTotalChunks": integer
  "backupRecordingStartedAt": string (timestamp)
  "backupLastActivityAt": string (timestamp)
  "backupFinalizedAt": string (timestamp)
  "knowledgeBase": object
  "transcriptFile": object
  "qaConfig": object // Generate qa_config for frontend to use with chatbot completion API.
  "availableChatbots": [ // Get chatbots that have this meeting's knowledge base (detail view only).
    object
  ]
  "createdBy": 
  {
    "id": string (uuid)
    "name": string
  }
  "members": [ // The meeting's access roster, visible to anyone who can see the meeting.

Editing (add/remove) is gated separately on the members endpoint; here the
list is read-only context so members can see who participated and who else
was granted view access.
    object
  ]
  "myRole": string // The requesting user's role on this meeting, or None if not a member.
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
  "meetingName": string
  "participants"?: object // List of meeting participants (非必填)
  "durationSeconds"?: number (double) // 非必填
  "status"?: string (enum: pending, recording, processing, completed, failed) // * `pending` - Pending
* `recording` - Recording
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed (非必填)
  "stopRequestedAt": string (timestamp) // When a user explicitly requested to stop the recording. A finished recording without this set ended on the server side (e.g. the client connection was lost).
  "recordingLimitReachedAt": string (timestamp) // When LiveKit ended the egress at its maximum recording duration. The main audio file ends here; the STT agent and the browser backup keep going until the room closes, and the meeting completes on room end.
  "failureReason": // 可能有不同的類型
  string (enum: egress_not_started, egress_failed, finalize_timeout) // Why the live recording ended as failed. Empty for meetings that did not fail.

* `` - None
* `egress_not_started` - Recording did not start
* `egress_failed` - Recording failed
* `finalize_timeout` - Recording was never finalized
  "clientSurface":  // Durable client entry point captured when recording starts. Legacy records remain unknown.

* `unknown` - Unknown
* `web` - Web
* `desktop` - Desktop
  {
  }
  "requestedSourceMode":  // Audio source mode requested by the client when recording starts.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "effectiveSourceMode":  // Server-resolved audio source mode used for runtime and billing reconciliation.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "sourceLanguages"?: object // Source languages for transcription (非必填)
  "speakerDiarizationConfig": object // Per-meeting non-secret speaker diarization hints, such as numSpeakers.
  "offlineAsrRequestOptions": object // Per-request ASR payload for the offline audio import, keyed by the selected provider row request_option_specs contract. EMPTY MEANS: no extra parameters.
  "audioProcessingSnapshot": object // Immutable audio processing policy snapshot frozen from the platform active profile at meeting start (via MeetingAudioProcessingProfile.to_snapshot). Downlinked to the LiveKit Agent with this meeting client/source facts and used to correlate per-track usage.
  "translationInputTokens"?: integer (int64) // Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. (非必填)
  "translationOutputTokens"?: integer (int64) // Cumulative LLM output tokens consumed by realtime translation. (非必填)
  "deletedAt"?: string (timestamp) // 非必填
  "translationLlm"?: string (uuid) // LLM model to use for translation when enabled (非必填)
}
```

**回應範例值**

```json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "meeting_name": "產品規劃會議",
  "participants": [
    "張三",
    "李四",
    "王五"
  ],
  "duration_seconds": 3600.5,
  "status": "completed",
  "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
  "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
  "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
  "source_languages": [
    "zh-TW"
  ],
  "enable_translation": true,
  "target_languages": [
    "en-US",
    "ja-JP"
  ],
  "meeting_record_stt_provider": {
    "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
    "provider": "deepgram",
    "model_name": "nova-2",
    "supported_languages": [
      "zh-TW",
      "en-US",
      "ja-JP"
    ],
    "config": {
      "punctuate": true,
      "diarize": true
    },
    "created_at": "2025-01-15T10:00:00Z",
    "updated_at": "2025-01-15T10:00:00Z"
  },
  "created_at": "2025-01-15T14:00:00Z",
  "updated_at": "2025-01-15T15:00:00Z"
}
```

***

### 取得特定會議記錄 <a href="#meeting-records-retrieve" id="meeting-records-retrieve"></a>

GET `/api/v1/meeting-records/{id}/`

#### 參數

| 參數名稱 | 必填 | 類型     | 說明                                             |
| ---- | -- | ------ | ---------------------------------------------- |
| `id` | ✅  | string | A UUID string identifying this Meeting Record. |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
{
  "id": string (uuid)
  "sttContext"?: string // 非必填
  "sttContextLlmId"?: string (uuid) // 非必填
  "liveTranscriptionResult": object
  "eventContext"?: object // 非必填
  "meetingRecordSttProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this STT provider
    "provider": string (enum: whisperlive, azure, deepgram, assemblyai, bronci, alibaba, localai, openai, rap) // * `whisperlive` - Whisperlive
* `azure` - Azure
* `deepgram` - Deepgram
* `assemblyai` - Assemblyai
* `bronci` - Bronci
* `alibaba` - Alibaba
* `localai` - Localai
* `openai` - Openai
* `rap` - Rap
    "modelName": string
  }
  "offlineTranscriptProviderDetail": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: whisper_openai, whisper_groq, whisper_offline, localai, azure, bronci, alibaba, rap, deepgram, assemblyai) // * `whisper_openai` - whisper_openai
* `whisper_groq` - whisper_groq
* `whisper_offline` - whisper_offline
* `localai` - localai
* `azure` - azure
* `bronci` - bronci
* `alibaba` - alibaba
* `rap` - rap
* `deepgram` - deepgram
* `assemblyai` - assemblyai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "meetingRecordSttProviderId"?: string (uuid) // 非必填
  "speakerDiarizationProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: pyannoteai) // * `pyannoteai` - pyannoteai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "enableTranslation"?: boolean // 非必填
  "targetLanguages"?: [ // Target language codes for live transcript translation. (非必填)
    string
  ]
  "translationLlmId"?: string (uuid) // 非必填
  "knowledgeBaseId"?: string (uuid) // 非必填
  "audioUrl": string
  "transcriptUrl": string
  "mp3Url": string
  "backupAudioUrl": string
  "backupSyncStatus": string
  "backupUnavailableReason": string
  "backupError": object
  "backupDurationSeconds": number (double)
  "backupTotalParts": integer
  "backupTotalChunks": integer
  "backupRecordingStartedAt": string (timestamp)
  "backupLastActivityAt": string (timestamp)
  "backupFinalizedAt": string (timestamp)
  "knowledgeBase": object
  "transcriptFile": object
  "qaConfig": object // Generate qa_config for frontend to use with chatbot completion API.
  "availableChatbots": [ // Get chatbots that have this meeting's knowledge base (detail view only).
    object
  ]
  "createdBy": 
  {
    "id": string (uuid)
    "name": string
  }
  "members": [ // The meeting's access roster, visible to anyone who can see the meeting.

Editing (add/remove) is gated separately on the members endpoint; here the
list is read-only context so members can see who participated and who else
was granted view access.
    object
  ]
  "myRole": string // The requesting user's role on this meeting, or None if not a member.
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
  "meetingName": string
  "participants"?: object // List of meeting participants (非必填)
  "durationSeconds"?: number (double) // 非必填
  "status"?: string (enum: pending, recording, processing, completed, failed) // * `pending` - Pending
* `recording` - Recording
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed (非必填)
  "stopRequestedAt": string (timestamp) // When a user explicitly requested to stop the recording. A finished recording without this set ended on the server side (e.g. the client connection was lost).
  "recordingLimitReachedAt": string (timestamp) // When LiveKit ended the egress at its maximum recording duration. The main audio file ends here; the STT agent and the browser backup keep going until the room closes, and the meeting completes on room end.
  "failureReason": // 可能有不同的類型
  string (enum: egress_not_started, egress_failed, finalize_timeout) // Why the live recording ended as failed. Empty for meetings that did not fail.

* `` - None
* `egress_not_started` - Recording did not start
* `egress_failed` - Recording failed
* `finalize_timeout` - Recording was never finalized
  "clientSurface":  // Durable client entry point captured when recording starts. Legacy records remain unknown.

* `unknown` - Unknown
* `web` - Web
* `desktop` - Desktop
  {
  }
  "requestedSourceMode":  // Audio source mode requested by the client when recording starts.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "effectiveSourceMode":  // Server-resolved audio source mode used for runtime and billing reconciliation.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "sourceLanguages"?: object // Source languages for transcription (非必填)
  "speakerDiarizationConfig": object // Per-meeting non-secret speaker diarization hints, such as numSpeakers.
  "offlineAsrRequestOptions": object // Per-request ASR payload for the offline audio import, keyed by the selected provider row request_option_specs contract. EMPTY MEANS: no extra parameters.
  "audioProcessingSnapshot": object // Immutable audio processing policy snapshot frozen from the platform active profile at meeting start (via MeetingAudioProcessingProfile.to_snapshot). Downlinked to the LiveKit Agent with this meeting client/source facts and used to correlate per-track usage.
  "translationInputTokens"?: integer (int64) // Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. (非必填)
  "translationOutputTokens"?: integer (int64) // Cumulative LLM output tokens consumed by realtime translation. (非必填)
  "deletedAt"?: string (timestamp) // 非必填
  "translationLlm"?: string (uuid) // LLM model to use for translation when enabled (非必填)
}
```

**回應範例值**

```json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "meeting_name": "產品規劃會議",
  "participants": [
    "張三",
    "李四",
    "王五"
  ],
  "duration_seconds": 3600.5,
  "status": "completed",
  "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
  "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
  "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
  "source_languages": [
    "zh-TW"
  ],
  "enable_translation": true,
  "target_languages": [
    "en-US",
    "ja-JP"
  ],
  "meeting_record_stt_provider": {
    "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
    "provider": "deepgram",
    "model_name": "nova-2",
    "supported_languages": [
      "zh-TW",
      "en-US",
      "ja-JP"
    ],
    "config": {
      "punctuate": true,
      "diarize": true
    },
    "created_at": "2025-01-15T10:00:00Z",
    "updated_at": "2025-01-15T10:00:00Z"
  },
  "created_at": "2025-01-15T14:00:00Z",
  "updated_at": "2025-01-15T15:00:00Z"
}
```

***

### 部分更新會議記錄 <a href="#meeting-records-partial-update" id="meeting-records-partial-update"></a>

PATCH `/api/v1/meeting-records/{id}/`

#### 參數

| 參數名稱 | 必填 | 類型     | 說明                                             |
| ---- | -- | ------ | ---------------------------------------------- |
| `id` | ✅  | string | A UUID string identifying this Meeting Record. |

#### 請求內容

**請求參數**

| 欄位                         | 類型                                                               | 必填 | 說明                                                                                                                                       |
| -------------------------- | ---------------------------------------------------------------- | -- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| sttContext                 | string                                                           | 否  |                                                                                                                                          |
| sttContextLlmId            | string (uuid)                                                    | 否  |                                                                                                                                          |
| eventContext               | object                                                           | 否  |                                                                                                                                          |
| meetingRecordSttProviderId | string (uuid)                                                    | 否  |                                                                                                                                          |
| enableTranslation          | boolean                                                          | 否  |                                                                                                                                          |
| targetLanguages            | array\[string]                                                   | 否  | Target language codes for live transcript translation.                                                                                   |
| translationLlmId           | string (uuid)                                                    | 否  |                                                                                                                                          |
| knowledgeBaseId            | string (uuid)                                                    | 否  |                                                                                                                                          |
| meetingName                | string                                                           | 否  |                                                                                                                                          |
| participants               | object                                                           | 否  | List of meeting participants                                                                                                             |
| durationSeconds            | number (double)                                                  | 否  |                                                                                                                                          |
| status                     | string (enum: pending, recording, processing, completed, failed) | 否  | `pending`: Pending ; `recording`: Recording ; `processing`: Processing ; `completed`: Completed ; `failed`: Failed;                      |
| sourceLanguages            | object                                                           | 否  | Source languages for transcription                                                                                                       |
| translationInputTokens     | integer (int64)                                                  | 否  | Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. |
| translationOutputTokens    | integer (int64)                                                  | 否  | Cumulative LLM output tokens consumed by realtime translation.                                                                           |
| deletedAt                  | string (timestamp)                                               | 否  |                                                                                                                                          |
| translationLlm             | string (uuid)                                                    | 否  | LLM model to use for translation when enabled                                                                                            |

**請求結構範例**

```typescript
{
  "sttContext"?: string // 非必填
  "sttContextLlmId"?: string (uuid) // 非必填
  "eventContext"?: object // 非必填
  "meetingRecordSttProviderId"?: string (uuid) // 非必填
  "enableTranslation"?: boolean // 非必填
  "targetLanguages"?: [ // Target language codes for live transcript translation. (非必填)
    string
  ]
  "translationLlmId"?: string (uuid) // 非必填
  "knowledgeBaseId"?: string (uuid) // 非必填
  "meetingName"?: string // 非必填
  "participants"?: object // List of meeting participants (非必填)
  "durationSeconds"?: number (double) // 非必填
  "status"?: string (enum: pending, recording, processing, completed, failed) // * `pending` - Pending
* `recording` - Recording
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed (非必填)
  "sourceLanguages"?: object // Source languages for transcription (非必填)
  "translationInputTokens"?: integer (int64) // Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. (非必填)
  "translationOutputTokens"?: integer (int64) // Cumulative LLM output tokens consumed by realtime translation. (非必填)
  "deletedAt"?: string (timestamp) // 非必填
  "translationLlm"?: string (uuid) // LLM model to use for translation when enabled (非必填)
}
```

**請求範例值**

```json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "meeting_name": "產品規劃會議",
  "participants": [
    "張三",
    "李四",
    "王五"
  ],
  "duration_seconds": 3600.5,
  "status": "completed",
  "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
  "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
  "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
  "source_languages": [
    "zh-TW"
  ],
  "enable_translation": true,
  "target_languages": [
    "en-US",
    "ja-JP"
  ],
  "meeting_record_stt_provider": {
    "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
    "provider": "deepgram",
    "model_name": "nova-2",
    "supported_languages": [
      "zh-TW",
      "en-US",
      "ja-JP"
    ],
    "config": {
      "punctuate": true,
      "diarize": true
    },
    "created_at": "2025-01-15T10:00:00Z",
    "updated_at": "2025-01-15T10:00:00Z"
  },
  "created_at": "2025-01-15T14:00:00Z",
  "updated_at": "2025-01-15T15:00:00Z"
}
```

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X PATCH "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "meeting_name": "產品規劃會議",
    "participants": [
      "張三",
      "李四",
      "王五"
    ],
    "duration_seconds": 3600.5,
    "status": "completed",
    "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
    "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
    "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
    "source_languages": [
      "zh-TW"
    ],
    "enable_translation": true,
    "target_languages": [
      "en-US",
      "ja-JP"
    ],
    "meeting_record_stt_provider": {
      "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
      "provider": "deepgram",
      "model_name": "nova-2",
      "supported_languages": [
        "zh-TW",
        "en-US",
        "ja-JP"
      ],
      "config": {
        "punctuate": true,
        "diarize": true
      },
      "created_at": "2025-01-15T10:00:00Z",
      "updated_at": "2025-01-15T10:00:00Z"
    },
    "created_at": "2025-01-15T14:00:00Z",
    "updated_at": "2025-01-15T15:00:00Z"
  }'

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// 請求內容 (payload)
const data = {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "meeting_name": "產品規劃會議",
    "participants": [
      "張三",
      "李四",
      "王五"
    ],
    "duration_seconds": 3600.5,
    "status": "completed",
    "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
    "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
    "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
    "source_languages": [
      "zh-TW"
    ],
    "enable_translation": true,
    "target_languages": [
      "en-US",
      "ja-JP"
    ],
    "meeting_record_stt_provider": {
      "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
      "provider": "deepgram",
      "model_name": "nova-2",
      "supported_languages": [
        "zh-TW",
        "en-US",
        "ja-JP"
      ],
      "config": {
        "punctuate": true,
        "diarize": true
      },
      "created_at": "2025-01-15T10:00:00Z",
      "updated_at": "2025-01-15T10:00:00Z"
    },
    "created_at": "2025-01-15T14:00:00Z",
    "updated_at": "2025-01-15T15:00:00Z"
  };

axios.patch("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# 請求內容 (payload)
data = {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "meeting_name": "產品規劃會議",
    "participants": [
        "張三",
        "李四",
        "王五"
    ],
    "duration_seconds": 3600.5,
    "status": "completed",
    "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
    "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
    "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
    "source_languages": [
        "zh-TW"
    ],
    "enable_translation": True,
    "target_languages": [
        "en-US",
        "ja-JP"
    ],
    "meeting_record_stt_provider": {
        "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
        "provider": "deepgram",
        "model_name": "nova-2",
        "supported_languages": [
            "zh-TW",
            "en-US",
            "ja-JP"
        ],
        "config": {
            "punctuate": True,
            "diarize": True
        },
        "created_at": "2025-01-15T10:00:00Z",
        "updated_at": "2025-01-15T10:00:00Z"
    },
    "created_at": "2025-01-15T14:00:00Z",
    "updated_at": "2025-01-15T15:00:00Z"
}

response = requests.patch(url, json=data, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->patch("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => [
            'id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
            'meeting_name' => '產品規劃會議',
            'participants' => [
                '張三',
                '李四',
                '王五'
            ],
            'duration_seconds' => 3600.5,
            'status' => 'completed',
            'audio_url' => 'https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg',
            'transcript_url' => 'https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json',
            'mp3_url' => 'https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3',
            'source_languages' => [
                'zh-TW'
            ],
            'enable_translation' => true,
            'target_languages' => [
                'en-US',
                'ja-JP'
            ],
            'meeting_record_stt_provider' => [
                'id' => 'c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f',
                'provider' => 'deepgram',
                'model_name' => 'nova-2',
                'supported_languages' => [
                    'zh-TW',
                    'en-US',
                    'ja-JP'
                ],
                'config' => [
                    'punctuate' => true,
                    'diarize' => true
                ],
                'created_at' => '2025-01-15T10:00:00Z',
                'updated_at' => '2025-01-15T10:00:00Z'
            ],
            'created_at' => '2025-01-15T14:00:00Z',
            'updated_at' => '2025-01-15T15:00:00Z'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
{
  "id": string (uuid)
  "sttContext"?: string // 非必填
  "sttContextLlmId"?: string (uuid) // 非必填
  "liveTranscriptionResult": object
  "eventContext"?: object // 非必填
  "meetingRecordSttProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this STT provider
    "provider": string (enum: whisperlive, azure, deepgram, assemblyai, bronci, alibaba, localai, openai, rap) // * `whisperlive` - Whisperlive
* `azure` - Azure
* `deepgram` - Deepgram
* `assemblyai` - Assemblyai
* `bronci` - Bronci
* `alibaba` - Alibaba
* `localai` - Localai
* `openai` - Openai
* `rap` - Rap
    "modelName": string
  }
  "offlineTranscriptProviderDetail": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: whisper_openai, whisper_groq, whisper_offline, localai, azure, bronci, alibaba, rap, deepgram, assemblyai) // * `whisper_openai` - whisper_openai
* `whisper_groq` - whisper_groq
* `whisper_offline` - whisper_offline
* `localai` - localai
* `azure` - azure
* `bronci` - bronci
* `alibaba` - alibaba
* `rap` - rap
* `deepgram` - deepgram
* `assemblyai` - assemblyai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "meetingRecordSttProviderId"?: string (uuid) // 非必填
  "speakerDiarizationProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: pyannoteai) // * `pyannoteai` - pyannoteai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "enableTranslation"?: boolean // 非必填
  "targetLanguages"?: [ // Target language codes for live transcript translation. (非必填)
    string
  ]
  "translationLlmId"?: string (uuid) // 非必填
  "knowledgeBaseId"?: string (uuid) // 非必填
  "audioUrl": string
  "transcriptUrl": string
  "mp3Url": string
  "backupAudioUrl": string
  "backupSyncStatus": string
  "backupUnavailableReason": string
  "backupError": object
  "backupDurationSeconds": number (double)
  "backupTotalParts": integer
  "backupTotalChunks": integer
  "backupRecordingStartedAt": string (timestamp)
  "backupLastActivityAt": string (timestamp)
  "backupFinalizedAt": string (timestamp)
  "knowledgeBase": object
  "transcriptFile": object
  "qaConfig": object // Generate qa_config for frontend to use with chatbot completion API.
  "availableChatbots": [ // Get chatbots that have this meeting's knowledge base (detail view only).
    object
  ]
  "createdBy": 
  {
    "id": string (uuid)
    "name": string
  }
  "members": [ // The meeting's access roster, visible to anyone who can see the meeting.

Editing (add/remove) is gated separately on the members endpoint; here the
list is read-only context so members can see who participated and who else
was granted view access.
    object
  ]
  "myRole": string // The requesting user's role on this meeting, or None if not a member.
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
  "meetingName": string
  "participants"?: object // List of meeting participants (非必填)
  "durationSeconds"?: number (double) // 非必填
  "status"?: string (enum: pending, recording, processing, completed, failed) // * `pending` - Pending
* `recording` - Recording
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed (非必填)
  "stopRequestedAt": string (timestamp) // When a user explicitly requested to stop the recording. A finished recording without this set ended on the server side (e.g. the client connection was lost).
  "recordingLimitReachedAt": string (timestamp) // When LiveKit ended the egress at its maximum recording duration. The main audio file ends here; the STT agent and the browser backup keep going until the room closes, and the meeting completes on room end.
  "failureReason": // 可能有不同的類型
  string (enum: egress_not_started, egress_failed, finalize_timeout) // Why the live recording ended as failed. Empty for meetings that did not fail.

* `` - None
* `egress_not_started` - Recording did not start
* `egress_failed` - Recording failed
* `finalize_timeout` - Recording was never finalized
  "clientSurface":  // Durable client entry point captured when recording starts. Legacy records remain unknown.

* `unknown` - Unknown
* `web` - Web
* `desktop` - Desktop
  {
  }
  "requestedSourceMode":  // Audio source mode requested by the client when recording starts.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "effectiveSourceMode":  // Server-resolved audio source mode used for runtime and billing reconciliation.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "sourceLanguages"?: object // Source languages for transcription (非必填)
  "speakerDiarizationConfig": object // Per-meeting non-secret speaker diarization hints, such as numSpeakers.
  "offlineAsrRequestOptions": object // Per-request ASR payload for the offline audio import, keyed by the selected provider row request_option_specs contract. EMPTY MEANS: no extra parameters.
  "audioProcessingSnapshot": object // Immutable audio processing policy snapshot frozen from the platform active profile at meeting start (via MeetingAudioProcessingProfile.to_snapshot). Downlinked to the LiveKit Agent with this meeting client/source facts and used to correlate per-track usage.
  "translationInputTokens"?: integer (int64) // Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. (非必填)
  "translationOutputTokens"?: integer (int64) // Cumulative LLM output tokens consumed by realtime translation. (非必填)
  "deletedAt"?: string (timestamp) // 非必填
  "translationLlm"?: string (uuid) // LLM model to use for translation when enabled (非必填)
}
```

**回應範例值**

```json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "meeting_name": "產品規劃會議",
  "participants": [
    "張三",
    "李四",
    "王五"
  ],
  "duration_seconds": 3600.5,
  "status": "completed",
  "audio_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890.ogg",
  "transcript_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4_transcript.json",
  "mp3_url": "https://cdn.example.com/media/meeting-record/a1b2c3d4-e5f6-7890-abcd-ef1234567890_mp3.mp3",
  "source_languages": [
    "zh-TW"
  ],
  "enable_translation": true,
  "target_languages": [
    "en-US",
    "ja-JP"
  ],
  "meeting_record_stt_provider": {
    "id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
    "provider": "deepgram",
    "model_name": "nova-2",
    "supported_languages": [
      "zh-TW",
      "en-US",
      "ja-JP"
    ],
    "config": {
      "punctuate": true,
      "diarize": true
    },
    "created_at": "2025-01-15T10:00:00Z",
    "updated_at": "2025-01-15T10:00:00Z"
  },
  "created_at": "2025-01-15T14:00:00Z",
  "updated_at": "2025-01-15T15:00:00Z"
}
```

***

### 刪除會議記錄 <a href="#meeting-records-destroy" id="meeting-records-destroy"></a>

DELETE `/api/v1/meeting-records/{id}/`

#### 參數

| 參數名稱 | 必填 | 類型     | 說明                                             |
| ---- | -- | ------ | ---------------------------------------------- |
| `id` | ✅  | string | A UUID string identifying this Meeting Record. |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

// 請求內容 (payload)
const data = null;

axios.delete("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.delete(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->delete("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

| 狀態碼 | 說明               |
| --- | ---------------- |
| 204 | No response body |

***

### 匯入音檔並開始轉錄 <a href="#meeting-records-import-audio-create" id="meeting-records-import-audio-create"></a>

POST `/api/v1/meeting-records/import-audio/`

{% hint style="info" %}
以非同步方式轉錄已上傳的音檔；轉錄進度從會議記錄的狀態欄位查詢。
{% endhint %}

#### 請求內容

**請求參數**

| 欄位                          | 類型            | 必填 | 說明                                                                                                                                                                                                            |
| --------------------------- | ------------- | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sttContext                  | string        | 否  |                                                                                                                                                                                                               |
| sttContextLlmId             | string (uuid) | 否  |                                                                                                                                                                                                               |
| offlineTranscriptProviderId | string (uuid) | 是  |                                                                                                                                                                                                               |
| asrOptions                  | object        | 否  | Nested ASR selection shared by every ASR entry point: languages (at least one), provider payload keys governed by the provider row request\_option\_specs contract, and the diarization selection (source ... |
| meetingName                 | string        | 是  |                                                                                                                                                                                                               |
| audioFilePath               | string        | 是  |                                                                                                                                                                                                               |
| clientSurface               | object        | 否  | Client uploading the audio. Omitting it stays unknown instead of claiming web. `unknown`: Unknown ; `web`: Web ; `desktop`: Desktop;                                                                          |

**請求結構範例**

```typescript
{
  "sttContext"?: string // 非必填
  "sttContextLlmId"?: string (uuid) // 非必填
  "offlineTranscriptProviderId": string (uuid)
  "asrOptions"?: object // Nested ASR selection shared by every ASR entry point: languages (at least one), provider payload keys governed by the provider row request_option_specs contract, and the diarization selection (source / provider_id / options). (非必填)
  "meetingName": string
  "audioFilePath": string
  "clientSurface"?:  // Client uploading the audio. Omitting it stays unknown instead of claiming web.

* `unknown` - Unknown
* `web` - Web
* `desktop` - Desktop (非必填)
  {
  }
}
```

**請求範例值**

```json
{
  "meeting_name": "客戶訪談錄音",
  "audio_file_path": "media/chatbot-file/2026/06/customer-interview.m4a",
  "offline_transcript_provider_id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
  "asr_options": {
    "languages": [
      "zh-TW"
    ],
    "diarization": {
      "source": "model",
      "provider_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  }
}
```

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/v1/meeting-records/import-audio/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "meeting_name": "客戶訪談錄音",
    "audio_file_path": "media/chatbot-file/2026/06/customer-interview.m4a",
    "offline_transcript_provider_id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
    "asr_options": {
      "languages": [
        "zh-TW"
      ],
      "diarization": {
        "source": "model",
        "provider_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      }
    }
  }'

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// 請求內容 (payload)
const data = {
    "meeting_name": "客戶訪談錄音",
    "audio_file_path": "media/chatbot-file/2026/06/customer-interview.m4a",
    "offline_transcript_provider_id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
    "asr_options": {
      "languages": [
        "zh-TW"
      ],
      "diarization": {
        "source": "model",
        "provider_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      }
    }
  };

axios.post("https://api.maiagent.ai/api/v1/meeting-records/import-audio/", data, config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/import-audio/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# 請求內容 (payload)
data = {
    "meeting_name": "客戶訪談錄音",
    "audio_file_path": "media/chatbot-file/2026/06/customer-interview.m4a",
    "offline_transcript_provider_id": "c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f",
    "asr_options": {
        "languages": [
            "zh-TW"
        ],
        "diarization": {
            "source": "model",
            "provider_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
        }
    }
}

response = requests.post(url, json=data, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/v1/meeting-records/import-audio/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => [
            'meeting_name' => '客戶訪談錄音',
            'audio_file_path' => 'media/chatbot-file/2026/06/customer-interview.m4a',
            'offline_transcript_provider_id' => 'c8dc9f8a-2b5e-4a2d-8f93-1a2b3c4d5e6f',
            'asr_options' => [
                'languages' => [
                    'zh-TW'
                ],
                'diarization' => [
                    'source' => 'model',
                    'provider_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
                ]
            ]
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 202**

**回應結構範例**

```typescript
{
  "id": string (uuid)
  "sttContext"?: string // 非必填
  "sttContextLlmId"?: string (uuid) // 非必填
  "liveTranscriptionResult": object
  "eventContext"?: object // 非必填
  "meetingRecordSttProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this STT provider
    "provider": string (enum: whisperlive, azure, deepgram, assemblyai, bronci, alibaba, localai, openai, rap) // * `whisperlive` - Whisperlive
* `azure` - Azure
* `deepgram` - Deepgram
* `assemblyai` - Assemblyai
* `bronci` - Bronci
* `alibaba` - Alibaba
* `localai` - Localai
* `openai` - Openai
* `rap` - Rap
    "modelName": string
  }
  "offlineTranscriptProviderDetail": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: whisper_openai, whisper_groq, whisper_offline, localai, azure, bronci, alibaba, rap, deepgram, assemblyai) // * `whisper_openai` - whisper_openai
* `whisper_groq` - whisper_groq
* `whisper_offline` - whisper_offline
* `localai` - localai
* `azure` - azure
* `bronci` - bronci
* `alibaba` - alibaba
* `rap` - rap
* `deepgram` - deepgram
* `assemblyai` - assemblyai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "meetingRecordSttProviderId"?: string (uuid) // 非必填
  "speakerDiarizationProvider": 
  {
    "id": string (uuid)
    "name": string // Display name for this provider
    "provider": string (enum: pyannoteai) // * `pyannoteai` - pyannoteai
    "modelName": string // Free-form vendor model identifier; any string the vendor deployment accepts is valid.
  }
  "enableTranslation"?: boolean // 非必填
  "targetLanguages"?: [ // Target language codes for live transcript translation. (非必填)
    string
  ]
  "translationLlmId"?: string (uuid) // 非必填
  "knowledgeBaseId"?: string (uuid) // 非必填
  "audioUrl": string
  "transcriptUrl": string
  "mp3Url": string
  "backupAudioUrl": string
  "backupSyncStatus": string
  "backupUnavailableReason": string
  "backupError": object
  "backupDurationSeconds": number (double)
  "backupTotalParts": integer
  "backupTotalChunks": integer
  "backupRecordingStartedAt": string (timestamp)
  "backupLastActivityAt": string (timestamp)
  "backupFinalizedAt": string (timestamp)
  "knowledgeBase": object
  "transcriptFile": object
  "qaConfig": object // Generate qa_config for frontend to use with chatbot completion API.
  "availableChatbots": [ // Get chatbots that have this meeting's knowledge base (detail view only).
    object
  ]
  "createdBy": 
  {
    "id": string (uuid)
    "name": string
  }
  "members": [ // The meeting's access roster, visible to anyone who can see the meeting.

Editing (add/remove) is gated separately on the members endpoint; here the
list is read-only context so members can see who participated and who else
was granted view access.
    object
  ]
  "myRole": string // The requesting user's role on this meeting, or None if not a member.
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
  "meetingName": string
  "participants"?: object // List of meeting participants (非必填)
  "durationSeconds"?: number (double) // 非必填
  "status"?: string (enum: pending, recording, processing, completed, failed) // * `pending` - Pending
* `recording` - Recording
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed (非必填)
  "stopRequestedAt": string (timestamp) // When a user explicitly requested to stop the recording. A finished recording without this set ended on the server side (e.g. the client connection was lost).
  "recordingLimitReachedAt": string (timestamp) // When LiveKit ended the egress at its maximum recording duration. The main audio file ends here; the STT agent and the browser backup keep going until the room closes, and the meeting completes on room end.
  "failureReason": // 可能有不同的類型
  string (enum: egress_not_started, egress_failed, finalize_timeout) // Why the live recording ended as failed. Empty for meetings that did not fail.

* `` - None
* `egress_not_started` - Recording did not start
* `egress_failed` - Recording failed
* `finalize_timeout` - Recording was never finalized
  "clientSurface":  // Durable client entry point captured when recording starts. Legacy records remain unknown.

* `unknown` - Unknown
* `web` - Web
* `desktop` - Desktop
  {
  }
  "requestedSourceMode":  // Audio source mode requested by the client when recording starts.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "effectiveSourceMode":  // Server-resolved audio source mode used for runtime and billing reconciliation.

* `unknown` - Unknown
* `microphone` - Microphone
* `system_audio` - System Audio
* `both` - Microphone and System Audio
  {
  }
  "sourceLanguages"?: object // Source languages for transcription (非必填)
  "speakerDiarizationConfig": object // Per-meeting non-secret speaker diarization hints, such as numSpeakers.
  "offlineAsrRequestOptions": object // Per-request ASR payload for the offline audio import, keyed by the selected provider row request_option_specs contract. EMPTY MEANS: no extra parameters.
  "audioProcessingSnapshot": object // Immutable audio processing policy snapshot frozen from the platform active profile at meeting start (via MeetingAudioProcessingProfile.to_snapshot). Downlinked to the LiveKit Agent with this meeting client/source facts and used to correlate per-track usage.
  "translationInputTokens"?: integer (int64) // Cumulative LLM input tokens consumed by realtime translation. Atomically incremented per translate() call; settled at egress completion. (非必填)
  "translationOutputTokens"?: integer (int64) // Cumulative LLM output tokens consumed by realtime translation. (非必填)
  "deletedAt"?: string (timestamp) // 非必填
  "translationLlm"?: string (uuid) // LLM model to use for translation when enabled (非必填)
}
```

**回應範例值**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "sttContext": "回應字串",
  "sttContextLlmId": "550e8400-e29b-41d4-a716-446655440000",
  "liveTranscriptionResult": null,
  "eventContext": null,
  "meetingRecordSttProvider": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應字串",
    "provider": "whisperlive",
    "modelName": "回應字串"
  },
  "offlineTranscriptProviderDetail": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應字串",
    "provider": "whisper_openai",
    "modelName": "回應字串"
  },
  "meetingRecordSttProviderId": "550e8400-e29b-41d4-a716-446655440000",
  "speakerDiarizationProvider": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應字串",
    "provider": "pyannoteai",
    "modelName": "回應字串"
  },
  "enableTranslation": false,
  "targetLanguages": [
    "回應字串"
  ],
  "translationLlmId": "550e8400-e29b-41d4-a716-446655440000",
  "knowledgeBaseId": "550e8400-e29b-41d4-a716-446655440000",
  "audioUrl": "回應字串",
  "transcriptUrl": "回應字串",
  "mp3Url": "回應字串",
  "backupAudioUrl": "回應字串",
  "backupSyncStatus": "回應字串",
  "backupUnavailableReason": "回應字串",
  "backupError": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應範例名稱",
    "description": "回應範例描述"
  },
  "backupDurationSeconds": 456,
  "backupTotalParts": 456,
  "backupTotalChunks": 456,
  "backupRecordingStartedAt": "回應字串",
  "backupLastActivityAt": "回應字串",
  "backupFinalizedAt": "回應字串",
  "knowledgeBase": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應範例名稱",
    "description": "回應範例描述"
  },
  "transcriptFile": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應範例名稱",
    "description": "回應範例描述"
  },
  "qaConfig": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應範例名稱",
    "description": "回應範例描述"
  },
  "availableChatbots": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "回應範例名稱",
      "description": "回應範例描述"
    }
  ],
  "createdBy": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "回應字串"
  },
  "members": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "回應範例名稱",
      "description": "回應範例描述"
    }
  ],
  "myRole": "回應字串",
  "createdAt": "回應字串",
  "updatedAt": "回應字串",
  "meetingName": "回應字串",
  "participants": null,
  "durationSeconds": 456,
  "status": "pending",
  "stopRequestedAt": "回應字串",
  "recordingLimitReachedAt": "回應字串",
  "failureReason": "egress_not_started",
  "clientSurface": {},
  "requestedSourceMode": {},
  "effectiveSourceMode": {},
  "sourceLanguages": null,
  "speakerDiarizationConfig": null,
  "offlineAsrRequestOptions": null,
  "audioProcessingSnapshot": null,
  "translationInputTokens": 456,
  "translationOutputTokens": 456,
  "deletedAt": "回應字串",
  "translationLlm": "550e8400-e29b-41d4-a716-446655440000"
}
```

***

### 取得會議逐字稿（JSON） <a href="#meeting-records-transcript-retrieve" id="meeting-records-transcript-retrieve"></a>

GET `/api/v1/meeting-records/{id}/transcript/`

#### 參數

| 參數名稱 | 必填 | 類型     | 說明                                             |
| ---- | -- | ------ | ---------------------------------------------- |
| `id` | ✅  | string | A UUID string identifying this Meeting Record. |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/transcript/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/transcript/", config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/transcript/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/transcript/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
object
```

**回應範例值**

```json
[
  {
    "id": "9f4a0a46-1c67-45fc-b2d0-35b0f2bb5a2e",
    "type": "final",
    "text": "今天先確認會議摘要流程。",
    "startTime": 0,
    "endTime": 2.5,
    "language": "zh-TW"
  }
]
```

**狀態碼: 400 - No response body**

***

### 列出會議摘要 <a href="#meeting-records-summaries-list" id="meeting-records-summaries-list"></a>

GET `/api/v1/meeting-records/{meetingRecordPk}/summaries/`

#### 參數

| 參數名稱              | 必填 | 類型      | 說明                                             |
| ----------------- | -- | ------- | ---------------------------------------------- |
| `meetingRecordPk` | ✅  | string  |                                                |
| `page`            | ❌  | integer | A page number within the paginated result set. |
| `pageSize`        | ❌  | integer | Number of results to return per page.          |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/?page=1&pageSize=1" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/?page=1&pageSize=1", config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/?page=1&pageSize=1"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/?page=1&pageSize=1", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
{
  "count": integer
  "next"?: string (uri) // 非必填
  "previous"?: string (uri) // 非必填
  "results": [
    {
      "id": string (uuid)
      "content"?: string // Summary content; empty while a background generation is in progress. (非必填)
      "status":  // Manual create/edit rows stay completed; background generations walk from pending to processing.

* `pending` - Pending
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed
      {
      }
      "failureReason": string // Why the last save/generation failed, for both AI-generated and manually-edited summaries.
      "completedSegments": integer
      "totalSegments": integer
      "transcriptOptimization": string (uuid) // Which re-transcribed pass this summary was generated from. Null means the meeting's own realtime transcript, which is the only other source a summary can have.
      "createdAt": string (timestamp)
      "updatedAt": string (timestamp)
    }
  ]
}
```

**回應範例值**

```json
{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
      "content": "本次會議主要討論了產品開發進度，團隊確認了下週的里程碑目標...",
      "created_at": "2025-01-15T14:30:00Z",
      "updated_at": "2025-01-15T14:30:00Z"
    }
  ]
}
```

***

### 產生會議摘要 <a href="#meeting-records-summaries-generate-create" id="meeting-records-summaries-generate-create"></a>

POST `/api/v1/meeting-records/{meetingRecordPk}/summaries/generate/`

#### 參數

| 參數名稱              | 必填 | 類型     | 說明 |
| ----------------- | -- | ------ | -- |
| `meetingRecordPk` | ✅  | string |    |

#### 請求內容

**請求參數**

| 欄位                       | 類型             | 必填 | 說明                                                                                                                                                                                                       |
| ------------------------ | -------------- | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| transcriptOptimizationId | string (uuid)  | 否  | Optional re-transcribed pass to summarize, from GET /meeting-records/{id}/transcript-optimizations/; it must be completed and belong to this meeting. Omit it to summarize the meeting's own transcript. |
| chatbotId                | string (uuid)  | 否  | Optional summary agent; when set, the agent generates the summary itself, reading the transcript through the transcript-reading tool.                                                                    |
| largeLanguageModelId     | string (uuid)  | 否  | Optional LLM override for the base (no-agent) mode; mutually exclusive with chatbot\_id, whose agent always uses its own configured model.                                                               |
| knowledgeBaseIds         | array\[string] | 否  | Optional RBAC-filtered knowledge base ids for the base (no-agent) mode; mutually exclusive with chatbot\_id, whose agent always uses its own configured knowledge bases.                                 |
| customInstructions       | string         | 否  | Optional extra instructions appended to the built-in summary prompt.                                                                                                                                     |
| clientPlatform           | object         | 否  | Client platform triggering this generation; stamped on the summary conversation. `web`: Web ; `desktop`: Desktop;                                                                                        |

**請求結構範例**

```typescript
{
  "transcriptOptimizationId"?: string (uuid) // Optional re-transcribed pass to summarize, from GET /meeting-records/{id}/transcript-optimizations/; it must be completed and belong to this meeting. Omit it to summarize the meeting's own transcript. (非必填)
  "chatbotId"?: string (uuid) // Optional summary agent; when set, the agent generates the summary itself, reading the transcript through the transcript-reading tool. (非必填)
  "largeLanguageModelId"?: string (uuid) // Optional LLM override for the base (no-agent) mode; mutually exclusive with chatbot_id, whose agent always uses its own configured model. (非必填)
  "knowledgeBaseIds"?: [ // Optional RBAC-filtered knowledge base ids for the base (no-agent) mode; mutually exclusive with chatbot_id, whose agent always uses its own configured knowledge bases. (非必填)
    string (uuid)
  ]
  "customInstructions"?: string // Optional extra instructions appended to the built-in summary prompt. (非必填)
  "clientPlatform"?:  // Client platform triggering this generation; stamped on the summary conversation.

* `web` - Web
* `desktop` - Desktop (非必填)
  {
  }
}
```

**請求範例值**

```json
{
  "transcriptOptimizationId": "550e8400-e29b-41d4-a716-446655440000",
  "chatbotId": "550e8400-e29b-41d4-a716-446655440000",
  "largeLanguageModelId": "550e8400-e29b-41d4-a716-446655440000",
  "knowledgeBaseIds": [
    "550e8400-e29b-41d4-a716-446655440000"
  ],
  "customInstructions": "範例字串",
  "clientPlatform": {}
}
```

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/generate/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transcriptOptimizationId": "550e8400-e29b-41d4-a716-446655440000",
    "chatbotId": "550e8400-e29b-41d4-a716-446655440000",
    "largeLanguageModelId": "550e8400-e29b-41d4-a716-446655440000",
    "knowledgeBaseIds": [
      "550e8400-e29b-41d4-a716-446655440000"
    ],
    "customInstructions": "範例字串",
    "clientPlatform": {}
  }'

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// 請求內容 (payload)
const data = {
    "transcriptOptimizationId": "550e8400-e29b-41d4-a716-446655440000",
    "chatbotId": "550e8400-e29b-41d4-a716-446655440000",
    "largeLanguageModelId": "550e8400-e29b-41d4-a716-446655440000",
    "knowledgeBaseIds": [
      "550e8400-e29b-41d4-a716-446655440000"
    ],
    "customInstructions": "範例字串",
    "clientPlatform": {}
  };

axios.post("https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/generate/", data, config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/generate/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# 請求內容 (payload)
data = {
    "transcriptOptimizationId": "550e8400-e29b-41d4-a716-446655440000",
    "chatbotId": "550e8400-e29b-41d4-a716-446655440000",
    "largeLanguageModelId": "550e8400-e29b-41d4-a716-446655440000",
    "knowledgeBaseIds": [
        "550e8400-e29b-41d4-a716-446655440000"
    ],
    "customInstructions": "範例字串",
    "clientPlatform": {}
}

response = requests.post(url, json=data, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/generate/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => [
            'transcriptOptimizationId' => '550e8400-e29b-41d4-a716-446655440000',
            'chatbotId' => '550e8400-e29b-41d4-a716-446655440000',
            'largeLanguageModelId' => '550e8400-e29b-41d4-a716-446655440000',
            'knowledgeBaseIds' => [
                '550e8400-e29b-41d4-a716-446655440000'
            ],
            'customInstructions' => '範例字串',
            'clientPlatform' => new \stdClass()
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
{
  "id": string (uuid)
  "content"?: string // Summary content; empty while a background generation is in progress. (非必填)
  "status":  // Manual create/edit rows stay completed; background generations walk from pending to processing.

* `pending` - Pending
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed
  {
  }
  "failureReason": string // Why the last save/generation failed, for both AI-generated and manually-edited summaries.
  "completedSegments": integer
  "totalSegments": integer
  "transcriptOptimization": string (uuid) // Which re-transcribed pass this summary was generated from. Null means the meeting's own realtime transcript, which is the only other source a summary can have.
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**回應範例值**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "content": "回應字串",
  "status": {},
  "failureReason": "回應字串",
  "completedSegments": 456,
  "totalSegments": 456,
  "transcriptOptimization": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "回應字串",
  "updatedAt": "回應字串"
}
```

**狀態碼: 202**

**回應結構範例**

```typescript
{
  "id": string (uuid)
  "content"?: string // Summary content; empty while a background generation is in progress. (非必填)
  "status":  // Manual create/edit rows stay completed; background generations walk from pending to processing.

* `pending` - Pending
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed
  {
  }
  "failureReason": string // Why the last save/generation failed, for both AI-generated and manually-edited summaries.
  "completedSegments": integer
  "totalSegments": integer
  "transcriptOptimization": string (uuid) // Which re-transcribed pass this summary was generated from. Null means the meeting's own realtime transcript, which is the only other source a summary can have.
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**回應範例值**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "content": "回應字串",
  "status": {},
  "failureReason": "回應字串",
  "completedSegments": 456,
  "totalSegments": 456,
  "transcriptOptimization": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "回應字串",
  "updatedAt": "回應字串"
}
```

***

### 取得特定會議摘要 <a href="#meeting-records-summaries-retrieve" id="meeting-records-summaries-retrieve"></a>

GET `/api/v1/meeting-records/{meetingRecordPk}/summaries/{id}/`

#### 參數

| 參數名稱              | 必填 | 類型     | 說明 |
| ----------------- | -- | ------ | -- |
| `id`              | ✅  | string |    |
| `meetingRecordPk` | ✅  | string |    |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/meeting-records/{meetingRecordPk}/summaries/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
{
  "id": string (uuid)
  "content"?: string // Summary content; empty while a background generation is in progress. (非必填)
  "status":  // Manual create/edit rows stay completed; background generations walk from pending to processing.

* `pending` - Pending
* `processing` - Processing
* `completed` - Completed
* `failed` - Failed
  {
  }
  "failureReason": string // Why the last save/generation failed, for both AI-generated and manually-edited summaries.
  "completedSegments": integer
  "totalSegments": integer
  "transcriptOptimization": string (uuid) // Which re-transcribed pass this summary was generated from. Null means the meeting's own realtime transcript, which is the only other source a summary can have.
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**回應範例值**

```json
{
  "id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
  "content": "本次會議主要討論了產品開發進度，團隊確認了下週的里程碑目標...",
  "created_at": "2025-01-15T14:30:00Z",
  "updated_at": "2025-01-15T14:30:00Z"
}
```

***

### 上傳逐字稿到知識庫 <a href="#meeting-records-upload-transcript-create" id="meeting-records-upload-transcript-create"></a>

POST `/api/v1/meeting-records/{id}/upload-transcript/`

{% hint style="info" %}
首次上傳需帶 `knowledge_base_id`；知識庫中的逐字稿被刪除後可再呼叫重新上傳。
{% endhint %}

#### 參數

| 參數名稱 | 必填 | 類型     | 說明                                             |
| ---- | -- | ------ | ---------------------------------------------- |
| `id` | ✅  | string | A UUID string identifying this Meeting Record. |

#### 請求內容

**請求參數**

| 欄位              | 類型            | 必填 | 說明                                                                                        |
| --------------- | ------------- | -- | ----------------------------------------------------------------------------------------- |
| knowledgeBaseId | string (uuid) | 否  | Knowledge base ID to upload transcript to. If not provided, uses existing knowledge base. |

**請求結構範例**

```typescript
{
  "knowledgeBaseId"?: string (uuid) // Knowledge base ID to upload transcript to. If not provided, uses existing knowledge base. (非必填)
}
```

**請求範例值**

```json
{
  "knowledge_base_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890"
}
```

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X POST "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/upload-transcript/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "knowledge_base_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890"
  }'

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// 請求內容 (payload)
const data = {
    "knowledge_base_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890"
  };

axios.post("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/upload-transcript/", data, config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/upload-transcript/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# 請求內容 (payload)
data = {
    "knowledge_base_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890"
}

response = requests.post(url, json=data, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/upload-transcript/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => [
            'knowledge_base_id' => 'b1c2d3e4-f5a6-7890-abcd-ef1234567890'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

| 狀態碼 | 說明               |
| --- | ---------------- |
| 202 | No response body |
| 400 | No response body |
| 404 | No response body |

***

### 下載 SRT 字幕檔 <a href="#meeting-records-download-srt-retrieve" id="meeting-records-download-srt-retrieve"></a>

GET `/api/v1/meeting-records/{id}/download-srt/`

#### 參數

| 參數名稱 | 必填 | 類型     | 說明                                             |
| ---- | -- | ------ | ---------------------------------------------- |
| `id` | ✅  | string | A UUID string identifying this Meeting Record. |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-srt/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-srt/", config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-srt/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-srt/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200 - SRT 字幕檔內容**

**回應結構範例**

```typescript
string (binary)
```

**回應範例值**

```json
"1\n00:00:00,000 --> 00:00:05,500\nWelcome to the meeting\n\n2\n00:00:05,500 --> 00:00:10,200\nLet's begin the discussion"
```

**狀態碼: 400 - No response body**

***

### 下載 MP3 音檔 <a href="#meeting-records-download-mp3-retrieve" id="meeting-records-download-mp3-retrieve"></a>

GET `/api/v1/meeting-records/{id}/download-mp3/`

#### 參數

| 參數名稱 | 必填 | 類型     | 說明                                             |
| ---- | -- | ------ | ---------------------------------------------- |
| `id` | ✅  | string | A UUID string identifying this Meeting Record. |

#### 程式碼範例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-mp3/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// 設定請求標頭
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-mp3/", config)
  .then(response => {
    console.log('成功取得回應:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('請求發生錯誤:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-mp3/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("成功取得回應:")
    print(response.json())
except Exception as e:
    print("請求發生錯誤:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/meeting-records/550e8400-e29b-41d4-a716-446655440000/download-mp3/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "成功取得回應:\n";
    print_r($data);
} catch (Exception $e) {
    echo '請求發生錯誤: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### 回應內容

**狀態碼: 200**

**回應結構範例**

```typescript
{
  "downloadUrl": string (uri) // Presigned download URL
  "filename": string // Suggested filename
  "expiresIn": integer // URL expiration time in seconds
}
```

**回應範例值**

```json
{
  "download_url": "https://s3.amazonaws.com/bucket/media/meeting-record/xxx_mp3.mp3?X-Amz-...",
  "filename": "產品規劃會議_20250115.mp3",
  "expires_in": 3600
}
```

**狀態碼: 400 - No response body**

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/api/api-reference/hui-yi-ji-lu.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
