Skip to main content
GET /v1/videos/{id}/content
Downloads the content of a completed video. Can retrieve the video file, thumbnail, or spritesheet.

Path Parameters

id
string
required
The unique identifier of the video.

Query Parameters

variant
string
default:"video"
The type of content to download:
  • video - The generated video file (MP4)
  • thumbnail - A thumbnail image (WebP)
  • spritesheet - A spritesheet preview (JPEG)

Response

Returns the binary content of the requested file with the appropriate Content-Type header:
VariantContent-Type
videovideo/mp4
thumbnailimage/webp
spritesheetimage/jpeg

Examples

Download Video

import requests

video_id = "vid_abc123"

response = requests.get(
    f"https://api.voidai.app/v1/videos/{video_id}/content",
    headers={"Authorization": "Bearer sk-voidai-your_key_here"}
)

with open("output.mp4", "wb") as f:
    f.write(response.content)

print("Video saved as output.mp4")

Download Thumbnail

response = requests.get(
    f"https://api.voidai.app/v1/videos/{video_id}/content",
    headers={"Authorization": "Bearer sk-voidai-your_key_here"},
    params={"variant": "thumbnail"}
)

with open("thumbnail.webp", "wb") as f:
    f.write(response.content)

Download Spritesheet

response = requests.get(
    f"https://api.voidai.app/v1/videos/{video_id}/content",
    headers={"Authorization": "Bearer sk-voidai-your_key_here"},
    params={"variant": "spritesheet"}
)

with open("spritesheet.jpg", "wb") as f:
    f.write(response.content)

Complete Download Workflow

import time
import requests

headers = {"Authorization": "Bearer sk-voidai-your_key_here"}
base_url = "https://api.voidai.app/v1/videos"

# 1. Create video
create_response = requests.post(
    base_url,
    headers=headers,
    data={
        "model": "sora-2",
        "prompt": "A timelapse of clouds moving over a mountain",
        "size": "1920x1080",
        "seconds": "10"
    }
)
video_id = create_response.json()["id"]
print(f"Created video: {video_id}")

# 2. Wait for completion
while True:
    status_response = requests.get(f"{base_url}/{video_id}", headers=headers)
    status = status_response.json()["status"]

    if status == "completed":
        print("Video completed!")
        break
    elif status == "failed":
        print(f"Failed: {status_response.json().get('error')}")
        exit(1)

    print(f"Status: {status}")
    time.sleep(15)

# 3. Download all variants
variants = ["video", "thumbnail", "spritesheet"]
extensions = {"video": "mp4", "thumbnail": "webp", "spritesheet": "jpg"}

for variant in variants:
    response = requests.get(
        f"{base_url}/{video_id}/content",
        headers=headers,
        params={"variant": variant}
    )

    filename = f"output.{extensions[variant]}"
    with open(filename, "wb") as f:
        f.write(response.content)

    print(f"Downloaded {variant} as {filename}")
The video must have a completed status before downloading. Attempting to download a pending or failed video will return an error.