> ## Documentation Index
> Fetch the complete documentation index at: https://craft-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 Craft API 設定 App

> 使用 Craft API 以你的 Craft 文件為基礎建立 App 與自動化流程的逐步設定說明。

## 開始之前

**Step 1**

在 **連線** 標籤中新增 API 連線，並選擇要包含的內容。

**Step 2**

複製其 API URL，或選擇 **下載 AI 套件**，取得一個為 AI 工具說明 API 和你的內容的 Markdown 檔案。

**Step 3**

如果連線的 **存取模式** 為 **API 金鑰**，請在 **API 金鑰** 下建立金鑰並複製。金鑰只會顯示一次。工具會在 `Authorization` 標頭中以 `Bearer YOUR_API_KEY` 的形式傳送金鑰。

若要查看可用的端點，請在連線中選擇 **API 參考**。

![連線標籤中的 API 連線，顯示 URL、存取模式、API 參考和下載 AI 套件](https://mintcdn.com/craft-support/yEvyC2-RkiE2spXY/images/integrate/api/setup-guides/en/content/api-connection.png?fit=max\&auto=format\&n=yEvyC2-RkiE2spXY\&q=85\&s=205c2e4cc9457e4c0c2461583e551bd9)

## AI App 建構工具

Lovable、Replit、Bolt、v0 和 Base44 的使用方式相同。

**Step 1**

建立新專案，並在第一則訊息中附上 AI 套件檔案。

**Step 2**

描述你想建立的內容，例如以你的 Craft 文件為基礎的閱讀紀錄。

如果連線使用 API 金鑰，請在建構工具的密鑰或環境變數設定中新增金鑰，不要貼到對話中。

## Claude Code 和 Codex CLI

**Step 1**

將 AI 套件檔案放到你的專案資料夾中。

**Step 2**

在該資料夾中啟動代理程式，並請它先讀取該檔案。

## 捷徑

Craft 有自己的[捷徑動作](https://craft-support.mintlify.site/zh-Hant/integrate/apple-shortcuts.md)。若要執行這些動作未涵蓋的操作，例如將項目新增到集合，請使用 **Get Contents of URL** 動作，搭配你的 API URL 和連線中 **API 參考** 下列出的端點。

## Zapier

新增 **Webhooks by Zapier** 動作並選擇 **Custom Request**。

Webhooks by Zapier 需要 Zapier 付費方案。

## n8n

新增 **HTTP Request** 節點。若使用 API 金鑰，請選擇 **Bearer Auth** 作為驗證方式。

## Craft Agents

在 [Craft Agents](https://thecraftagents.com) 對話中，請代理程式將你的 Craft API 連線新增為來源，並貼上其 API URL。如果連線使用 API 金鑰，Craft Agents 會要求你提供。

## 其他工具

任何可以傳送 HTTP 請求的工具都能使用 Craft API。

> [card] [Craft API](https://craft-support.mintlify.site/zh-Hant/integrate/api.md)
>
> API 連線的運作方式

> [card] [MCP 設定指南](https://craft-support.mintlify.site/zh-Hant/integrate/mcp/setup-guides.md)
>
> 透過 MCP 將 AI 工具連接到 Craft


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.