Skip to main content

Video APIs

Overview

Video generation is asynchronous. Use this lifecycle:
  1. Submit a job (POST /v1/videos)
  2. Poll status (GET /v1/videos/{id})
  3. Download output (GET /v1/videos/{id}/content)

Base URL

https://api.sciforium.com/v1

Authentication

Include your API token in the headers:
  • Authorization: Bearer <TOKEN>
  • x-api-key: <TOKEN>

Supported Endpoints

MethodPathPurpose
POST/videosCreate a video job
GET/videos/{id}Get video job status
GET/videos/{id}/contentDownload video content (MP4)
GET/videosList video jobs
DELETE/videos/{id}Delete a video job

1) Create Video Job

Method: POST
Endpoint: https://api.sciforium.com/v1/videos
Content-Type: multipart/form-data
Success Status: 201 Created

Request fields

FieldTypeRequiredDescription
promptstringYesPrompt text (1..32000 chars).
modelstringYesVideo model ID.
secondsstringNoDuration in seconds: 2, 4, 8, 12. Default: 4.
sizestringNoOne of 720x1280, 1280x720, 1024x1792, 1792x1024, 640x480, 480x640. Default: 720x1280.
input_referencefileNoOptional reference image for image-to-video flows.

Example cURL (text-to-video)

curl -X POST "https://api.sciforium.com/v1/videos" \
  -H "Authorization: Bearer $TOKEN" \
  -H "x-api-key: $TOKEN" \
  -F "model=Wan-AI/Wan2.2-T2V-A14B-Diffusers" \
  -F "prompt=A cinematic drone shot over mountain ridges at sunrise" \
  -F "seconds=4" \
  -F "size=640x480"

2. Check the Status: GET /v1/videos/

Since you don’t know exactly when the video will be finished, you “poll” this endpoint (requesting it every 5–10 seconds) or wait for a Webhook notification if you have one configured.

The Response

The status field is the most important part of this response.
StatusMeaning
queuedWaiting for available compute.
in_progressThe model is currently rendering frames.
completedThe video is ready for download.
failedSomething went wrong (check the error field).
Example of a completed status:
{
  "id": "vid_abc123xyz",
  "status": "completed",
  "progress": 1.0,
  "expires_at": 1775701400 
}
Note: Most completed videos are only stored on OpenAI’s servers for 24 hours before they are deleted for privacy and storage reasons.

3. Retrieve the File: GET /v1/videos//content

Once the status is completed, you call this final endpoint to get the actual media.

The Response

Unlike the other two endpoints which return JSON, this endpoint returns the binary data of the video file (usually an .mp4). Content-Type: video/mp4 Behavior: In a browser or code, this will trigger a download or allow you to stream the bytes directly into a file buffer.