Crescendo Lab 文件
正體中文
註冊開始用

Transcriptions API 參考

Platform API v1 的 Transcriptions:每個操作的路徑、參數、請求與回應欄位、scope、冪等與錯誤,直接取自 API 合約。

最後更新

由 API 合約(Agent Lab Platform API 1.0.0-alpha.1)產生。說明文字是合約的英文原文。

A member's speech turned into text, metered as that member's voice input.

Turn a member's speech into text#

POST /v1/workspaces/{workspaceId}/transcriptions

Transcribes the acting member's dictation, as the console's microphone does before a message is sent; nothing is stored and no conversation is started. The audio is a mono 16 kHz 16-bit PCM WAV of at most two minutes, sent base64-encoded. It is metered as the member's voice input against the workspace's monthly audio-minute allowance and its spending limits, which are checked before the audio is sent; a workspace whose plan has no voice input is PRODUCT_ACCESS_DENIED. Needs an active member. A retried request is transcribed and metered again.

Scope身分驗證方式Idempotency-Key
runs:writememberinstallationToken—

參數

名稱位置型別必填說明
workspaceIdpathstring是The workspace, by id. It must be the installation's.
Agentlab-On-Behalf-Ofheaderstring是The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.

請求內容

application/json: TranscriptionCreate

欄位型別必填說明
audiostring是A mono 16 kHz 16-bit PCM WAV of at most two minutes, base64-encoded.

回應

狀態碼內容說明
200application/json: TranscriptionThe text.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
402application/json: ErrorTRANSCRIPTION_BUDGET_REFUSED: the workspace's monthly audio-minute allowance or a spending limit refuses the audio; nothing was transcribed (configure).
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
413application/json: ErrorThe body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none).
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).