API 參考

建立語音克隆任務

POST/v1/audio-clone/tasks

Explicit voice cloning is a distinct capability. Input text and reference transcript remain unchanged. reference_audio.file_id uses an audio input owned by the same user and Key; reference_audio_url accepts an HTTPS source instead. Quote and execution bind the exact reference identity, original text, current pricing and expiry. No quote generates, reserves or charges. Supply quote_token as quote_id on the existing create task endpoint with an Idempotency-Key. The full maximum is reserved; a higher final amount stays unknown and held, never capped or subsidized. Existing unquoted calls remain compatible. Recovery reads use owner-scoped ordinary valid Key authentication even after quota depletion; expired or revoked Keys remain rejected. Quoted requests require Idempotency-Key; execution views echo it as request_id.

克隆任務的恢復邊界

克隆建立與後續查詢使用普通鑑權,應預留足夠額度並保管原 Key。不要因影象/影片能用耗盡 Key 查詢而假定克隆也允許。

克隆沒有持久影象的按請求鍵恢復入口。網路超時後保留診斷與已知任務資訊,先核查任務,不能盲目再次提交。執行成功與結果儲存狀態也要分別判斷。

鑑權與許可權

使用當前 GloopAPI Key。模型、功能與許可權以當前 Key 的目錄及介面說明為準。

Authorization: Bearer $GLOOP_API_KEY

鑑權方案: BearerAuth

請求

請求頭

  • Idempotency-Keystring選填
    最長長度
    191
    匹配規則
    "^[\\x20-\\x7E]{0,191}$"

請求體 · application/json

型別
object
必填欄位
textreference_text

請求體必填

  • modelstring選填

    當前 Key 目錄中的公開模型 ID。

    預設值
    "audio-clone-v1"
    列舉
    ["audio-clone-v1"]
  • textstring必填

    合成文字。

    最短長度
    1
    最長長度
    5000
  • 公開 HTTPS 參考音訊 URL,禁止使用者資訊並受 SSRF 校驗。

  • reference_textstring必填

    參考音訊對應文字。

    最短長度
    1
    最長長度
    5000
  • remove_silenceboolean選填允許 null

    是否移除靜音,省略為 true。

    預設值
    true
  • quote_idstring選填

    Optional signed quote_token from the public clone quote. A quoted request reserves the full maximum and refuses over-bound settlement.

  • reference_audioobject選填
    額外屬性
    false
    reference_audio 子欄位(1)
    • file_idstring必填

      An audio input file owned by the same user and API Key.

  • @oneOf:0unknown選填
  • @oneOf:1unknown選填

響應與錯誤

HTTP 202

任務已接受,不代表完成。

application/json

型別
object
必填欄位
idstatuscreated_at

HTTP 400

請求引數錯誤。

application/json

型別
object
必填欄位
error
  • errorobject必填
    error 子欄位(3)
    • messagestring必填
    • typestring必填
      列舉
      ["new_api_error"]
    • codestring必填
      列舉
      ["invalid_request","invalid_reference_audio_url","text_too_long","idempotency_conflict","insufficient_quota","task_not_found","task_not_ready","task_failed","submission_state_unknown","upstream_unavailable","upstream_protocol_error"]

HTTP 401

Key 缺失、無效、過期或已撤銷。

application/json

型別
object
必填欄位
error

HTTP 402

賬戶或 Key 可用額度不足。

application/json

型別
object
必填欄位
error
  • errorobject必填
    error 子欄位(3)
    • messagestring必填
    • typestring必填
      列舉
      ["new_api_error"]
    • codestring必填
      列舉
      ["invalid_request","invalid_reference_audio_url","text_too_long","idempotency_conflict","insufficient_quota","task_not_found","task_not_ready","task_failed","submission_state_unknown","upstream_unavailable","upstream_protocol_error"]

HTTP 403

IP、賬戶、模型或工具許可權不足。

application/json

型別
object
必填欄位
error

HTTP 409

請求衝突、未準備或提交未知,先查詢原記錄,禁止盲重發。

application/json

型別
object
必填欄位
error
  • errorobject必填
    error 子欄位(3)
    • messagestring必填
    • typestring必填
      列舉
      ["new_api_error"]
    • codestring必填
      列舉
      ["invalid_request","invalid_reference_audio_url","text_too_long","idempotency_conflict","insufficient_quota","task_not_found","task_not_ready","task_failed","submission_state_unknown","upstream_unavailable","upstream_protocol_error"]

HTTP 429

請求/佇列限流。

application/json

型別
object
必填欄位
error

HTTP 500

鑑權或資料儲存內部失敗。

application/json

型別
object
必填欄位
error

HTTP 503

服務、儲存或定價暫不可用。

application/json

型別
object
必填欄位
error
  • errorobject必填
    error 子欄位(3)
    • messagestring必填
    • typestring必填
      列舉
      ["new_api_error"]
    • codestring必填
      列舉
      ["invalid_request","invalid_reference_audio_url","text_too_long","idempotency_conflict","insufficient_quota","task_not_found","task_not_ready","task_failed","submission_state_unknown","upstream_unavailable","upstream_protocol_error"]