API Reference
The VidioClient is the main entry point for interacting with the VIDIO API from Python. Use it to upload files, create highlight reel jobs, check job status, render outputs, and wait for processing to complete.
The client model
The VidioClient provides a simple interface for working with the VIDIO API. After creating a client with your API key, you can upload input files, create highlight reel jobs, poll job status, render outputs, and wait for jobs to finish.
Properties
Methods
VidioClient(api_key)Initialize client
Creates a new VidioClient instance.
Parameters
Returns
A configured VidioClient instance.
from vidio import VidioClient
import os
client = VidioClient(
api_key=os.getenv("VIDIO_API_KEY")
)client.upload(file_path)Upload file
Uploads a local file to VIDIO and returns an upload result containing the input key.
Parameters
Returns
An upload result object containing `input_key`.
result = client.upload("/path/to/video.mp4")
print(result.input_key)client.create_highlight_reel(input_keys, video_category, output_length, aspect_ratio, music_category=None, music_volume=None, original_audio_volume=None)Create highlight reel
Creates a highlight reel job from one or more uploaded input files.
Parameters
upload(). The order of input keys determines the order of media in the output video.ball-sports. It can be podcast, ball-sports, non-ball-sports, beauty-product-demo, wedding, travel, others. For best results, specify the category that most closely matches your content. If your content doesn't fit any category, use others.landscape, portrait, or square.corporate, romantic, sports, kids_and_comedy, ambient_and_nature, horror_and_suspense, documentary, and trending_vlogs. If the output duration is shorter than the music duration, the selected track will loop to fit the output.0 to 100. If not provided, the default is 100.0 to 100. If not provided, the default is 100.Returns
A job object containing `job_id` and status information.
job = client.create_highlight_reel(
input_keys=[result.input_key],
video_category="ball-sports",
output_length=30,
aspect_ratio="landscape",
music_category="sports",
music_volume=70,
original_audio_volume=100,
)
print(job.job_id)
print(job.status)client.get_job(job_id)Get job
Fetches the current status of a job. When the job has been rendered, the response can also include structured output data for the last sub-job, including outputs and overlays.
Parameters
Returns
A job object with the latest status. If rendering is complete, it may also include `outputs` for the last sub-job.
Response fields
submitted, queued, processing, processed, rendering, or rendered.video or sound.job_status = client.get_job(job.job_id)
print(job_status.status)
for output in job_status.outputs:
print(output.thumbnail)
print(output.duration)
for overlay in output.overlays:
print(overlay.type, overlay.src){
"job_id": "abc123",
"status": "rendered",
"outputs": [
{
"start": null,
"end": null,
"thumbnail": "out/...jpg",
"duration": 15.22,
"overlays": [
{
"id": 0,
"fileID": "file_123",
"from": 0,
"content": "https://...",
"durationInFrames": 284,
"type": "video",
"src": "https://...",
"videoStartTime": 5425
},
{
"id": 876361,
"from": 0,
"content": "running-night-393139",
"durationInFrames": 912,
"type": "sound",
"src": "https://..."
}
],
"fps": 59.94
}
]
}client.wait_for_job(job_id)Wait for job
Polls the API until the highlight reel job reaches a completed state.
Parameters
Returns
The final completed job object.
final_job = client.wait_for_job(job.job_id)
print(final_job.status)client.render(job_id, output_index=0)Render output
Starts rendering an output video for a completed highlight reel job. Use `output_index` to select which item from the `OutputResult` list to render. In general, the first output is the best result.
Parameters
OutputResult list to render. The default is 0. In general, the first output is the best result.Returns
A render result object with render status.
render_result = client.render(
job_id=job.job_id,
output_index=0,
)
print(render_result.status)client.wait_for_render(job_id)Wait for render
Polls until the render finishes and the output is ready.
Parameters
Returns
The final render result object.
final_render = client.wait_for_render(job.job_id)
print(final_render.output_url)