/uploads/presignMint a single-use presigned PUT URL for large files. Expires in 1 hour.
Presign an Upload
Mints a presigned PUT URL for the given upload kind. Returns the URL, an upload_id to pass to the consuming endpoint, and the expected Content-Type to use on the PUT.The upload_id is an opaque signed token (JWT) — treat it as a bearer string. Do not pattern-match on prefix or length; the format may change. Pass it back verbatim to the consuming endpoint.The upload_id is single-use; once consumed by a resource endpoint, it cannot be reused. Unused IDs expire after 1 hour.
Request body
4kindstringrequiredUpload kind. One of:
doc/knowledge-base(knowledge-base file for an agent),audio/transcribe(audio file for transcription),audio/voice-clone(WAV recording for a voice clone).content_typestringrequiredMIME type your client will send on the PUT. The presigned URL is bound to this type; if you
PUTa different content-type, storage will reject.filenamestringoptionalOriginal filename. Carried through to the consuming endpoint so the resource record keeps a meaningful name. Optional but recommended.
size_hintintegeroptionalExpected file size in bytes. Must be between
0and1073741824(1 GiB) inclusive. The server currently validates the range but does not echo the value back in the response; treat it as a forward-compatible hint.
Errors
3Missing or invalid API key.
Send X-API-Key: '<'api_key'>'.
The API key does not carry the scope required by the chosen kind. For example, doc/knowledge-base requires agents:write; audio/transcribe requires transcribe:use; audio/voice-clone requires voices:write.
Issue a new key with the scope the upload kind requires, then retry.
kind is missing or not one of the supported values (doc/knowledge-base, audio/transcribe, audio/voice-clone).
Send one of the supported kind values.
