Upload Audio Asset

Beta
Upload a new audio asset. The body is a multipart/form-data request with a single `file` field carrying the WAV bytes. The WAV is validated server-side against a strict format contract — PCM 16-bit signed, mono, 48000 Hz, ≤30s, ≤4 MiB — before any bytes hit storage. The format matches what voice agents play back natively, so clips stream with no transcoding; convert MP3 sources with `ffmpeg -i in.mp3 -ar 48000 -ac 1 -sample_fmt s16 out.wav`.

Authentication

AuthorizationBearer

Enter your API key with the Bearer prefix, e.g. ‘Bearer sk_…’.

Headers

Speechify-VersionstringOptional

Request

This endpoint expects a multipart form containing a file.
filefileRequired

The WAV file bytes. Must be PCM 16-bit signed, mono, 48000 Hz, ≤30s duration, ≤4 MiB total.

Response headers

X-Request-IDstring
Unique identifier for this request, present on every response (2xx and non-2xx alike). If the caller sends an `X-Request-ID` request header the server echoes it back (sanitized and length-capped) so one logical request can be traced end-to-end; otherwise the server generates a fresh value. Log it on every response and quote it in support requests - it is the stable handle that ties your observation to Speechify's server-side logs, and it matches the `request_id` field in the error envelope.

Response

The uploaded asset's metadata.
idstringformat: "^audio_[0-9a-hjkmnp-tv-z]{26}$"

Prefixed wire identifier (audio_<26 char Crockford base32>). URL paths accept only this prefixed form; legacy UUID path parameters are rejected with 404.

original_filenamestring
The filename supplied at upload time, kept for display.
content_typestring

Always audio/wav. Pinned server-side after WAV validation rather than trusting the upload’s multipart Content-Type header.

size_bytesinteger
Stored byte length. Capped at 4 MiB at upload time.
duration_msinteger

Clip duration in milliseconds. Capped at 30000 (30s) at upload time.

sample_rate_hzinteger

WAV sample rate. Always 48000 (the rate voice agents play back natively).

channelsinteger

Channel count. Always 1 (mono).

bit_depthinteger
PCM sample bit depth. Always 16.
created_atdatetime

Errors

400
Bad Request Error
401
Unauthorized Error