Photo Liftoff turns still photos into short 5-10 second video-generation jobs. It includes:
- a drag-and-drop photo workspace
- serious and funny prompt helpers
- duration controls for 5-10 second clips
- local mock generation for development
- a configurable Replicate-compatible AI video provider
- Railway deployment config
npm install
npm run devIn another terminal, run the API:
npm run dev:apiOpen http://127.0.0.1:5173.
The app works without secrets in AI_VIDEO_PROVIDER=mock mode. To call a real provider, set:
AI_VIDEO_PROVIDER=replicate
REPLICATE_API_TOKEN=your_token
REPLICATE_MODEL=owner/model-nameSome image-to-video models use different input names, so configure them without code changes:
VIDEO_PROMPT_FIELD=prompt
VIDEO_IMAGE_FIELD=start_image
VIDEO_DURATION_FIELD=duration
VIDEO_ALLOWED_DURATIONS=5,10
VIDEO_EXTRA_INPUT_JSON={"aspect_ratio":"16:9"}For kwaivgi/kling-v2.1, the app automatically uses start_image and valid durations 5,10 if you leave VIDEO_IMAGE_FIELD unset. Other models may require different field names.
You can also use REPLICATE_VERSION instead of REPLICATE_MODEL for version-based predictions.
- Create a new Railway service from this GitHub repo.
- Add the environment variables from
.env.example. - Keep
AI_VIDEO_PROVIDER=mockfor smoke tests, or setAI_VIDEO_PROVIDER=replicateplus provider credentials. - Railway will run
npm run buildandnpm start.
POST /api/prompts
Returns generated serious and funny prompts.
POST /api/videos
Multipart form fields:
photo: image filevariant:seriousorfunnyduration: number from5to10subject: optional subject hintmotion: optional motion hintstyle: optional style hint
GET /api/videos/:id
Returns a mock job or the provider prediction status.