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

# API 參考

> Pathors API 整合概述

歡迎查閱 Pathors API 參考文件。我們的 API 提供多種整合選項，幫助您打造強大的對話體驗。

## 可用整合

<CardGroup cols={2}>
  <Card title="LINE 整合" icon="line" href="/zh-Hant/api-reference/integration/line">
    與 LINE Messaging API 整合，為 LINE 平台創建聊天機器人。
  </Card>

  <Card title="API 整合" icon="code" href="/zh-Hant/api-reference/integration/api">
    使用我們的 OpenAI 兼容 API，與任何平台整合。
  </Card>
</CardGroup>

## 通話

<CardGroup cols={2}>
  <Card title="建立通話" icon="phone" href="/zh-Hant/api-reference/call/create-call">
    從已設定的電話號碼向目標號碼建立通話。
  </Card>
</CardGroup>

## 知識管理

<CardGroup cols={2}>
  <Card title="知識庫" icon="database" href="/zh-Hant/api-reference/knowledgebase/get-knowledgebases">
    建立和管理知識庫以儲存和組織您的資料。
  </Card>

  <Card title="資料集" icon="file" href="/zh-Hant/api-reference/dataset/get-datasets">
    在您的知識庫中上傳和管理資料集。
  </Card>
</CardGroup>

## 會話管理

<CardGroup cols={2}>
  <Card title="建立會話" icon="message" href="/zh-Hant/api-reference/session/create-session">
    建立新會話以在多個 API 呼叫之間維護對話上下文。
  </Card>

  <Card title="查詢會話" icon="search" href="/zh-Hant/api-reference/session/query-session">
    透過會話 ID 查詢會話資訊，查看對話上下文和變數。
  </Card>
</CardGroup>

## 認證

除 LINE 整合外，所有 API 都使用 **Developer Key**（`dk_` 前綴）進行認證。您可以在帳號選單的 **Developer Keys** 建立與管理 Developer Key。

| 整合方式            | 認證方式              | Header                         |
| --------------- | ----------------- | ------------------------------ |
| LINE 整合         | LINE channel 存取令牌 | 依 LINE 文件                      |
| Completions API | Developer Key     | `Authorization: Bearer dk_...` |
| 通話 API          | Developer Key     | `Authorization: Bearer dk_...` |
| 知識庫 / 資料集 API   | Developer Key     | `Authorization: Bearer dk_...` |

## 入門指南

1. 選擇最適合您需求的整合方式
2. 在帳號選單的 **Developer Keys** 建立 Developer Key
3. 按照所選整合的設置指南進行操作
4. 使用我們的範例程式碼測試您的整合
5. 將您的整合部署到生產環境

有關每種整合的詳細信息，請點擊上方相應的卡片。
