Skip to content
中文

Download video content

Call Create video first and replace video_123 with its ID; poll until completed before downloading.

GET/openai/v1/videos/{video_id}/content● Supported

Official OpenAI docs ↗

Request parameters

  • video_idstringrequired

    path: Id of the video job whose output you want, the id returned by createVideo. The job must be completed; before that the call answers 400.

  • variantanyoptional◐ Partially supported
    default "video"

    query: Spritesheet is not available in this release (400).

    video and thumbnail work; spritesheet returns 400.

    values videothumbnailspritesheet
  • indexintegeroptional◐ Partially supported

    query: Output index; this release produces index 0. variant takes precedence.

    Video supports index=0 only; positive or negative indices return 400. With variant=thumbnail, index is accepted but currently ignored.

Returns

200

Downloads the video file (video, MP4) or the thumbnail (thumbnail) once the job is completed; spritesheet returns 400 and index supports 0 only. An unknown job returns 404.

Errors follow the OpenAI format — see error codes

Request

curl
# Call Create video first and replace video_123 with its ID; poll until completed before downloading.
curl https://api.deepraxis.com/openai/v1/videos/video_123/content \
  -H "Authorization: Bearer $PRAXIS_API_KEY" --output video.mp4
Python
# Call Create video first and replace video_123 with its ID; poll until completed before downloading.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/openai/v1",
    api_key="$PRAXIS_API_KEY",
)

content = client.videos.download_content("video_123")
content.write_to_file("video.mp4")
TypeScript
// Call Create video first and replace video_123 with its ID; poll until completed before downloading.
import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({
  baseURL: "https://api.deepraxis.com/openai/v1",
  apiKey: "$PRAXIS_API_KEY",
});

const content = await client.videos.downloadContent("video_123");
await fs.promises.writeFile("video.mp4", Buffer.from(await content.arrayBuffer()));

Response 200

{
  "content_type": "video/mp4",
  "bytes": 2756743
}

Response

HTTP 200

Video or thumbnail bytes

video/mp4

Name Type Description
$ string (binary)

image/jpeg

Name Type Description
$ string (binary)