OpenGen routes text-to-video prompts across 25 exact video model variants using one canonical schema for resolution, duration, aspect ratio, and native audio. Inspect regional endpoints and published per-second or token pricing via GET /v1/models/{provider}/{model}, verify spend with POST /v1/pricing/estimate, submit once with a persisted Idempotency-Key, and stream or poll private delivery progress without risking duplicate charges.
operation: text-to-videoReviewed 2026-12-02
AGENT PROMPT · PASTE INTO YOUR AGENT OR AUTO-READ
Walk me through a text-to-video generation on OpenGen (https://opengen.dev):
1. Discover video models via GET https://opengen.dev/v1/models?operation=text-to-video (or MCP find_models with operation="text-to-video").
2. Inspect the exact model's resolutions, integer duration bounds, native audio policy, regional endpoints, privacy disclosures, and published pricing via GET https://opengen.dev/v1/models/{provider}/{model}?operation=text-to-video (or MCP get_model, e.g. id="alibaba/wan-3.0", operation="text-to-video").
3. Run a stateless dry-run estimate with POST https://opengen.dev/v1/pricing/estimate (or MCP estimate_cost) and present the selected regional route, estimatedCostMicros, recommendedMaxCostMicros, and workspaceEligibility.
4. Wait for my confirmation of the route and maxCostMicros spend ceiling before submitting.
5. Persist a unique Idempotency-Key and submit once via POST https://opengen.dev/v1/generations or MCP generate, then follow progress via GET https://opengen.dev/v1/generations/{id}/status (or /events SSE) or MCP job_get(id, afterRevision, waitMs=25000) without ever creating a second Idempotency-Key.
OpenGen text-to-video turns a text prompt into a private MP4 clip across 25 exact video variants while keeping regional endpoints, native audio policies, and per-second or token pricing explicit before you spend.
1. Compare exact video variants and regional routes
Video models differ sharply in resolution tiers, duration ranges, audio support (switchable, always-on, or unsupported), and regional endpoints:
Wan 3.0 (alibaba/wan-3.0): official Singapore route alibaba/ap-southeast-1/wan-3.0 is live-verified for text-to-video and image-to-video at 480p / 2s (higher resolutions and longer durations remain documented), supporting 480p/720p/1080p, 2–30 seconds (or "auto"), switchable audio, and published per-second tariffs of $0.05/s at 480p, $0.10/s at 720p, and $0.20/s at 1080p.
Kling 4.0 (kling/kling-4.0): live-verified for text-to-video at 720p / 3s on kling-ap-southeast-1/kling-kling-4.0 and runway-undisclosed/kling-kling-4.0 (other resolutions and durations remain documented), supporting 720p/1080p/4K, 3–30 seconds, always-on native audio, and multi-shot shots arrays.
FLUX 3 Video (bfl/flux-3-video): live-verified for text-to-video at 720p / 5s on bfl-undisclosed/bfl-flux-3-video (higher resolutions and other durations remain documented), supporting 720p–2160p, 5–20 seconds (or "auto"), and switchable audio.
Seedance 2.5 (bytedance/seedance-2.5): 480p–1080p, 4–30 seconds, with optional draft preview mode (480p with audio: false) and codec/bitrateMode controls on compatible routes.
# List text-to-video models (filter by region or collection if needed)
curl --fail-with-body \
"https://opengen.dev/v1/models?operation=text-to-video®ion=ap-southeast-1"
# Inspect Wan 3.0 schema, regional deployments, privacy disclosures, and pricing
curl --fail-with-body \
"https://opengen.dev/v1/models/alibaba/wan-3.0?operation=text-to-video"
2. Estimate cost and pin your regional route
Validate your exact payload with POST /v1/pricing/estimate before submitting. Pin a specific routeId (or narrow allowed providers and regions via routing) so OpenGen never routes outside your residency or cost policy.
set -eu
umask 077
if [ -e t2v-submission.key ]; then
echo "Existing t2v-submission.key found; recover read-only via GET /v1/generations/lookup before replacing t2v-request.json." >&2
exit 1
fi
rm -f t2v-request.json
cat <<'JSON' > t2v-request.json
{
"modelId": "alibaba/wan-3.0",
"operation": "text-to-video",
"input": {
"prompt": "A wooden ferry crossing a misty fjord at dawn, slow aerial tracking shot, crisp ripples on dark blue water.",
"resolution": "720p",
"duration": 5,
"aspectRatio": "16:9",
"audio": true
},
"routeId": "alibaba/ap-southeast-1/wan-3.0",
"billing": "managed",
"maxCostMicros": 600000
}
JSON
chmod 600 t2v-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 @t2v-request.json
3. Submit once and follow asynchronous progress
Video jobs run asynchronously on OpenGen's durable worker pool. Persist your Idempotency-Key and request body before calling POST /v1/generations. Save the returned job.id immediately, then follow progress via long-polling (GET /v1/generations/{id}/status?waitMs=25000), Server-Sent Events (GET /v1/generations/{id}/events), or a per-request Ed25519 webhook.
set -eu
umask 077
if [ -e t2v-submission.key ]; then
echo "Existing t2v-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="t2v-$(printf '%s' "$RAW_UUID" | tr '[:upper:]' '[:lower:]')"
(set -C; printf '%s\n' "$IDEMPOTENCY_KEY" > t2v-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 @t2v-request.json > t2v-receipt.json
# Stream real-time job lifecycle updates over SSE
JOB_ID="$(jq -r '.id' t2v-receipt.json)"
curl -N \
-H "Authorization: Bearer $OPENGEN_API_KEY" \
-H "Accept: text/event-stream" \
"https://opengen.dev/v1/generations/$JOB_ID/events"
4. Handle timeouts, cancellation, and delivery safely
Separate observations: upstream status: "succeeded", private archive deliveryStatus: "available", and billing settledMicros are independent states. Wait for deliveryStatus: "available" before downloading, and never assume settledMicros: null means free.
No blind retries: if POST /v1/generations times out, look up the original key with GET /v1/generations/lookup?idempotencyKey=$IDEMPOTENCY_KEY (CLI opengen job recover --idempotency-key "$IDEMPOTENCY_KEY"). If the job enters submission-unknown, keep the receipt and reconcile through your installation operator.
Explicit cancellation:POST /v1/generations/{id}/cancel requests cancellation, but running upstream video tasks may reject cancellation and cancellation does not establish refundability.
Next steps
Start from an owned still frame instead of text alone in Image to Video.
Live catalog inventory for text-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.