POST /v1/audio-enhancement
Audio enhancement
Rebuild a damaged recording and return a download link for the enhanced file.
POST https://api.pascalai.co/v1/audio-enhancementContent-Type: multipart/form-data
Authenticate with Authorization: Bearer and an API key. Send model before file. The file must be under 500 MB. The call remains open for up to 4 minutes. When processing has finished inside that window, the body is the job. When status is queued or running, retrieve the same object with GET /v1/audio-enhancement/{job_id}. The fields for the current model are on its model page.
| Field | Type | Description |
|---|---|---|
modelRequired | string | Catalogue id. The current model is voicefixer. This part must be sent before the file. |
fileRequired | file | Audio file to enhance. The file must be under 500 MB. |
params | string | JSON object for that model, encoded as a string. Omit the field, or send an empty string, to use the defaults. The value must be a JSON object. |
name | string | Optional label stored on the job and returned as name. |
Response
200 with the job. A successful file is charged $0.05 plus the audio duration in minutes. result.artifacts contains the enhanced file. url is the download link. Download the file within one day. The file is deleted after that. The job record remains.
Batch
POST /v1/audio-enhancement/batch
Enhance up to 50 files in a single request. All files use the same model and the same parameters. Send model, then params, then each audio file as a part named file. Each file must be under 500 MB.
The response contains the batch identifier. Retrieve progress with GET /v1/audio-enhancement/batch/{batch_id}. An account may have two open batches. A successful batch is charged $0.05 once. Each file is charged for its audio duration in minutes.
Example
curl https://api.pascalai.co/v1/audio-enhancement \
-H "Authorization: Bearer $PASCAL_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-F model=voicefixer \
-F params='{"output_format":"mp3"}' \
-F file=@damaged.wav
curl https://api.pascalai.co/v1/audio-enhancement/$JOB_ID \
-H "Authorization: Bearer $PASCAL_API_KEY"Models
voicefixerReconstructs damaged speech.