TinyShip
TinyShip
 TinyShip
TinyShip
TinyShip Documentation
TinyShip User GuideGetting StartedBasic Configuration
Credits System ConfigurationAffiliate System Configuration
AI Features ConfigurationAI Chat ConfigurationAI Image Generation ConfigurationAI Video Generation Configuration
Storage Service ConfigurationDatabase ConfigurationCaptcha Configuration
Development Best PracticesLocal E2E Workflow
User GuideAI Features

AI Video Generation Configuration

Configure AI video generation functionality

TinyShip supports AI video generation with multiple providers. This document explains how to configure AI video generation.

Related Pages

PagePathDescription
Video Gen/video-generateAI video generation page

Supported Video Providers

ServiceModelsFeatures
Fal.aiKling 3.0 Pro text/image-to-video, Veo 3.1Simple integration, supports text-to-video and image-to-video
Volcengine Seedancedoubao-seedance-2-5-260628, doubao-seedance-2-0-2601282.5 up to 30s (max 720p); 2.0 up to 1080p
Aliyun Wanwan3.0-video, wan3.0-video-primeUnified text/image-to-video, up to 30s

Configuration

Video generation config is defined in config/aiVideo.ts:

// config/aiVideo.ts
export const aiVideoConfig = {
  defaultProvider: 'volcengine' as const, // default video generation provider

  defaultModels: {
    fal: 'fal-ai/kling-video/v3/pro/text-to-video',
    volcengine: 'doubao-seedance-2-5-260628',
    aliyun: 'wan3.0-video',
  },

  availableModels: {
    fal: [
      'fal-ai/kling-video/v3/pro/text-to-video',
      'fal-ai/kling-video/v3/pro/image-to-video',
      'fal-ai/veo3.1',
      'fal-ai/veo3.1/image-to-video',
    ],
    volcengine: ['doubao-seedance-2-5-260628', 'doubao-seedance-2-0-260128'],
    aliyun: ['wan3.0-video', 'wan3.0-video-prime'],
  },

  defaults: {
    duration: 5,        // default duration; users can change it in the UI
    promptExtend: true,
    watermark: false,
  },
}

Durations and resolutions are filtered by provider + model and exposed to all three front-end apps via getVideoDurationsForProvider() / getVideoSizesForProvider(). Users can pick what they want — nothing is locked down.

Duration and Resolution

ModelDurationResolution
Seedance 2.55 / 10 / 15 / 30 sUp to 720P
Seedance 2.05 / 10 / 15 s720P / 1080P
Kling 3.0 Pro5 / 10 / 15 sMultiple aspect ratios
Veo 3.14 / 6 / 8 s16:9 and 9:16 only
Wan 3.05 / 10 / 15 / 30 s720P / 1080P

The default duration is 5 seconds. Volcengine billing scales with duration and resolution, so keep the default at 5s + 720P to avoid someone accidentally picking 30 seconds.

Environment Variables

Add provider keys in .env:

# Volcengine
VOLCENGINE_API_KEY="your-volcengine-api-key"

# Aliyun
ALIYUN_ACCESS_KEY_ID="your-aliyun-access-key-id"
ALIYUN_ACCESS_KEY_SECRET="your-aliyun-access-key-secret"

# Fal.ai
FAL_API_KEY="your-fal-api-key"

Credits Configuration

AI video generation usually costs more credits than image generation. You can price per model in config/credits.ts:

// config/credits.ts
export const creditsConfig = {
  fixedConsumption: {
    // AI video generation - priced per model
    aiVideo: {
      default: 30,
      models: {
        'fal-ai/kling-video/v3/pro/text-to-video': 35,
        'fal-ai/kling-video/v3/pro/image-to-video': 35,
        'doubao-seedance-2-5-260628': 40,
        'doubao-seedance-2-0-260128': 35,
        'wan3.0-video': 25,
        'wan3.0-video-prime': 35,
      },
    },
  },
}

This is a fixed charge for end users: the same model costs the same whether it runs 5 or 30 seconds. Volcengine Ark bills differently — see the next section.

Volcengine Seedance Billing

The Seedance API is billed by tokens on the Volcengine side — a separate ledger from TinyShip credits. The token count roughly depends on output duration, resolution, frame rate, and whether a reference video is included; use the task's returned usage.completion_tokens as the source of truth.

2.5 costs about 50% more per token than 2.0:

Input without videoInput with video
Seedance 2.5¥70 / million tokens¥42 / million tokens
Seedance 2.0~¥46 / million tokens~¥28 / million tokens

Typical prices for 2.5 pure text-to-video (no reference video):

Resolution5 sPer second30 s (estimated)
480P~¥3.36~¥0.67~¥20
720P~¥7.56~¥1.51~¥45

Image-to-video (first frame only) usually still falls into the "input without video" tier. Only inputs with a reference video get the cheaper token rate, but the input duration counts toward tokens.

The 2.5 page currently only exposes 720P; the adapter can already map 854x480, so you can add 480P to volcengineSizes720 if you want to stress-test costs.

Official pricing: Volcengine Ark model pricing

Local Testing Tips

Don't use the default 2.5 + long durations when you just want to verify "can it produce a video".

GoalRecommendationApprox. Volcengine cost
Just verify Seedance works2.0 + 720P + 5 s, pure text-to-video~¥5
Must see 2.5 quality2.5 + 720P + 5 s~¥7.5
Only test pages / polling / creditsWan 3.0 PrimeUsually cheaper than Seedance
Avoid2.5 at 15s/30s, 2.0 at 1080PTens of yuan

Fal / Veo run on overseas nodes. When testing in China, the dev server (Node) doesn't use the browser proxy — you need TUN mode or set HTTPS_PROXY for the process, otherwise requests will be slow or time out. Qwen and Volcengine use domestic routes and usually don't need this.


Related docs:

  • AI Chat Configuration
  • AI Image Generation Configuration
  • Credits System Configuration

AI Image Generation Configuration

Configure AI image generation functionality

Storage Service Configuration

Configure file storage providers

On this page

Related PagesSupported Video ProvidersConfigurationDuration and ResolutionEnvironment VariablesCredits ConfigurationVolcengine Seedance BillingLocal Testing Tips