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"]