API 參考
Create durable speech
/v1/audio-runsVersioned 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
idstring必填request_idstring必填modelstring必填statestring必填- 列舉
["pending","unknown","succeeded","failed"]
versioninteger必填- 列舉
[1]
created_atinteger必填expires_atinteger必填Content retention ends after seven days. Accounting and original request identity remain.
result_deletedboolean必填billingobject選填billing 子欄位(5)
statusstring必填- 列舉
["settled","refunded"]
currencystring必填- 列舉
["USD"]
final_amountstring選填权威最终钱包实收;缺失不代表零费用。
pricing_versionstring選填quote_idstring選填
outputobject選填output 子欄位(2)
datastring必填Base64 inline audio, limited to 16 MiB decoded.
- 格式
"byte"
content_typestring必填
HTTP 202
Authoritative current execution or quote. Unknown retains its hold.
application/json
- 型別
- object
- 必填欄位
idrequest_idmodelstateversioncreated_atexpires_atresult_deleted
idstring必填request_idstring必填modelstring必填statestring必填- 列舉
["pending","unknown","succeeded","failed"]
versioninteger必填- 列舉
[1]
created_atinteger必填expires_atinteger必填Content retention ends after seven days. Accounting and original request identity remain.
result_deletedboolean必填billingobject選填billing 子欄位(5)
statusstring必填- 列舉
["settled","refunded"]
currencystring必填- 列舉
["USD"]
final_amountstring選填权威最终钱包实收;缺失不代表零费用。
pricing_versionstring選填quote_idstring選填
outputobject選填output 子欄位(2)
datastring必填Base64 inline audio, limited to 16 MiB decoded.
- 格式
"byte"
content_typestring必填
HTTP 400
輸入無效。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 401
Key 缺失、無效、過期或已撤銷。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 403
IP、賬戶、模型或工具許可權不足。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 404
未找到本人執行;不能據此判斷未知生成沒有計費。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 409
請求 ID 內容衝突,或在途執行不能刪除。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 429
請求/佇列限流。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 500
鑑權或資料儲存內部失敗。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 503
暫不可用;已提交結果不確定時查詢原請求。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填