設定 Harness
PPT Task API
建立 PPT 生成任務、列出主題,並輪詢共享任務 endpoints。
POST
/v2/ppts認證
Bearer API key
Content type
application/json
限流說明
可能適用 endpoint 專屬限制。
PPT Task API 提供非同步 PPT 生成能力。你可以建立 task,然後透過 task_id 輪詢狀態;也可以瀏覽可用 PPT themes 並在建立任務時應用。
認證
Authorization: Bearer YOUR_API_KEY1. 列出 PPT 主題
GET https://openapi.felo.ai/v2/ppt-themes| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
lang | string | 否 | 本地化內容語言,例如 en、zh-Hans,預設 en |
type | string | 否 | 按 theme type 過濾 |
keyword | string | 否 | 搜尋關鍵詞,匹配 theme title |
page | integer | 否 | 頁碼,從 1 開始 |
size | integer | 否 | 每頁數量,最大 100 |
2. 建立 PPT 任務
POST https://openapi.felo.ai/v2/ppts| 引數 | 型別 | 必填 | 說明 |
|---|---|---|---|
query | string | 是 | PPT 生成請求 prompt |
livedoc_short_id | string | 否 | 關聯已有 LiveDoc;省略時會自動建立新 LiveDoc |
resource_ids | array of strings | 否 | 用作 PPT 生成上下文 的 LiveDoc 資源 ID |
ppt_config.ai_theme_id | string | 否 | 來自 List PPT Themes 的 Theme ID |
curl -X POST 'https://openapi.felo.ai/v2/ppts' -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"query":"Felo, 2 pages"}'成功回應包含 livedoc_short_id、ppt_business_id 和 task_id。
3. Query Task Status
GET https://openapi.felo.ai/v2/tasks/{task_id}/status4. Query Task Historical Info
GET https://openapi.felo.ai/v2/tasks/{task_id}/historical完成後可能返回 ppt_url、live_doc_short_id、live_doc_url 或 ai_page_html。
說明
- PPT generation 是非同步任務,建立後需要輪詢 status 或 historical endpoint。
- 如果請求包含 LiveDoc resources,生成內容會結合這些資源。
- 如果任務失敗,請儲存
task_id並聯絡 support。