Browse all docs & guides
On this page
OPERATION & PLATFORM GUIDE

Generate video from text prompts

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.
View raw .md ↗

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&region=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

Supported Models

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.

ModelCreatorRoutesLowest published priceSingle-call API
alibaba/wan-3.0
Alibaba10 routes$0.0325 / secGET /v1/models/alibaba/wan-3.0?operation=text-to-video
alibaba/wan-3.0-prime
Alibaba10 routes$0.051 / secGET /v1/models/alibaba/wan-3.0-prime?operation=text-to-video
alibaba/happy-horse-1.1
Alibaba6 routes$0.061885 / secGET /v1/models/alibaba/happy-horse-1.1?operation=text-to-video
kling/kling-4.0
Kling AI5 routes$0.157 / secGET /v1/models/kling/kling-4.0?operation=text-to-video
kling/kling-4.0-flash
Kling AI3 routes$0.094 / secGET /v1/models/kling/kling-4.0-flash?operation=text-to-video
bfl/flux-3-video
Black Forest Labs2 routes$0.15 / secGET /v1/models/bfl/flux-3-video?operation=text-to-video
H3 Flex · PikaOpen weights
pika/h3-flex
Pika1 route$0.01 / secGET /v1/models/pika/h3-flex?operation=text-to-video
bytedance/seedance-2.0
ByteDance6 routes≈$0.07 / secGET /v1/models/bytedance/seedance-2.0?operation=text-to-video
bytedance/seedance-2.0-fast
ByteDance5 routes≈$0.0591 / secGET /v1/models/bytedance/seedance-2.0-fast?operation=text-to-video
bytedance/seedance-2.0-mini
ByteDance5 routes≈$0.0369 / secGET /v1/models/bytedance/seedance-2.0-mini?operation=text-to-video
bytedance/seedance-2.5
ByteDance5 routes$0.1028 / secGET /v1/models/bytedance/seedance-2.5?operation=text-to-video
google/gemini-omni-1.1-flash
Google5 routes$0.03 / secGET /v1/models/google/gemini-omni-1.1-flash?operation=text-to-video
MiniMax H3Open weights
minimax/h3
MiniMax5 routes$0.05 / secGET /v1/models/minimax/h3?operation=text-to-video
bytedance/seedance-2.5-flash
ByteDance4 routes≈$0.07 / secGET /v1/models/bytedance/seedance-2.5-flash?operation=text-to-video
google/gemini-omni-1.2-flash
Google3 routes$0.02 / secGET /v1/models/google/gemini-omni-1.2-flash?operation=text-to-video
minimax/h3-max
MiniMax3 routes$0.05 / secGET /v1/models/minimax/h3-max?operation=text-to-video
xai/grok-imagine-video-1.5
xAI3 routes$0.08 / secGET /v1/models/xai/grok-imagine-video-1.5?operation=text-to-video
xai/grok-imagine-video-1.5-lite
xAI3 routes$0.02 / secGET /v1/models/xai/grok-imagine-video-1.5-lite?operation=text-to-video
bytedance/seedance-1.0-pro
ByteDance2 routes≈$0.0251 / secGET /v1/models/bytedance/seedance-1.0-pro?operation=text-to-video
bytedance/seedance-1.0-pro-fast
ByteDance2 routes≈$0.01 / secGET /v1/models/bytedance/seedance-1.0-pro-fast?operation=text-to-video
minimax/h3-highspeed
MiniMax2 routes$0.03 / secGET /v1/models/minimax/h3-highspeed?operation=text-to-video
minimax/h3-lite
MiniMax2 routes$0.0125 / secGET /v1/models/minimax/h3-lite?operation=text-to-video
fal/flux-3-max-video
fal1 route$0.17 / secGET /v1/models/fal/flux-3-max-video?operation=text-to-video
fal/h3-max-turbo
fal1 route$0.025 / secGET /v1/models/fal/h3-max-turbo?operation=text-to-video