Fal.AI-Based Video & Image Generation System

Job ID: 39913355

Budget: ₹12,500 – ₹37,500 INR

Overview
Build a complete Laravel 11 module that lets users generate media using Fal.ai models:

Text to Video

Video to Video

Image to Video

Image + Model to Image

Text to Image

The system must:

ask for all required inputs (including video/image size and video duration),

charge credits from the user wallet automatically,

show progress and status,

store every output (videos and images) in a user Gallery with filters.

Scope of Work

User Authentication & Wallet

Use our existing login and wallet balance.

Before starting a job, check balance and hold funds; on success, finalize charge; on failure, auto-refund.

Record each transaction.

Generators (Five Screens)
A) Text to Video

Inputs: prompt, duration (seconds), size/resolution/aspect (e.g., 720p/1080p, 1:1, 9:16).

Models to integrate: Sora 2, Veo 3, Luma, Pika.

Show job status, then save output to Gallery.

B) Video to Video (Remix/Style)

Inputs: video upload, prompt, optional target size.

Models: Sora 2 Remix, Luma Reframe.

Preserve motion, change style; save to Gallery.

C) Image to Video (Product Animation)

Inputs: image upload, duration (seconds), target size/resolution/aspect.

Models: Kling AI, Veo 3, Luma, Pika.

Generate short ad clip; save to Gallery.

D) Image + Model to Image (Ad Composition)

Inputs: two uploads (human/model + product), target image size (e.g., 1024×1024, 4:5, 16:9), optional headline area.

Models: Flux Pro Kontext, Flux General, Flux LoRA.

Merge into one ad image; save to Gallery.

E) Text to Image

Inputs: prompt, target image size/aspect.

Models: Flux Dev, Flux Pro Kontext.

Save to Gallery.

Gallery (Required)

Location: user dashboard → “My Gallery”.

Two tabs: Videos / Images.

Filters: date range, model name (Sora, Veo, Kling, Luma, Pika, Flux), and job type (T2V, V2V, I2V, I+M→I, T2I).

Grid thumbnails with: preview, title, model tag, created date, duration (for videos), resolution/size, and cost.

Clicking a card opens a modal preview (video player or full-size image) with Download button.

Pagination and sort by newest/oldest.

Pricing & Wallet Rules

Admin-editable prices per model.

Charging methods: per-second for video jobs; per-image for image jobs.

System must calculate cost from user inputs (e.g., seconds × rate) and hold funds before API submission.

Job Status & Reliability

Use Fal.ai queue + webhook callback to track job states (pending, processing, done, failed).

UI must show a progress state (spinner/“processing” message) and auto-refresh to completed result.

On failure/timeout: show a clear error and automatically refund the hold.

Admin Controls (basic)

Screen to edit per-model pricing, max allowed durations, allowed resolutions/aspects, enable/disable a model.

View all jobs with filters; manual refund/retry button.

UI Requirements

Clean, responsive dashboard screens, matching our site’s colors and fonts.

Separate navigation items:
“Generate” (with tabs for each generator) and “My Gallery”.

Forms must be simple and fast: prompt/inputs on the left, preview/status on the right.

Clear validation messages; disabled “Generate” button if wallet is insufficient.

Consistent buttons: Generate, View in Gallery, Download.

Mobile-friendly: all forms and Gallery must work on phones.

Data to Ask on Submission (must be present on the forms)

Video generators: prompt, duration (seconds), target size/resolution/aspect.

Image generators: prompt or two images (for composition), target size/aspect.

Model selection dropdown with a sensible default.

Estimated cost (auto-computed) shown before user confirms.

Deliverables

Working Laravel 11 module with routes, controllers, views, migrations, and settings.

Wallet logic (hold/debit/refund) tied to each job.

Five generator screens, one Gallery screen with filters, one basic Admin settings screen.

Webhook endpoint handling job completion/failure.

All outputs saved to storage and referenced in the Gallery.

Short documentation: installation, environment variables, how to add model prices, and how to test each generator.

8-Day Timeline (Daily Outcomes)
Day 1: Project setup, database migrations (wallets, holds, transactions, media_jobs, assets), basic dashboard link.
Day 2: Wallet checks, hold/debit/refund logic with transaction logs; “insufficient balance” handling.
Day 3: Fal.ai submission + webhook integration; job status changes visible in a simple Job List.
Day 4: Text to Video screen (prompt, duration, size selection), price preview, status UI, result saved to Gallery.
Day 5: Video to Video and Image to Video screens (uploads, duration/size), price preview, results saved to Gallery.
Day 6: Image + Model to Image screen (two uploads, size), Text to Image screen; both save to Gallery.
Day 7: Full Gallery page with tabs, filters (date/model/type), sort, pagination, modal preview, downloads; basic Admin settings for prices/limits.
Day 8: End-to-end testing, bug fixes, UI polish, responsive checks, error/timeout handling, and documentation.

Acceptance Criteria

All five generators work end-to-end with Fal.ai, deducting wallet correctly.

Every output appears in Gallery with correct metadata and filters.

Duration/size are asked on submission where applicable.

Admin can adjust pricing and limits and disable models.

Clear error messages and automatic refunds on failure.

Mobile-friendly UI and clean loading/progress states.

Notes

Use our existing theme styles for a consistent look.

Keep forms fast, minimal, and intuitive.

No third-party architecture or packaging details are required in this job—focus on functionality, UI, wallet, and gallery.