Felo API PlatformFelo API Platform

設定 Harness

Landing Page Task API

非同步生成落地頁並查詢任務歷史。

POST/v2/landing_page

認證

Bearer API key

Content type

application/json or multipart/form-data

限流說明

可能適用 endpoint 專屬限制。

Landing Page Task API 用於非同步生成落地頁。先建立任務,然後複用 task polling APIs 查詢進度、歷史結果和生成出的 ai_page_html

認證

Authorization: Bearer YOUR_API_KEY

建立落地頁任務

POST https://openapi.felo.ai/v2/landing_page

請求 Body

引數型別必填說明
querystring落地頁生成需求 prompt
stream_protocolstring串流協議,預設 message_center_v1
livedoc_short_idstring用作上下文的現有 LiveDoc short ID
resource_idsarray of strings用作上下文的 LiveDoc 資源 ID

範例

curl -X POST 'https://openapi.felo.ai/v2/landing_page' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query":"Generate a landing page for Felo Search"}'

Create With File

使用 multipart/form-data 上傳一個檔案。檔案會先作為 LiveDoc resource 上傳,再把 resource ID 傳給 Landing Page task。

curl -X POST 'https://openapi.felo.ai/v2/landing_page' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'query=Generate a landing page from this product brief' \
  -F '[email protected]'

成功後返回 task_id,用於後續輪詢。

Poll Task Status

GET https://openapi.felo.ai/v2/tasks/{task_id}/status
curl -X GET 'https://openapi.felo.ai/v2/tasks/019cad6d-e874-55ef-d577-686344b5a7e9/status' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Query Task Historical Info

GET https://openapi.felo.ai/v2/tasks/{task_id}/historical

完成後歷史結果會包含 task_statusppt_biz_idppt_urlai_page_html。狀態語義與 PPT Task API 共用。

錯誤碼

CodeHTTP Status說明
INVALID_API_KEY401API Key 無效或已撤銷
LANDING_PAGE_TASK_CREATE_FAILED502落地頁任務建立失敗
INSUFFICIENT_CREDITS402Credits 不足