OpenGen video-extend continues an existing clip across six video models using either an uploaded or reused input.sourceVideo asset or a stateful top-level previousJobId continuation pinned to the original model and deployment. Inspect route-specific duration caps via GET /v1/models/{provider}/{model}?operation=video-extend, verify spend with POST /v1/pricing/estimate, and submit once with a persisted Idempotency-Key while keeping all outputs workspace-private.
operation: video-extendReviewed 2026-12-02
AGENT PROMPT · PASTE INTO YOUR AGENT OR AUTO-READ
Walk me through a video-extend generation on OpenGen (https://opengen.dev):
1. Discover models supporting video-extend via GET https://opengen.dev/v1/models?operation=video-extend (or MCP find_models with operation="video-extend").
2. Inspect the exact model via GET https://opengen.dev/v1/models/{provider}/{model}?operation=video-extend (or MCP get_model, e.g. id="bfl/flux-3-video" or "google/gemini-omni-1.2-flash", operation="video-extend") to verify route-specific extension duration bounds and field restrictions.
3. Either upload/reuse a private source clip via POST https://opengen.dev/v1/assets (placed in input.sourceVideo) or pass top-level previousJobId for an owned continuation pinned to the original deployment.
4. Run POST https://opengen.dev/v1/pricing/estimate (or MCP estimate_cost) and wait for my confirmation of the selected route and maxCostMicros spend cap.
5. Submit once with a persisted Idempotency-Key via POST https://opengen.dev/v1/generations or MCP generate, then follow via job_get until delivered.
OpenGen video-extend lengthens an existing shot using either a workspace-private source clip (input.sourceVideo) or a stateful top-level previousJobId continuation. Every model enforces its own extension duration window and parameter rules before billing admission.
1. Choose an extension model and inspect route duration caps
Active official route bfl-undisclosed/bfl-flux-3-video (live-verified for text-to-video at 720p/5s; video-extend remains documented). Published continuation tariff: $0.21/s at 720p, $0.27/s at 1080p, $0.31/s at 1440p, $0.45/s at 2160p.
Active official route xai-undisclosed/xai-grok-imagine-video (live-verified for video-edit at 720p/3s; video-extend remains documented). Preserves source resolution (input.resolution is rejected on video-extend).
2. Provide input.sourceVideo (upload or reuse an owned output)
Upload a local MP4/WebM clip (up to 100 MiB via presigned single-PUT + POST /v1/assets/complete) or promote an existing OpenGen job output into a ready workspace input with { "source": "job_output", "sourceJobId": "<job-uuid>", "outputIndex": 0 }:
Run POST /v1/pricing/estimate first to confirm route and duration eligibility before submitting.
set -eu
umask 077
if [ -e video-extend-submission.key ]; then
echo "Existing video-extend-submission.key found; recover read-only via GET /v1/generations/lookup before replacing video-extend-request.json." >&2
exit 1
fi
rm -f video-extend-request.json
cat <<'JSON' > video-extend-request.json
{
"modelId": "bfl/flux-3-video",
"operation": "video-extend",
"input": {
"prompt": "Continue the tracking shot smoothly past the lighthouse as evening clouds drift across the horizon.",
"sourceVideo": {
"assetKey": "inputs/YOUR_WORKSPACE/RETURNED_VIDEO_UUID.mp4"
},
"duration": 5,
"resolution": "720p",
"aspectRatio": "source",
"audio": true
},
"routeId": "bfl-undisclosed/bfl-flux-3-video",
"billing": "byok"
}
JSON
chmod 600 video-extend-request.json
# Dry-run estimate only (review selectedRouteId and workspaceEligibility before submitting)
curl --fail-with-body \
-X POST "https://opengen.dev/v1/pricing/estimate" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H "Content-Type: application/json" \
--data @video-extend-request.json
Submit once after reviewing the estimate
Run this step only after reviewing the estimate output above and confirming selectedRouteId, workspaceEligibility, and your BYOK billing payer.
set -eu
umask 077
if [ -e video-extend-submission.key ]; then
echo "Existing video-extend-submission.key found; recover read-only via GET /v1/generations/lookup before creating a new submission." >&2
exit 1
fi
RAW_UUID="$(uuidgen)"
[ -n "$RAW_UUID" ] || { echo "uuidgen failed" >&2; exit 1; }
IDEMPOTENCY_KEY="vext-$(printf '%s' "$RAW_UUID" | tr '[:upper:]' '[:lower:]')"
(set -C; printf '%s\n' "$IDEMPOTENCY_KEY" > video-extend-submission.key)
curl --fail-with-body \
-X POST "https://opengen.dev/v1/generations" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
--data @video-extend-request.json > video-extend-receipt.json
Stateful continuation with top-level previousJobId
On stateful continuation models such as Gemini Omni 1.2 Flash (google/gemini-omni-1.2-flash), you can omit input.sourceVideo and pass top-level previousJobId instead. OpenGen verifies workspace ownership and pins the continuation to the original model version and deployment (use "billing": "byok" while managed video-extend quotes remain comparison-only):
JSON
{
"modelId": "google/gemini-omni-1.2-flash",
"operation": "video-extend",
"previousJobId": "550e8400-e29b-41d4-a716-446655440000",
"input": {
"prompt": "Keep the camera gliding through the archway as lantern light warms the courtyard.",
"duration": 5,
"resolution": "720p",
"aspectRatio": "source"
},
"routeId": "google-undisclosed/google-gemini-omni-1.2-flash",
"billing": "byok"
}
4. Follow progress and retrieve privately
Poll GET /v1/generations/{id}/status?waitMs=25000 (or GET /v1/generations/{id}/events / MCP job_get) until deliveryStatus: "available", then fetch fresh signed output links via GET /v1/generations/{id}.
Next steps
Need to restyle an existing clip rather than lengthen it? See Video Editing.
Live catalog inventory for video-extend (9 documented variants). Click any model to compare exact regional routes, privacy disclosures, and source-linked tariffs, or inspect its canonical schema directly via the single-call model endpoint.