curl https://api.lumenfall.ai/openai/v1/videos/video_abc123 \
-H "Authorization: Bearer $LUMENFALL_API_KEY"
import time
from openai import OpenAI
client = OpenAI(
api_key="your-lumenfall-api-key",
base_url="https://api.lumenfall.ai/openai/v1"
)
# Poll until the video is ready
video_id = "video_abc123"
while True:
video = client.videos.retrieve(video_id)
if video.status == "completed":
print(video.output.url)
break
elif video.status == "failed":
print(f"Error: {video.error.message}")
break
time.sleep(5)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-lumenfall-api-key",
baseURL: "https://api.lumenfall.ai/openai/v1",
});
// Poll until the video is ready
const videoId = "video_abc123";
while (true) {
const video = await client.videos.retrieve(videoId);
if (video.status === "completed") {
console.log(video.output.url);
break;
} else if (video.status === "failed") {
console.error(`Error: ${video.error.message}`);
break;
}
await new Promise((r) => setTimeout(r, 5000));
}
{
"id": "video_abc123",
"object": "video",
"created_at": 1702345678,
"completed_at": null,
"expires_at": null,
"status": "in_progress",
"model": "sora-2",
"prompt": "A capybara lounging in a hot spring, steam rising gently, slow camera pan",
"seconds": "10",
"size": "1920x1080",
"output": null,
"error": null,
"metadata": {
"model": "sora-2",
"executed_model": "openai/sora-2",
"provider": "openai",
"provider_name": "OpenAI",
"cost_estimate": 0.21,
"cost_currency": "USD"
}
}
{
"id": "video_abc123",
"object": "video",
"created_at": 1702345678,
"completed_at": 1702345720,
"expires_at": 1702432120,
"status": "completed",
"model": "sora-2",
"prompt": "A capybara lounging in a hot spring, steam rising gently, slow camera pan",
"seconds": "10",
"size": "1920x1080",
"output": {
"url": "https://media.lumenfall.ai/video_abc123.mp4",
"content_type": "video/mp4",
"size_bytes": 15728640
},
"error": null,
"metadata": {
"model": "sora-2",
"executed_model": "openai/sora-2",
"provider": "openai",
"provider_name": "OpenAI",
"cost": 0.21,
"cost_currency": "USD"
}
}
Videos
Get video
Check the status of a video generation request
GET
/
openai
/
v1
/
videos
/
{id}
curl https://api.lumenfall.ai/openai/v1/videos/video_abc123 \
-H "Authorization: Bearer $LUMENFALL_API_KEY"
import time
from openai import OpenAI
client = OpenAI(
api_key="your-lumenfall-api-key",
base_url="https://api.lumenfall.ai/openai/v1"
)
# Poll until the video is ready
video_id = "video_abc123"
while True:
video = client.videos.retrieve(video_id)
if video.status == "completed":
print(video.output.url)
break
elif video.status == "failed":
print(f"Error: {video.error.message}")
break
time.sleep(5)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-lumenfall-api-key",
baseURL: "https://api.lumenfall.ai/openai/v1",
});
// Poll until the video is ready
const videoId = "video_abc123";
while (true) {
const video = await client.videos.retrieve(videoId);
if (video.status === "completed") {
console.log(video.output.url);
break;
} else if (video.status === "failed") {
console.error(`Error: ${video.error.message}`);
break;
}
await new Promise((r) => setTimeout(r, 5000));
}
{
"id": "video_abc123",
"object": "video",
"created_at": 1702345678,
"completed_at": null,
"expires_at": null,
"status": "in_progress",
"model": "sora-2",
"prompt": "A capybara lounging in a hot spring, steam rising gently, slow camera pan",
"seconds": "10",
"size": "1920x1080",
"output": null,
"error": null,
"metadata": {
"model": "sora-2",
"executed_model": "openai/sora-2",
"provider": "openai",
"provider_name": "OpenAI",
"cost_estimate": 0.21,
"cost_currency": "USD"
}
}
{
"id": "video_abc123",
"object": "video",
"created_at": 1702345678,
"completed_at": 1702345720,
"expires_at": 1702432120,
"status": "completed",
"model": "sora-2",
"prompt": "A capybara lounging in a hot spring, steam rising gently, slow camera pan",
"seconds": "10",
"size": "1920x1080",
"output": {
"url": "https://media.lumenfall.ai/video_abc123.mp4",
"content_type": "video/mp4",
"size_bytes": 15728640
},
"error": null,
"metadata": {
"model": "sora-2",
"executed_model": "openai/sora-2",
"provider": "openai",
"provider_name": "OpenAI",
"cost": 0.21,
"cost_currency": "USD"
}
}
Retrieve the current status and output of a video generation request. Use this endpoint to poll for completion after submitting a video with
POST /v1/videos.
Path parameters
string
required
The ID of the video to retrieve (returned from the generate endpoint).
Response
string
Unique identifier for the video.
string
Always
"video".integer
Unix timestamp of when the video was created.
integer
Unix timestamp of when the video finished generating.
null until completed.integer
Unix timestamp of when the video output URL will expire.
null until completed.string
The generation status. One of
queued, in_progress, completed, or failed.string
The model used for generation.
string
The prompt used to generate the video.
string
The video duration.
string
Output dimensions as
"WIDTHxHEIGHT" (e.g., "1920x1080") or aspect ratio (e.g., "16:9").object
object
object
Metadata about the request execution, including cost. See Billing.
Show Metadata object
Show Metadata object
string
Provider display name (e.g.,
"Google Vertex AI").string
Provider slug (e.g.,
"replicate").string
The provider’s job ID, useful for reconciliation.
string
The model string sent in the request.
string
The model that was actually executed, as
"{provider_slug}/{provider_model}".number
Final effective cost. Only present when the job is
completed.number
Estimated cost. Present while the job is
queued or in_progress.string
Currency of the cost (e.g.,
"USD").curl https://api.lumenfall.ai/openai/v1/videos/video_abc123 \
-H "Authorization: Bearer $LUMENFALL_API_KEY"
import time
from openai import OpenAI
client = OpenAI(
api_key="your-lumenfall-api-key",
base_url="https://api.lumenfall.ai/openai/v1"
)
# Poll until the video is ready
video_id = "video_abc123"
while True:
video = client.videos.retrieve(video_id)
if video.status == "completed":
print(video.output.url)
break
elif video.status == "failed":
print(f"Error: {video.error.message}")
break
time.sleep(5)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-lumenfall-api-key",
baseURL: "https://api.lumenfall.ai/openai/v1",
});
// Poll until the video is ready
const videoId = "video_abc123";
while (true) {
const video = await client.videos.retrieve(videoId);
if (video.status === "completed") {
console.log(video.output.url);
break;
} else if (video.status === "failed") {
console.error(`Error: ${video.error.message}`);
break;
}
await new Promise((r) => setTimeout(r, 5000));
}
{
"id": "video_abc123",
"object": "video",
"created_at": 1702345678,
"completed_at": null,
"expires_at": null,
"status": "in_progress",
"model": "sora-2",
"prompt": "A capybara lounging in a hot spring, steam rising gently, slow camera pan",
"seconds": "10",
"size": "1920x1080",
"output": null,
"error": null,
"metadata": {
"model": "sora-2",
"executed_model": "openai/sora-2",
"provider": "openai",
"provider_name": "OpenAI",
"cost_estimate": 0.21,
"cost_currency": "USD"
}
}
{
"id": "video_abc123",
"object": "video",
"created_at": 1702345678,
"completed_at": 1702345720,
"expires_at": 1702432120,
"status": "completed",
"model": "sora-2",
"prompt": "A capybara lounging in a hot spring, steam rising gently, slow camera pan",
"seconds": "10",
"size": "1920x1080",
"output": {
"url": "https://media.lumenfall.ai/video_abc123.mp4",
"content_type": "video/mp4",
"size_bytes": 15728640
},
"error": null,
"metadata": {
"model": "sora-2",
"executed_model": "openai/sora-2",
"provider": "openai",
"provider_name": "OpenAI",
"cost": 0.21,
"cost_currency": "USD"
}
}
⌘I