apyhub
AUDIO PROCESSING · FILE CONVERSION

Audio Extractor from Video Job API

Hosted on ApyHub

What it does

Video Audio Extractor takes a video URL or uploaded video file and submits an async job to extract audio in your chosen format. Send video_url to /url-to-json or video to /file-to-json, and you get back a job_id you can poll until the output is ready.

You can control the extraction window with start_time, duration, and full_audio. By default, the service extracts a 2-second clip; set full_audio to extract from start_time to the end of the file. Choose one of the supported output formats: mp3, wav, aac, ogg, flac, wma, or ac3.

When the job finishes, GET /jobs/:job_id returns the job status and, on success, a url to the extracted audio file. Pending and failed jobs include a human-readable message, which makes it straightforward to track automated media workflows.

Use Video Audio Extractor when you need to pull a soundtrack from a clip, convert a video asset into audio for downstream processing, or generate a short sample from a larger file for review and testing.

▣ ENDPOINT 01 / 03
POST
Submit audio extraction job (source URL)
http://localhost:8080/apyhub/audio-extract-from-video/url-to-json
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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.

Query parameters

Name
Type
Description
persistentOPTIONAL
boolean

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 03
POST
Submit audio extraction job (multipart file)
http://localhost:8080/apyhub/audio-extract-from-video/file-to-json
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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*
Clip length in seconds. Default **2** unless `full_audio` is true.
Set to `true` or `1` to extract from `start_time` to end of file.
Seek offset in seconds. Default **0**.

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

Query parameters

Name
Type
Description
persistentOPTIONAL
boolean

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 / 03
GET
Check audio extraction job status
http://localhost:8080/apyhub/audio-extract-from-video/jobs/:job_id
QUICKSTARTGUIDE

Quickstart

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

curl -X GET "http://localhost:8080/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.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ 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.