apyhub
Back
▣ AUDIO PROCESSING · FILE CONVERSION

Audio Extractor from Video Job API

Hosted on ApyHub

What it does

The Extract Audio from Video Job API pulls the audio track out of long or large videos as a background job. Submit a video file or URL, get a job ID right away, and check the job status until your audio is ready to download in MP3, WAV, AAC, OGG, FLAC, WMA, or AC3.

Use it when videos are too long to process within a single request, such as full recordings, webinars, and lectures, or when you're processing many videos in a queue and don't want your app to wait for each one.

For short videos you want to convert immediately, use the Extract Audio from Video API, which returns the audio in the same request.

You can start on ApyHub's free tier with no card required.

▣ ENDPOINT 01 / 03
POST
Submit audio extraction job (source URL)
https://api.eu.apyhub.com/apyhub/audio-extract-from-video/url-to-json

QUICKSTART

GUIDE

Quickstart

Submit a video URL to start extracting audio and get back a job ID you can poll later.

curl -X POST "https://api.eu.apyhub.com/apyhub/audio-extract-from-video/url-to-json" \
  -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 a JSON object with a job_id string field — the UUID of the submitted async job.

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}
TRY ITLIVE · 400 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*
Clip length in seconds. Default 2 unless full_audio is true.
When true, extract from start_time to end of file.
Seek offset in seconds (non-negative integer as string). Default 0.

About this endpoint

What it does

Submits an async job to extract audio from a video at a source URL. It returns a job identifier immediately so you can poll for completion separately.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoControls whether the job is persistent.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesThe source video URL. Must be a URI.
durationStringNoClip length in seconds. Default 2 unless full_audio is true.
full_audioBooleanNoWhen true, extract from start_time to end of file. Default false.
start_timeStringNoSeek offset in seconds (non-negative integer as a string). Default 0.
output_formatENUMNoOutput audio format. Allowed values: mp3, wav, aac, ogg, flac, wma, ac3. Default mp3.

Response

Returns a JSON object with a job_id string field — a UUID job identifier used for status polling.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier for status polling. Must be a UUID.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job_id value from the response body.

▣ ENDPOINT 02 / 03
POST
Submit audio extraction job (multipart file)
https://api.eu.apyhub.com/apyhub/audio-extract-from-video/file-to-json

QUICKSTART

GUIDE

Quickstart

Upload a video file to start an async audio-extraction job and get back a job ID.

curl -X POST "https://api.eu.apyhub.com/apyhub/audio-extract-from-video/file-to-json" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4"

What you'll get back

Returns a JSON object with a required job_id string field, which is the UUID you can use to poll job status later.

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}
TRY ITLIVE · 400 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*
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

Submits a multipart video file for audio extraction and starts an asynchronous job. The response returns a job identifier that you use to poll for completion.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoOptional query flag.

Request Body

ParameterTypeMandatoryDescription
videoBinaryYesVideo file to extract audio from. Binary upload.
durationStringNoClip length in seconds. Default 2 unless full_audio is true.
full_audioStringNoSet to true or 1 to extract from start_time to the end of the file.
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 JSON object with a job_id string field formatted as a UUID. This is the job identifier to use for status polling.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier for status polling. UUID format.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job_id field from the response and use it for polling.

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

▣ ENDPOINT 03 / 03
GET
Check audio extraction job status
https://api.eu.apyhub.com/apyhub/audio-extract-from-video/jobs/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of an audio-extraction job by its job ID.

curl -X GET "https://api.eu.apyhub.com/apyhub/audio-extract-from-video/jobs/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. The data object may include job_id (string), status (pending, successful, or failed), message (string), and url (string) when the job is successful.

{
  "data": {
    "job_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "successful",
    "url": "https://assets.apyhub.com/samples/sample.mp4"
  }
}
TRY ITLIVE · 5 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.

About this endpoint

What it does

Checks the status of an audio extraction job submitted earlier and returns the current job information in a JSON data object, including the job ID, status, and, when successful, the output URL.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier in UUID format.

Response

Returns a JSON object with a data object field. The data object contains job_id as a UUID string, status as a string enum, and optionally url and message depending on the job state.

ParameterTypeMandatoryDescription
dataObjectYesWrapper object for the job status details.
data.urlStringNoPresigned or CDN URL to the job output. Present when status is successful.
data.job_idStringNoJob identifier in UUID format.
data.statusENUMNoJob state. Allowed values: pending, successful, failed. pending while submitted or processing, successful when output is ready, failed when the worker marked the job failed.
data.messageStringNoHuman-readable status message for pending or failed responses.

Notes

This endpoint is the job-check step for an asynchronous workflow. Poll it with the job_id from the submit call; data.status can be pending, successful, or failed, and the output data.url is only present when data.status is successful.

▣ 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.