Skip to main content

Video Generation

Elftia's video generation feature supports using AI to generate short videos from text descriptions or reference images. It integrates several major video generation providers and uses an asynchronous polling model to handle the time-consuming video rendering process.

Use Cases

  • Generate short video clips from text descriptions
  • Convert static images into dynamic video (image-to-video)
  • Quickly generate creative video for social media or presentations
  • Compare generation results across different providers

Supported Providers

ProviderHighlightsAPI type
Kling AIHigh-quality video generation; supports multiple resolutionsAsync API
OpenAI (Sora)OpenAI's video generation modelAsync API
ReplicateOpen-source model hosting platform with a wide model selectionAsync API
VolcEngineVolcengine video generation serviceAsync API
WanWan video generationAsync API
Custom (Unified)Third-party services compatible with the unified interfaceAsync API

Configuring a Provider

Steps

  1. Open Settings > Media Providers > Video
  2. Select a provider
  3. Enter the API Key (some providers also require an Access Key or other authentication)
  4. (Optional) Customize the API endpoint
  5. Select a default model
  6. Save and enable

Provider Configuration Table

SettingDescriptionRequired
API KeyThe provider's API keyYes
API endpointCustom API addressNo (defaults to official address)
Default modelThe default video model to useNo
EnabledWhether this provider is enabledYes

Generating Video

Steps

  1. Select the video generation feature
  2. Choose a provider and model
  3. Enter a text prompt describing the video
  4. (Optional) Upload a reference image (image-to-video mode)
  5. Configure generation parameters
  6. Click Generate
  7. Wait for the async task to complete

Generation Parameters

Parameters vary by provider; common parameters include:

ParameterDescriptionNotes
PromptText description of the video contentRequired
Reference imageImage used as the starting frame of the videoOptional; image-to-video mode
DurationVideo length in secondsDepends on provider
ResolutionVideo resolutione.g. 720p, 1080p
FPSFrames per secondDepends on provider

Asynchronous Polling Model

Because video generation typically takes a significant amount of time (tens of seconds to several minutes), Elftia uses an asynchronous polling mechanism:

Submit generation request → Receive task ID → Poll status periodically → Task complete → Download video

Behavior

  1. Submit request — Sends a generation request to the provider API and receives a task ID
  2. Poll status — The system automatically queries the task status at regular intervals (typically every 5–10 seconds)
  3. Task complete — When the status changes to complete, the generated video file is downloaded automatically
  4. Display result — The video is shown in the UI and can be played back

While waiting, the UI shows the current task status and estimated time remaining (if the provider supports this).

Automatic Retries

When a temporary error occurs during generation, the system retries automatically:

SettingDescriptionDefault
Retry countMaximum retries after a failure2
Retry intervalUses exponential backoffStarts at 1 second

Global Video Settings

SettingDescriptionDefault
ConcurrencyNumber of simultaneous video generation tasks1
Retry countAutomatic retries when generation fails2

These parameters can be adjusted in Settings > Media Providers > Video > Global Settings.

Provider Selection Guide

NeedRecommended provider
High-quality commercial videoKling AI
OpenAI ecosystem integrationOpenAI (Sora)
Flexible open-source model selectionReplicate
Stable access within ChinaVolcEngine

Frequently Asked Questions

QuestionSolution
Task stays in "waiting" indefinitelyVideo generation takes time — please be patient. High-quality models may take several minutes
Generation fails with a timeout errorThe provider may be under high load — try again later
Video won't playCheck whether the video format is supported by your system; try an external player
API key verification failedConfirm the API key is correct and the account has sufficient quota
Custom provider is not compatibleConfirm the API interface conforms to the unified interface spec (Unified format)