API 参考

Create durable speech

POST/v1/audio-runs

Versioned public durable speech extension using an ordinary API Key. Input follows the non-streaming OpenAI speech subset. A signed speech cost quote binds identity, exact original input and immutable character pricing. Full maximum is reserved before dispatch. One user/Key/request_id owns one dispatch; retries return the original record and changed input conflicts. Query the original request after uncertainty; never replay a generation to recover. Inline audio is exposed only after authoritative settlement, retained for seven days in the durable record and never automatically downloaded or copied to object storage. Deleted or expired content stays succeeded with result_deleted=true; billing and identity remain.

鉴权与权限

使用当前 GloopAPI Key。模型、功能与权限以当前 Key 的目录及接口说明为准。

Authorization: Bearer $GLOOP_API_KEY

鉴权方案: BearerAuth

请求

请求体 · application/json

类型
object
额外属性
false
必填字段
request_idmodelquote_idinput

请求体必填

  • request_idstring必填
    最长长度
    128
    匹配规则
    "^[A-Za-z0-9_-]+$"
  • modelstring必填
  • quote_idstring必填

    The signed quote_token from a speech cost quote, not its display ID.

  • inputobject必填
    额外属性
    false
    input 子字段(5)
    • modelstring必填
    • inputstring必填

      Original text, including whitespace. No instructions are added.

      最长长度
      4096
    • voicestring必填

      An explicitly configured voice from model audio metadata.

    • response_formatstring必填
      枚举
      ["mp3","opus","aac","flac","wav","pcm"]
    • speednumber选填
      最小值
      0.25
      最大值
      4

响应与错误

HTTP 200

Authoritative current execution or quote. Unknown retains its hold.

application/json

类型
object
必填字段
idrequest_idmodelstateversioncreated_atexpires_atresult_deleted

HTTP 202

Authoritative current execution or quote. Unknown retains its hold.

application/json

类型
object
必填字段
idrequest_idmodelstateversioncreated_atexpires_atresult_deleted

HTTP 400

输入无效。

application/json

类型
object
必填字段
error

HTTP 401

Key 缺失、无效、过期或已撤销。

application/json

类型
object
必填字段
error

HTTP 403

IP、账户、模型或工具权限不足。

application/json

类型
object
必填字段
error

HTTP 404

未找到本人执行;不能据此判断未知生成没有计费。

application/json

类型
object
必填字段
error

HTTP 409

请求 ID 内容冲突,或在途执行不能删除。

application/json

类型
object
必填字段
error

HTTP 429

请求/队列限流。

application/json

类型
object
必填字段
error

HTTP 500

鉴权或数据存储内部失败。

application/json

类型
object
必填字段
error

HTTP 503

暂不可用;已提交结果不确定时查询原请求。

application/json

类型
object
必填字段
error