OpenGen image-to-video animates workspace-private start and optional end frames across 25 video models without publishing your source media. Upload your image through POST /v1/assets until state is ready, place its assetKey in input.firstFrame, run POST /v1/pricing/estimate to verify route capabilities and cost, submit once with a persisted Idempotency-Key, and resume or recover read-only until private video delivery is available.
operation: image-to-videoReviewed 2026-12-02
AGENT PROMPT · PASTE INTO YOUR AGENT OR AUTO-READ
Walk me through an image-to-video generation on OpenGen (https://opengen.dev):
1. Discover image-to-video models with GET https://opengen.dev/v1/models?operation=image-to-video&inputRole=firstFrame (or MCP find_models with operation="image-to-video", inputRole="firstFrame").
2. Inspect the exact chosen model via GET https://opengen.dev/v1/models/{provider}/{model}?operation=image-to-video (or MCP get_model, e.g. id="bytedance/seedance-2.5", operation="image-to-video") to verify supported resolutions, duration bounds, firstFrame/lastFrame support, regional routes, and published pricing.
3. Upload the user's private image via POST https://opengen.dev/v1/assets (or MCP upload_asset / upload_attachment) and require state="ready" before placing its assetKey in input.firstFrame.
4. Run POST https://opengen.dev/v1/pricing/estimate (or MCP estimate_cost) and wait for my confirmation of the selected route, billing payer, and maxCostMicros spend cap.
5. Persist a unique Idempotency-Key and submit once via POST https://opengen.dev/v1/generations or MCP generate, then follow via job_get(id, afterRevision, waitMs=25000) without ever resubmitting under a new key.
OpenGen image-to-video animates an owned start frame (and optional end frame or keyframes on supported models) while keeping both input media and generated clips private to your workspace.
Prerequisites
An OpenGen credential with read and generate scopes (OPENGEN_API_KEY, OAuth MCP at https://opengen.dev/mcp, or @opengen-dev/cli browser login via opengen login && opengen doctor).
A valid PNG, JPEG, or WebP image you own or have permission to animate (up to 4 MiB for single-step multipart upload or up to 100 MiB via presigned single-PUT).
1. Inspect the exact model, frame roles, and routes
Check which frame controls your exact variant supports before uploading:
Wan 3.0 (alibaba/wan-3.0): Singapore route alibaba/ap-southeast-1/wan-3.0 is live-verified for image-to-video at 480p / 2s (higher resolutions and longer durations remain documented), supporting 480p/720p/1080p, 2–30 seconds, firstFrame + optional lastFrame.
Kling 4.0 (kling/kling-4.0): active official adapter on kling-ap-southeast-1/kling-kling-4.0 (live-verified for text-to-video at 720p / 3s; image-to-video remains documented), supporting firstFrame, lastFrame, and up to 10 combined keyframes + reference images.
2. Upload your private first frame and verify state: "ready"
Never publish a private reference image to a public host or pass a local file path in assetKey. Use single-step POST /v1/assets (multipart/form-data up to 4 MiB) or presigned single-PUT (<= 100 MiB via POST /v1/assets{ mediaType, size } -> PUT to uploadUrl without your OpenGen token -> POST /v1/assets/complete).
# Single-step private upload (<= 4 MiB); for files up to 100 MiB use presigned PUT + /v1/assets/complete
curl --fail-with-body \
-X POST "https://opengen.dev/v1/assets" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H "Idempotency-Key: frame-$(uuidgen | tr '[:upper:]' '[:lower:]')" \
-F "file=@./owned-reference.png;type=image/png"
3. Build, estimate, and review the canonical request
Place the ready workspace key in input.firstFrame (and optionally input.lastFrame for start-to-end interpolation on models that support frames.last). Using aspectRatio: "source" preserves the input image's framing. Run POST /v1/pricing/estimate before submitting so you see exact route eligibility, published pricing, and recommendedMaxCostMicros.
set -eu
umask 077
if [ -e i2v-submission.key ]; then
echo "Existing i2v-submission.key found; recover read-only via GET /v1/generations/lookup before replacing i2v-request.json." >&2
exit 1
fi
rm -f i2v-request.json
cat <<'JSON' > i2v-request.json
{
"modelId": "bytedance/seedance-2.5",
"operation": "image-to-video",
"input": {
"prompt": "A slow camera push toward the subject, keeping the original lighting and composition steady.",
"firstFrame": {
"assetKey": "inputs/YOUR_WORKSPACE/RETURNED_FRAME_UUID.png"
},
"duration": 5,
"resolution": "720p",
"aspectRatio": "source"
},
"routeId": "byteplus-modelark-ap-southeast-1/bytedance-seedance-2.5",
"billing": "managed",
"maxCostMicros": 1500000
}
JSON
chmod 600 i2v-request.json
curl --fail-with-body \
-X POST "https://opengen.dev/v1/pricing/estimate" \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H "Content-Type: application/json" \
--data @i2v-request.json
maxCostMicros: 1500000 ($1.50) is an illustrative ceiling above the route's published 5-second 720p reservation (1,220,656 micro-USD), not a price commitment or permission to spend it. Set billing: "byok" only after connecting your own encrypted provider key and confirming that provider account as the payer.
4. Submit once and keep the receipt
Save the canonical request and one unique Idempotency-Key in a private file (umask 077, refusing to overwrite an existing unresolved record) before calling POST /v1/generations. Save the returned job ID immediately before waiting.
set -eu
umask 077
# Refuse to overwrite an existing unresolved submission record so retries never create a second paid job
if [ -e i2v-submission.key ]; then
echo "Existing i2v-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="i2v-$(printf '%s' "$RAW_UUID" | tr '[:upper:]' '[:lower:]')"
(set -C; printf '%s\n' "$IDEMPOTENCY_KEY" > i2v-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 @i2v-request.json > i2v-receipt.json
5. Wait, recover read-only, and refresh expiring download URLs
Follow the existing job ID with GET /v1/generations/{id}/status?waitMs=25000 (passing afterRevision on subsequent polls) or opengen job wait. If your client lost the submission response before seeing a job ID, recover read-only with the original Idempotency-Key via GET /v1/generations/lookup or opengen job recover --idempotency-key:
# Load the saved Idempotency-Key and recover read-only without resubmitting
IDEMPOTENCY_KEY="$(cat i2v-submission.key)"
curl --fail-with-body \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
"https://opengen.dev/v1/generations/lookup?idempotencyKey=$IDEMPOTENCY_KEY"
# Fetch fresh ~15-minute first-party /media/... capability URLs right before downloading
curl --fail-with-body \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
"https://opengen.dev/v1/generations/$JOB_ID"
Next steps
Need multiple character, object, or audio references instead of strict start/end frames? See Reference to Video.
Want to continue the finished video clip? See Video Extension.
Review client verification boundaries in Client Setup.
Supported Models
Live catalog inventory for image-to-video (24 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.