Skip to main content
Create an asynchronous audio compression job from an uploaded .mp3 or .wav file. Audio always runs queued: the endpoint responds with HTTP 202 Accepted and a job object { id, status }.

Request

Authorization
string
required
Bearer sk_live_...
Idempotency-Key
string
Optional, 1–255 characters. Returns the existing job if a job with this key was already created.
audioId
string
required
Id of an upload, must be an audio file (.mp3 or .wav).
preset
string
One of chill, medium, aggressive, podcast, lecture. Either preset or operations is required.
operations
array
1–10 custom operations, applied in order. See below.
webhookUrl
string
URL to receive job.completed / job.failed events for this job. Requires a plan with webhooks.

Presets

Operations

Encoding rules:
  • If your chain has no encode operation, one is appended with defaults (Opus, 24 kbps, mono).
  • encode always runs last, regardless of where you place it. If several are sent, the last one wins.
  • Output is .ogg (Opus) by default, the best quality per bitrate for voice. Pass {"type": "encode", "params": {"format": "mp3"}} for .mp3 when you need broad compatibility.
GET /v1/audio/presets and GET /v1/audio/operations return these definitions as JSON.

Examples

Preset
Custom operations, MP3 output

Results

Poll GET /v1/jobs/:id (ideally with ?wait=25 to long-poll) until status is completed, then download result.outputUrl (signed, 1-hour validity, regenerated on every read). Results are retained for 7 days.

Credits

1 credit per started 5 MB of input, reserved when the job is created and refunded if it ultimately fails. See Credits.