AI Creator Setup Guide
You can always find this page under Setup Guide in the dashboard menu. While developing, open AI Creator through the Replit app preview; a development-preview address is not a public website address.
The studio requires the following one-time setup in your own services. Administration additionally requires an owner-granted role. No credentials are displayed here.
1. Supabase database and private storage
Open your Supabase project → SQL Editor → New query. Download the migration below, paste its contents, and run it once. It creates accounts, projects, an auditable credit ledger, private input/output buckets, and row-level access policies. It does not remove existing tables.
Download the Supabase setup SQL
This must run in the Supabase project associated with your saved credentials, not in a different database. The service-role key cannot run database schema migrations through the normal data API.
Existing installation: video model settings upgrade
To save model, duration, resolution, and audio settings safely across retries, apply the additive video-model migration. It adds one settings column and a server-only reservation function. Existing projects, balances, the 25-credit video price, and refund rules remain unchanged.
Download the video model upgrade SQL. Run it in Supabase SQL Editor, then wait up to one minute and reload the studio. Until then, the original LTX 2.5 five-second 480p silent video remains available. The full setup download above already includes this upgrade.
Existing installation: multi-photo video upgrade
Download the multi-photo video upgrade SQL and run it in Supabase SQL Editor. This bundle includes the prerequisite video-settings migration. It adds ordered photo paths, an immutable prepared-video path, and a server-only reservation function; existing projects, credits, and payment configuration are preserved. Wait up to one minute and reload afterward.
The + button accepts up to 10 PNG, JPEG, or WebP photos under 10 MB each. Reorder photos with the arrow controls, remove unwanted photos, or retry failed uploads. Two or more photos become one ordered source video that Magic Hour edits as one AI generation using LTX 2.5 or Google Omni Flash 1.2. Veo remains available for ordinary generation, not photo sequences. Photo videos are silent, use the selected aspect ratio, and use one model quote (default 25 app credits total), not a separate charge per photo. Allow at least half a second per photo. LTX 1080p photo sequences are limited to 30 seconds. Google Omni requires a paid Magic Hour provider plan.
FFmpeg is a required server dependency and is declared in the project configuration. Source clips and final videos are private in the existing Supabase output bucket. Retries reuse the saved photo order and source video; leaving the app pauses browser-driven reconciliation, so reopen your project to continue checking it.
2. Email and Google sign-in
In Supabase Authentication → Providers, enable Email and Google. Google requires OAuth credentials from your Google Cloud project; use the Supabase callback URL shown in the provider settings. Enable email confirmations and configure your production email delivery before accepting public registrations.
In Authentication → URL Configuration, add the exact preview URL and, after publishing, your live site URL to the redirect allowlist. Use the domain where you are actually opening AI Creator. Set Site URL to your live site when it is published. Password recovery redirects back to the app and lets the user set a new password.
3. Magic Hour generation
Your Magic Hour API key stays on the server. Fund the Magic Hour account to cover generation charges. AI Creator app credits are separate: a confirmed account receives 50 starter app credits; an image or 2× upscale costs 5 and a five-second video costs 25. The SQL functions reserve and refund app credits atomically. A failed provider job refunds app credits; an uncertain submission holds credits until it can be reconciled safely.
Video models include LTX 2.5, Google Veo 3.1 Lite, and Google Omni Flash 1.2 through Magic Hour. The studio reads and caches the provider OpenAPI metadata and account tier, with a labeled documented fallback. Higher resolutions and paid models require the appropriate Magic Hour plan. All three currently document optional audio; Veo audio costs extra at the provider. Default studio pricing is 25 app credits per video. Administrators can change new-generation quotes; Magic Hour charges vary independently by model, duration, resolution, and audio.
Current defaults: Flux Schnell images at 1k; LTX 2.5 videos at 480p for five seconds without audio; preserve-mode 2× upscaling. A single reference image works in video and upscale; single-image video framing comes from the image. Multiple photos use the selected aspect ratio and are saved as one photo-video project. Capability detection and validation run internally.
4. Payments and launch
Razorpay is intentionally not connected. There is no live checkout, recurring billing, or purchasable credit package. Do not advertise paid plans as available until billing, webhook verification, and payment-to-credit accounting have been implemented and tested.
Generations refresh while a signed-in user has the app open. Jobs remain at Magic Hour when the browser closes and reconcile when the user returns. Always-open background processing, provider webhook delivery, automated reconciliation of submissions older than 23 hours, account-abuse protection, load testing, and a full signed-in security review are launch checks, not verified capabilities of this first build.
Before public launch, review the 50-credit welcome grant and rate limits, publish privacy/terms/refund policies, configure monitoring, and verify image/video generation and storage end to end with a real confirmed account.
5. Secure administrator console
Open /admin. Signed-out visitors must sign in. Ordinary confirmed accounts do not become administrators. The server verifies the protected role independently on every admin request. Missing schema fails closed; it never grants the first signup or trusts editable user metadata.
Download the additive, rerunnable admin upgrade SQL. Prerequisites: apply 001_creator.sql, then 002_video_models.sql, then 003_photo_videos.sql in this same external Supabase project. Apply 004_admin.sql last, including after reapplying older upgrades. The full setup download includes all four in order. The admin script checks prerequisites and stops with an explicit error if they are missing. Replit service-role REST credentials cannot execute this owner-only DDL.
Bootstrap the first administrator
Sign up and confirm the intended owner account first. In Supabase Authentication → Users, copy that existing account's UUID. As the project owner, run the following in Supabase SQL Editor, replacing the placeholder with that UUID:
insert into public.creator_admin_roles(user_id)
values ('YOUR-EXISTING-USER-UUID')
on conflict do nothing;Reload /admin and sign in as that user. Only owner SQL can grant or revoke roles. Additional administrators use the same INSERT with an existing confirmed user UUID. The last unblocked administrator cannot be blocked or removed through the protected controls. Never grant roles from signup code, public tables, email matching, user_metadata or browser flags. Do not share SQL Editor access or service-role credentials with ordinary administrators.
Accounting, models and maintenance
Admin add/deduct actions require a reason and a durable request UUID. They lock the account, reject negative balances, write the credit ledger and audit record in one transaction. App-credit refunds only apply to failed, unrefunded jobs and never send money. Existing uncertain provider submissions keep their credits held; review these separately in Magic Hour rather than refunding potentially running jobs.
Plan prices are saved monthly/yearly INR previews; checkout remains disabled. Model credit prices apply only to new reservations. Existing jobs keep their original settings and app-credit cost even if policies change. Empty model subsets mean all currently verified provider options; nonempty subsets narrow them, never expand provider capabilities. Provider plan availability still applies.
Maintenance pauses new upload authorizations and generation reservations on the backend. Existing project status, downloads, authentication, logout and authorized admin tools remain available. Already-issued upload URLs retain their original expiry. Blocking stops new uploads and generation, but does not erase history or strand downloads.
Reporting coverage and secure key rotation
Overview uses a trailing 30-day UTC reporting window. Active users means registered auth users whose latest sign-in falls inside that window, not page views or daily engagement. Total users and current paid subscribers are snapshots. Generation totals include saved tombstones and all statuses. Paid subscribers require a current active subscription linked to a captured persisted payment.
Revenue uses persisted captured INR payments less persisted monetary refund records, never app-credit adjustments. With no connected payment records revenue is unavailable. Future provider API request logs begin with this upgrade and may have recording gaps; historical usage is not invented. Provider credits observed from project status are marked estimated until terminal status. Provider-credit balance is not money. Recorded API expenditure sums only verified INR cost records and remains unavailable without them; it is not complete historical spending. Profit remains unavailable without comparable complete INR cost coverage.
To rotate Magic Hour credentials, open Replit Tools → Secrets and securely replace MAGIC_HOUR_API_KEY, then restart the AI Creator server. Never paste a key into the admin dashboard, website settings, audit reasons or chat. The dashboard displays configured status and sanitized connection results only. Rotate/revoke the old key in Magic Hour after verifying the new connection. No provider or service-role key is ever stored in the application database.
Restarting the workspace preview does not update a published service. Published services pick up changed secrets through their normal deployment process; coordinate production key revocation with that change so existing jobs are not interrupted.