Skip to main content
POST
/
v1
/
ai
/
audio-isolation
curl --request POST \
  --url https://api.freepik.com/v1/ai/audio-isolation \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '
{
  "description": "A person speaking",
  "audio": "https://example.com/noisy-recording.wav"
}
'
{
"data": {
"generated": [],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}
}

Authorizations

x-freepik-api-key
string
header
required

Your Freepik API key. Required for authentication. Learn how to obtain an API key

Body

application/json
description
string
required

Text description of the sound to isolate from the input audio or video. Be specific about the type of sound you want to extract.

Maximum string length: 2500
Example:

"A person speaking"

audio
string

Audio input - either a publicly accessible HTTPS URL or base64 encoded audio. Supported formats: WAV, MP3, FLAC, OGG, M4A. Mutually exclusive with video.

Example:

"https://example.com/input-audio.wav"

video
string

Video input - either a publicly accessible HTTPS URL or base64 encoded video. Supported formats: MP4, MOV, WEBM, AVI. Mutually exclusive with audio.

Example:

"https://example.com/input-video.mp4"

x1
integer
default:0

Bounding box x1 coordinate (left edge) in pixels for sound source localization. Only applicable for video input.

Required range: x >= 0
Example:

100

y1
integer
default:0

Bounding box y1 coordinate (top edge) in pixels for sound source localization. Only applicable for video input.

Required range: x >= 0
Example:

50

x2
integer
default:0

Bounding box x2 coordinate (right edge) in pixels for sound source localization. Only applicable for video input.

Required range: x >= 0
Example:

400

y2
integer
default:0

Bounding box y2 coordinate (bottom edge) in pixels for sound source localization. Only applicable for video input.

Required range: x >= 0
Example:

300

sample_fps
number
default:2

Frame sampling rate in FPS for video processing. Higher values provide more temporal precision but increase processing time.

Required range: 1 <= x <= 5
Example:

2

reranking_candidates
integer
default:1

Number of reranking candidates for quality vs latency trade-off. Higher values produce better quality but slower processing.

Required range: 1 <= x <= 8
Example:

1

predict_spans
boolean
default:false

Enable span prediction for better isolation of non-ambient sounds like speech or musical notes.

Example:

false

webhook_url
string<uri>

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example:

"https://www.example.com/webhook"

Response

OK - The task exists and the status is returned

data
object
required
Example:
{
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED",
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
]
}