# API Playground

YouCam API 的 API Playground 提供了極佳的概覽，說明如何設定 AI 工作流程。您可以執行測試、驗證結果、排除問題，同時提供可直接複製到環境中的即用程式碼片段。

網址：[https://yce.makeupar.com/api-console/en/api-playground/ai-skin-analysis/](https://yce.makeupar.com/api-console/en/api-playground/ai-skin-analysis/)

![YouCam API - API Playground](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_Playground_9dfea29a72.png)

## 使用者指南

請依下列步驟註冊、建立 API 金鑰，並執行您的第一個 AI 工作流程。

### 1. 註冊與登入

- 前往：https://yce.makeupar.com/ai-api
- 註冊新帳號，若已有帳號則直接登入。


### 2. 建立 API Key

前往 [API Console](https://yce.makeupar.com/api-console/en/) 並[產生金鑰](https://yce.makeupar.com/api-console/en/api-keys/)：
![API Keys](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_Console_API_Keys_07f57942c7.png)

### 3. 在 API Playground 中選擇功能

[選擇要測試的 AI 功能](https://yce.makeupar.com/api-console/en/api-playground/ai-skin-analysis/)。

### 4. 使用您的 API Key 授權

在 playground 的 **Authorization** 欄位中，選取您建立的 API 金鑰。

> ![API Key in Playground](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_Playground_API_Key_d4854060be.png)


### 5. 選擇來源

指定資料來源（例如本地檔案、檔案網址，或範例）。

### 6. 設定 AI 參數

調整參數以符合您的使用情境：
![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_Playground_Parameter_b253859dd5.png)

### 7. 檢查請求內容與範例程式碼

檢視產生的請求內容（request payload）與範例程式碼是否正確。

> ![Request Payload](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_Playground_Request_Payload_and_Sample_Code_91cf726c91.png)


### 8. 開始處理

點擊 **Start Processing** 以執行工作流程。

> ![Start Processing](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_Playground_Start_Processing_2c334b82f4.png)


### 9. 檢查結果

檢視輸出，確認是否符合預期。

> ![Results](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_Playground_Result_bf2a4c4575.png)