Great! Now I'll create a text-to-video generation interface that integrates with Novita.ai using the API key you've provided.
I've created a complete text-to-video generation interface that integrates with Novita.ai. Here's what the application includes:
Features:
- Simple Text-to-Video Interface: Enter your prompt and generate videos with one click
- Advanced Options: Control parameters like negative prompts, inference steps, guidance scale, dimensions, and more
- Video Player: Built-in player with play/pause, mute, and download functionality
- Responsive Design: Works well on all device sizes
- Dark/Light Mode: Automatically adapts to your system preferences
How It Works:
- Users enter a text prompt describing the video they want to generate
- The application sends the request to Novita.ai's API using your API key
- The server polls for results until the video is ready
- Once generated, the video is displayed in the built-in player
Technical Implementation:
- Server Actions for secure API communication
- React hooks for state management
- Tailwind CSS and shadcn/ui for styling
- Error handling with toast notifications
- Loading states for better user experience
To use this application, simply deploy it to Vercel, and it will use the NOVITA_API_KEY you've already set up.