跳至本文
使用文件

搜尋文件

搜尋僅在此瀏覽器進行,關鍵字不會傳送或儲存。請勿輸入憑證。

正在載入搜尋索引…

Tab 或方向鍵移動 · Enter 開啟 · Esc 關閉
瀏覽文件

一鍵動畫報價

從原始碼生成 POST /animations/quote 的鑑權、欄位、響應、錯誤與安全呼叫參考。

公開測試API v1 · 1.4.0最後核實
本頁目錄

操作

POST /animations/quote

operationId: quote_one_click_animation_v1_animations_quote_post

為計劃操作估算點數,不啟動生產也不扣費。此報價不鎖價、不構成支出批准;建立時重新計算,應先確認報價,並保持影響價格的選項與後續請求一致。

鑑權與副作用

使用可信環境中的 Bearer API Key。所需權限:animations:write

此操作不啟動付費生成,其他狀態變化見上文說明。

引數

無路徑、查詢或操作專屬請求頭引數。

請求體 (application/json)

請求體必填:true

欄位 型別 必填 預設值 約束 含義
export ExportOptions 否 {"fps":null,"frame_count":24,"output_formats":["spritesheet"],"output_height":512,"output_width":512,"transparent":{"enabled":false},"unity":{"pivot":"bottom_center","pixels_per_unit":100}} — 影片生成後執行匯出;帶 Alpha 的格式要求 alpha_key 來源,適配格式會自動啟用其透明處理。
input GenerationInput 是 — — 呼叫方所屬或本次提供的生成圖片。
metadata object 否 {} — 呼叫方後設資料,僅字串、數字、布林或 null;JSON 不超過 4 KiB,不存憑據。
negative_prompt string 否 "" maxLength: 4000 可選負向提示詞,僅適用於支援的模型。
prompt string 否 "" maxLength: 8000 動作提示詞;模型要求時不能為空,私有提示詞不得寫入日誌。
selection Selection 否 {"duration_seconds":null,"mode":"full","start_seconds":0} — 生成後選取的區間,預設完整影片。
video VideoOptions 否 {"duration_seconds":null,"input_canvas":null,"model":null,"ratio":null,"resolution":null,"seed":null,"style_preset":null,"transparency":{"key_color":null,"key_selection":"auto","mode":"standard"},"watermark":null} — 符合模型能力的生成設定。

完整巢狀結構:AnimationCreateRequest

請求示例

json
{
  "export": {
    "frame_count": 24,
    "output_formats": [
      "frames_zip"
    ],
    "output_height": 512,
    "output_width": 512
  },
  "input": {
    "first_frame": {
      "file_id": "00000000-0000-4000-8000-000000000001",
      "type": "file"
    }
  },
  "prompt": "A character runs in place, side view, fixed camera.",
  "selection": {
    "mode": "full"
  }
}

響應

HTTP 正文 含義
200 QuoteResponse 成功的公開響應,示例數值僅用於說明。
400 APIErrorEnvelope 輸入錯誤,修正請求後再嘗試。
401 APIErrorEnvelope API Key 缺失、到期或被撤銷。
402 APIErrorEnvelope 點數不足,不自動購買。
403 APIErrorEnvelope 帳戶資格、帳戶狀態或 Key 權限不允許此操作。
404 APIErrorEnvelope 資源不可用、不屬於當前使用者,或簽名無效/過期。
413 APIErrorEnvelope 請求或解碼後的圖片超過配置限制。
415 APIErrorEnvelope 使用支援的圖片媒體型別。
422 APIErrorEnvelope 圖片解碼後尺寸超過限制。
429 APIErrorEnvelope 觸發帳戶級速率或佇列限制,遵循 Retry-After 等待。
500 APIErrorEnvelope 內部錯誤,保留任務 ID 和冪等鍵,僅標記可重試時重試。
503 APIErrorEnvelope 服務或供應商不可用,僅 error.retryable 為 true 時重試。

響應頭

HTTP 響應頭 型別 含義
429 Retry-After integer 建議等待秒數,遵循服務值並設定總體截止時間。
503 Retry-After integer 建議等待秒數,遵循服務值並設定總體截止時間。

響應示例

json
{
  "breakdown": {},
  "credits": 1,
  "object": "quote"
}

相關教程

輪詢與下載 · 錯誤與安全重試

這篇文件有幫助嗎?

不收集搜尋字詞、程式碼或自由文字。此開關僅控制文件互動事件。 隱私權政策

需要協助?聯絡支援