apyhub
AUDIO PROCESSING · FILE CONVERSION

Audio Extractor from Video Job API

What it does

Video Audio Extractor turns a video file or a video URL into an audio extraction job, then gives you a job ID to poll until the output is ready. Use it when you need to pull audio from an uploaded clip or a remote MP4 without handling media processing yourself.

Send a binary video file to POST /file-to-json, or pass a video_url to POST /url-to-json. Both endpoints accept optional duration, full_audio, start_time, and output_format settings so you can extract a short clip or run from a chosen offset to the end of the file. Supported output formats are mp3, wav, aac, ogg, flac, wma, and ac3. Each submission can also include persistent as a query parameter.

The response returns a job_id immediately. Check GET /jobs/:job_id to see whether the job is pending, successful, or failed. When the job succeeds, the status response includes a url for the extracted audio file. This fits workflows like media ingestion, clipping podcast audio from video, or generating audio assets for later transcription and review.

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

QUICKSTART

GUIDE

Quickstart

Upload a video file to start an async audio-extraction job.

curl -X POST "https://api.eu.apyverse.com/apyhub/video-audio-extract/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 — a UUID for polling the job status.

{
  "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 video file for asynchronous audio extraction and returns a job identifier immediately. The job can be checked later using that job_id.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoWhether the job result should be kept persistently.

Request Body

ParameterTypeMandatoryDescription
videoStringYesThe input video 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 job_id is the identifier to use for status polling.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier for status polling. Format: 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. Use the returned job_id 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 02 / 03
POST
Submit audio extraction job (source URL)
https://api.eu.apyverse.com/apyhub/video-audio-extract/url-to-json

QUICKSTART

GUIDE

Quickstart

Submit a video URL to start an async audio extraction job.

curl -X POST "https://api.eu.apyverse.com/apyhub/video-audio-extract/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 — the UUID of the submitted job for later status polling.

{
  "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 URL. The request takes the source video_url in the body and returns a job identifier immediately so you can poll for completion later.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoWhether the job should be persistent.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesSource video URL to extract audio from. 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 as a non-negative integer 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 formatted as a UUID. This is the job identifier for status polling.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier for status polling.

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 03 / 03
GET
Check audio extraction job status
https://api.eu.apyverse.com/apyhub/video-audio-extract/jobs/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of an existing video-audio extract job by its job ID.

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

What you'll get back

Returns a JSON object with a data object. data may include job_id and status always, plus message for pending or failed jobs and url 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 by job ID and returns the job record in a JSON wrapper. When the job is successful, the response includes a URL to the extracted output.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier in UUID format.

Response

Returns a JSON object with a data object field. The data object contains the job's job_id string, status string, optional message string, and optional url string when the job is successful.

ParameterTypeMandatoryDescription
dataObjectNoJob status payload.
data.urlStringNoPresigned or CDN URL to the job output. Present when status is successful.
data.job_idStringNoJob identifier in UUID format.
data.statusENUMNoJob status. 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

Poll this endpoint with the job_id returned by the submit call. The status field cycles through transitional values (pending) before reaching a terminal state (successful or failed). The result field data.url is only populated once status is successful; treat it as absent otherwise.

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.