File uploads
Create a resumable audio upload
POST
Creates a bounded, workspace-owned upload session for the original audio file. Upload bytes directly to signed storage URLs, rather than through the API.
The session expires after 24 hours. Outstanding upload and byte budgets are checked before storage access is issued.
Keep one stable Idempotency-Key for this logical upload. An ambiguous retry with the same payload returns its identity; changing the payload conflicts. See file jobs.
inferenceBearerAuthheader
AuthorizationBearer <token>Use an Inference API key. Access and keys.
Idempotency-Key*stringRequired. Reuse the same key to retry this write safely. Retries and idempotency.
Match
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$Length
1 <= length <= 255application/json- body
filename*stringLength
1 <= length <= 255size_bytes*integerRange
1 <= value <= 5368709120content_type*stringLength
1 <= length <= 255Create a resumable audio upload
application/json- response
id*stringFormat
uuidstatus*stringValue in
"initiating""uploading""completing""ready""aborted""expired"filename*stringsize_bytes*integerRange
1 <= value <= 5368709120part_size_bytes*integerexpires_at*stringFormat
date-timeparts*array<>curl -X POST 'https://api.kejue.co/v1/inference/uploads' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "filename": "string", "size_bytes": 1, "content_type": "string"}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "initiating", "filename": "string", "size_bytes": 1, "part_size_bytes": 16777216, "expires_at": "2019-08-24T14:15:22Z", "parts": [ { "part_number": 1, "etag": "string", "size_bytes": 1, "checksum_sha256": "string" } ]}