AI Studio
AI-powered creative studio for image generation, video editing, and asset management. Built for creators who want to harness the power of AI.
Overview
Built for AI Creators
This template provides a complete creative suite for AI-powered content creation. Generate images with text prompts, edit videos with timeline controls, and manage all your assets in one unified workspace.
AI Image Generation
Create stunning visuals with text-to-image AI models
Video Timeline Editor
Multi-track editing with clips, audio, and transitions
Asset Management
Organize images, videos, and audio in one place
Real-time Processing
GPU-accelerated rendering with status indicators
Live Demo
Image Generation
Recent Generations
Implementation Guide
Set Up Project Structure
Create the AI studio layout with sidebar and workspace areas.
12345678910111213141516171819// Recommended folder structure src/ ├── app/ │ └── studio/ │ ├── layout.tsx # Studio layout with sidebar │ ├── page.tsx # Main generation page │ ├── video/page.tsx # Video editor │ └── assets/page.tsx # Asset library ├── components/ │ ├── studio/ │ │ ├── Sidebar.tsx │ │ ├── PromptInput.tsx │ │ ├── StyleSelector.tsx │ │ └── GenerationGrid.tsx │ └── video/ │ ├── Timeline.tsx │ └── VideoPreview.tsx └── lib/ └── ai-context.tsx
Create Prompt Input Component
Build the AI prompt input with style selection.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849"use client"; import { useState } from "react"; interface PromptInputProps { onGenerate: (prompt: string, style: string) => void; isGenerating: boolean; } export function PromptInput({ onGenerate, isGenerating }: PromptInputProps) { const [prompt, setPrompt] = useState(""); const [style, setStyle] = useState("Digital Art"); const styles = ["Digital Art", "Photorealistic", "Abstract", "Anime", "Oil Painting"]; return ( <div className="bg-slate-900 rounded-2xl p-6 border border-slate-800"> <textarea value={prompt} onChange={(e) => setPrompt(e.target.value)} placeholder="Describe your image..." className="w-full h-24 bg-slate-800 border border-slate-700 rounded-xl px-4 py-3 text-white" /> <div className="flex flex-wrap gap-2 mt-4"> {styles.map((s) => ( <button key={s} onClick={() => setStyle(s)} className={`px-4 py-2 rounded-lg text-sm ${ style === s ? "bg-gradient-to-r from-amber-600 to-orange-600 text-white" : "bg-slate-800 text-slate-400 border border-slate-700" }`} > {s} </button> ))} </div> <button onClick={() => onGenerate(prompt, style)} disabled={isGenerating || !prompt} className="mt-6 px-6 py-2.5 bg-gradient-to-r from-amber-600 to-orange-600 text-white rounded-xl" > {isGenerating ? "Generating..." : "Generate"} </button> </div> ); }
Build Video Timeline
Create the video editor timeline with tracks.
1234567891011121314151617181920212223242526272829303132333435363738interface TimelineTrack { id: string; type: "video" | "audio"; clips: Clip[]; } interface Clip { id: string; name: string; start: number; duration: number; color: string; } function Timeline({ tracks }: { tracks: TimelineTrack[] }) { return ( <div className="bg-slate-900 rounded-xl border border-slate-800 p-4"> <div className="space-y-2"> {tracks.map((track) => ( <div key={track.id} className="flex items-center gap-2"> <span className="w-16 text-xs text-slate-500">{track.type}</span> <div className="flex-1 h-12 bg-slate-800 rounded-lg flex gap-1 p-1"> {track.clips.map((clip) => ( <div key={clip.id} className={`h-full rounded flex items-center justify-center ${clip.color}`} style={{ width: `${clip.duration}%` }} > <span className="text-xs text-white">{clip.name}</span> </div> ))} </div> </div> ))} </div> </div> ); }
Full Source Code
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980"use client"; import { useState } from "react"; export default function AIStudio() { const [activeTab, setActiveTab] = useState("generate"); const [prompt, setPrompt] = useState(""); const [selectedStyle, setSelectedStyle] = useState("Digital Art"); const [generating, setGenerating] = useState(false); const styles = ["Digital Art", "Photorealistic", "Abstract", "Anime"]; return ( <div className="min-h-screen bg-slate-950 flex"> {/* Sidebar */} <aside className="w-64 bg-slate-900 border-r border-slate-800"> <div className="p-4 border-b border-slate-800"> <div className="flex items-center gap-3"> <div className="w-10 h-10 rounded-xl bg-gradient-to-br from-amber-500 to-orange-500" /> <span className="font-bold text-white">AI Studio</span> </div> </div> <nav className="p-3 space-y-1"> {["generate", "video", "assets"].map((tab) => ( <button key={tab} onClick={() => setActiveTab(tab)} className={`w-full px-3 py-2.5 rounded-xl text-left capitalize ${ activeTab === tab ? "bg-amber-600/20 text-amber-300" : "text-slate-400 hover:bg-slate-800" }`} > {tab === "generate" ? "Image Generation" : tab} </button> ))} </nav> </aside> {/* Main Content */} <div className="flex-1 p-6"> {activeTab === "generate" && ( <div className="max-w-4xl mx-auto space-y-6"> <div className="bg-slate-900 rounded-2xl p-6 border border-slate-800"> <textarea value={prompt} onChange={(e) => setPrompt(e.target.value)} placeholder="Describe your image..." className="w-full h-24 bg-slate-800 rounded-xl px-4 py-3 text-white" /> <div className="flex flex-wrap gap-2 mt-4"> {styles.map((style) => ( <button key={style} onClick={() => setSelectedStyle(style)} className={`px-4 py-2 rounded-lg ${ selectedStyle === style ? "bg-amber-600 text-white" : "bg-slate-800 text-slate-400" }`} > {style} </button> ))} </div> <button onClick={() => setGenerating(true)} className="mt-6 px-6 py-2.5 bg-amber-600 text-white rounded-xl" > {generating ? "Generating..." : "Generate"} </button> </div> </div> )} </div> </div> ); }
Customization Guide
AI Provider Integration
Connect to your preferred AI image generation API.
// Example with OpenAI DALL-E
async function generateImage(prompt: string, style: string) {
const response = await fetch('/api/generate', {
method: 'POST',
body: JSON.stringify({
prompt: `${prompt}, ${style} style`,
size: '1024x1024',
n: 4,
}),
});
return response.json();
}
// Or with Stable Diffusion
async function generateWithSD(prompt: string) {
const response = await fetch('/api/stable-diffusion', {
method: 'POST',
body: JSON.stringify({ prompt }),
});
return response.json();
}Custom Styles
Add your own style presets for generation.
const customStyles = [
{
name: "Cyberpunk",
prompt: "cyberpunk style, neon lights, futuristic",
preview: "/styles/cyberpunk.jpg",
},
{
name: "Watercolor",
prompt: "watercolor painting, soft edges, artistic",
preview: "/styles/watercolor.jpg",
},
{
name: "3D Render",
prompt: "3D render, octane, realistic lighting",
preview: "/styles/3d-render.jpg",
},
];
// Use in component
<StyleSelector
styles={customStyles}
selected={selectedStyle}
onSelect={setSelectedStyle}
/>Video Export Settings
Configure video export options and formats.
const exportSettings = {
formats: ['mp4', 'webm', 'mov'],
resolutions: ['1080p', '4K', '720p'],
frameRates: [24, 30, 60],
};
function ExportModal({ project, settings }) {
return (
<Modal>
<h3>Export Video</h3>
<select name="format">
{settings.formats.map(f => (
<option key={f} value={f}>{f.toUpperCase()}</option>
))}
</select>
<select name="resolution">
{settings.resolutions.map(r => (
<option key={r} value={r}>{r}</option>
))}
</select>
<button onClick={() => exportVideo(project)}>
Export
</button>
</Modal>
);
}Asset Categories
Organize assets with custom categories and tags.
const assetCategories = [
{ id: 'images', label: 'Images', icon: ImageIcon },
{ id: 'videos', label: 'Videos', icon: VideoIcon },
{ id: 'audio', label: 'Audio', icon: MusicIcon },
{ id: 'generated', label: 'AI Generated', icon: SparklesIcon },
];
function AssetLibrary() {
const [category, setCategory] = useState('all');
const [searchQuery, setSearchQuery] = useState('');
const filteredAssets = assets.filter(asset =>
(category === 'all' || asset.type === category) &&
asset.name.includes(searchQuery)
);
return (
<div>
<CategoryTabs
categories={assetCategories}
active={category}
onChange={setCategory}
/>
<AssetGrid assets={filteredAssets} />
</div>
);
}Ready to Build Your AI Studio?
Copy this template, connect your AI provider, and start creating amazing content. All the components you need are included.