apyhub
AUDIO PROCESSING · FILE CONVERSION

Audio Extractor from Video API

Hosted on ApyHub

What it does

Video Audio Extractor pulls audio from a video file or a video URL and returns it as a downloadable audio file or a time-limited signed link.

Send a video upload through the multipart endpoints, or pass a video_url to the URL endpoints. You can extract a short segment with duration and start_time, or set full_audio to extract the complete audio track. The output format can be set to mp3, wav, aac, ogg, flac, wma, or ac3.

Use Video Audio Extractor when you need audio from clips for speech workflows, media processing, or archive handling. The download endpoints return the audio as binary data. The link endpoints return an object with a data field containing a time-limited signed URL for retrieval.

If your app stores videos in cloud storage, the URL-based endpoints avoid file upload overhead. If you're processing local media, the multipart endpoints let you send the file directly and get the extracted audio back in the format you need.

▣ ENDPOINT 01 / 04
POST
Extract audio from video (upload → download)
http://localhost:8080/apyhub/extract-audio-from-video/multi-part/download
QUICKSTARTGUIDE

Quickstart

Upload a video file to extract audio from it.

curl -X POST "http://localhost:8080/apyhub/extract-audio-from-video/multi-part/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4"

What you'll get back

Returns a binary file (string with format: binary) containing the extracted audio.

...audio bytes...
TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Video file (.mp4 .mkv .avi .mov .flv .3gp .webm)
Number of seconds to extract. Ignored when `full_audio` is true.
When true, extract the complete audio track.
Seek offset in seconds.

About this endpoint

What it does

Uploads a video file and returns the extracted audio as a binary file download. You can control the extraction length, start offset, whether to extract the full audio track, and the output audio format.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file to process. Supported formats: .mp4, .mkv, .avi, .mov, .flv, .3gp, .webm.
durationIntegerNoNumber of seconds to extract. Default: 2. Minimum: 0. Ignored when full_audio is true.
full_audioENUMNoWhether to extract the complete audio track. Allowed values: true, false, 1, 0. Default: false.
start_timeIntegerNoSeek offset in seconds. Default: 0. Minimum: 0.
output_formatENUMNoOutput audio format. Allowed values: mp3, wav, aac, ogg, flac, wma, ac3. Default: mp3.

Response

Returns a binary file download containing the extracted audio. The success response body is a single binary string, not a JSON object.

ParameterTypeMandatoryDescription
binaryStringYesThe extracted audio file content returned by the endpoint.

Notes

This endpoint returns raw binary output rather than JSON, so clients should handle the response as a file download or binary stream.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 04
POST
Extract audio from video (upload → cloud link)
http://localhost:8080/apyhub/extract-audio-from-video/multi-part/link
QUICKSTARTGUIDE

Quickstart

Upload a video file to extract audio and return a signed download URL.

curl -X POST "http://localhost:8080/apyhub/extract-audio-from-video/multi-part/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4"

What you'll get back

Returns a JSON object with a data string field containing a time-limited signed URL for download.

{
  "data": "https://..."
}
TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Extracts audio from an uploaded video and returns a JSON object containing a time-limited signed URL for downloading the extracted audio.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file to process, sent as binary upload.
durationIntegerNoDuration in seconds to extract. Default: 2. Minimum: 0.
full_audioENUMNoWhether to extract the full audio track. Allowed values: true, false, 1, 0. Default: false.
start_timeIntegerNoStart time in seconds for the extraction. Default: 0. Minimum: 0.
output_formatENUMNoOutput audio format. Allowed values: mp3, wav, aac, ogg, flac, wma, ac3. Default: mp3.

Response

Returns a JSON object with a data string field containing a URI. The data value is a time-limited signed URL for downloading the extracted audio.

ParameterTypeMandatoryDescription
dataStringNoTime-limited signed URL for download.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 03 / 04
POST
Extract audio from video (URL → download)
http://localhost:8080/apyhub/extract-audio-from-video/url/download
QUICKSTARTGUIDE

Quickstart

Download audio from a video URL using the required video_url field.

curl -X POST "http://localhost:8080/apyhub/extract-audio-from-video/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://assets.apyhub.com/samples/sample.mp4"
  }'

What you'll get back

Returns the extracted audio as a binary file response.

TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Number of seconds to extract. Ignored when full_audio is true.
Seek offset in seconds (string).

About this endpoint

What it does

Extracts audio from a video provided by URL and returns the resulting audio as a binary file download. You can extract either a segment or the full audio, and choose the output format.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesVideo URL to extract audio from. Must be a URI.
durationStringNoNumber of seconds to extract. Default: 2. Ignored when full_audio is true.
full_audioBooleanNoWhether to extract the full audio. Default: false.
start_timeStringNoSeek offset in seconds. Default: 0.
output_formatENUMNoOutput audio format. Allowed values: mp3, wav, aac, ogg, flac, wma, ac3. Default: mp3.

Response

Returns a binary file download (string with binary format). The success response is the extracted audio file itself, not a JSON object.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.