Skip to Content
API ReferenceAttemptPOST /audio_upload

POST /attempt/audio_upload

Upload Audio

Upload audio or promote an existing raw upload.

Three shapes:

  • File only → multipart file: server writes bytes, creates uploads_entry + full audio chain on top.
  • upload_id only?upload_id=<uuid> of an existing upload (e.g. raw bytes captured by the realtime adapter). Server reuses the upload and stacks resource + entry + junctions on top.
  • upload_id + file → client pre-reserved via /attempt/audio/new and now fills the slot. Server writes bytes into that upload’s file and then runs the full chain.

Returns \{audio_id, audios_id, upload_id\}. Client only needs audios_id; upload_id is the primitive handed back.

Parameters

NameInRequiredDescription
upload_idqueryNo

Request Body

FieldTypeRequiredDescription
filestringNo
length_secondsintegerNo
namestringNo
descriptionstringNo
idempotency_keystringNo
softbooleanNo
acceptbooleanNo

Response (AudioUploadAttemptApiResponse)

FieldTypeRequiredDescription
audio_idstringYesUUID of the audios_entry (server plumbing; public handle is audios_id)
audios_idstringYesUUID of the audios_resource — use this for /generate, /chat/message, download
upload_idstringYesUUID of the uploads_entry (primitive raw file)
idempotency_keystringNoServer-minted soft-call key; echo with accept to promote/reject the staged upload.
Last updated on