apyhub
FILE CONVERSION · FILE MANIPULATION

Convert Video Formats Job API

Hosted on ApyHub

What it does

Video Format Converter lets you submit a video file or a video URL, choose a target format, and get a conversion job back. It supports mp4, mkv, avi, mov, flv, 3gp, and webm output.

Use the file upload endpoint when the source video is already in your request body, or the URL endpoint when you want the service to download the video from an HTTP(S) address first. In both cases, you can set persistent to control whether the generated file is kept after processing.

Each conversion request returns a job_id so you can track processing asynchronously. When you check job status with that ID, the response includes the same job_id, a status value of pending, successful, or failed, and a message with status details or an error description.

This is a good fit when you need to normalize user-uploaded videos, convert assets for a specific player or pipeline, or prepare media files in a format that downstream systems expect.

▣ ENDPOINT 01 / 03
POST
Submit format conversion job (file upload)
http://localhost:8080/apyhub/convert-video-formats-job/file-to-json
QUICKSTARTGUIDE

Quickstart

Upload a video and choose the output format to start a conversion job.

curl -X POST "http://localhost:8080/apyhub/convert-video-formats-job/file-to-json" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4" \
  -F "output_format=mp4"

What you'll get back

Returns a JSON object with a job_id string field in UUID format.

{
  "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*
Video file to convert.
Whether the generated file should be persisted after processing.
Target output format.

About this endpoint

What it does

Submits a video file for format conversion and starts an asynchronous job. The request uploads the source video and selects a target output format; the response returns a job identifier you can use to track the conversion.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file to convert. Binary upload.
persistentBooleanNoWhether the generated file should be persisted after processing. Default: false.
output_formatENUMYesTarget output format. Allowed values: mp4, mkv, avi, mov, flv, 3gp, webm.

Response

Returns a JSON object with a job_id string field. The job_id is a UUID you can use to poll the conversion job status.

AttributeTypeMandatoryDescription
job_idStringNoJob identifier for the conversion task. 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. Extract the job id from job_id.

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 format conversion job (source URL)
http://localhost:8080/apyhub/convert-video-formats-job/url-to-json
QUICKSTARTGUIDE

Quickstart

Convert a video from a public URL by sending the source link and your desired output format.

curl -X POST "http://localhost:8080/apyhub/convert-video-formats-job/url-to-json" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://assets.apyhub.com/samples/sample.mp4",
    "output_format": "mp4"
  }'

What you'll get back

Returns a JSON object with a job_id string field containing the UUID of the conversion 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*
HTTP(S) URL of the source video to download and convert.
Whether the generated file should be persisted after processing.
Target output format.

About this endpoint

What it does

Submits a video format conversion job using a source video URL and a target output format. The endpoint returns a job identifier that you can use to track the async conversion.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesHTTP(S) URL of the source video to download and convert.
persistentBooleanNoWhether the generated file should be persisted after processing. Default: false.
output_formatENUMYesTarget output format. Allowed values: mp4, mkv, avi, mov, flv, 3gp, webm.

Response

Returns a JSON object with a job_id string field formatted as a UUID. This is the identifier for the submitted conversion job.

ParameterTypeMandatoryDescription
job_idStringNoJob identifier for the conversion request. 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. Extract the job_id field from the response.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 03
GET
Check format conversion job status
http://localhost:8080/apyhub/convert-video-formats-job/jobs/:job_id
QUICKSTARTGUIDE

Quickstart

Check the status of a video conversion job by its UUID.

curl -X GET "http://localhost:8080/apyhub/convert-video-formats-job/jobs/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. The data object can include job_id (string UUID), status (pending, successful, or failed), url (string URI for the processed file when successful), and message (string with status details or an error description).

{
  "data": {
    "job_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "successful",
    "url": "https://example.com/converted-video.mp4",
    "message": "Job completed successfully."
  }
}
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 a video format conversion job using its job_id. The response returns a JSON object containing a data object with the job’s current status and related fields.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier, UUID format.

Response

Returns a JSON object with a data object field. Inside data, job_id is a UUID string, status is a string enum, and message and url are strings; url is provided as the download URL for the processed file when the job is successful. Success status code: 200.

AttributeTypeMandatoryDescription
dataObjectNoJob status payload containing job_id, status, message, and url.
data.job_idStringNoJob identifier, UUID format.
data.statusENUMNoJob status. Allowed values: pending, successful, failed.
data.messageStringNoStatus message or error description.
data.urlStringNoDownload URL for the processed file when status is successful.

Notes

Poll this endpoint with the job_id returned by the submit call. The status field cycles through pending before reaching a terminal state (successful or failed). The url field is only provided when 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.