Inspiration
Two main driving factors inspired this project:
My love for anime
I’ve been watching anime for years, and the stories and visuals stick with me long after the credits roll. Binge-watching and reading countless episodes has even helped me pick up Japanese phrases and words without realizing it.A growth mindset
I challenge myself to learn something new every day—whether it’s current affairs, financial decisions, quantum physics, or computer science. Personal growth is exciting, but the daily grind of acquiring knowledge can sometimes feel monotonous.
These two passions are powerful on their own, however they create very different impacts. Anime entertains, while constant learning positively impacts self-improvement but can become tedious. I’ve noticed many friends and colleagues share the same struggle: they want to have fun and stay productive.
That’s why building 5 Minute Anime for the Perplexity Hackathon felt like a no-brainer. Everyone learns through the internet these days, and Perplexity is known for reliable, source-backed answers. Integrating the Sonar API was obvious—it delivers accuracy and depth that other models can’t match.
What It Does
5 Minute Anime harnesses the accuracy of the Sonar API and the creativity of an image-generation model to let anyone learn anything in the way they prefer.
Imagine a child who loves cartoons but hates studying. What if you could generate a custom storybook where their favorite anime characters teach math, history, or science? Suddenly, learning becomes fun.
Now scale that idea to any topic or skill. No matter how intimidating the subject, quantum physics, world events, or language lessons-5 Minute Anime transforms it into a themed anime story. By tailoring both the narrative and visuals to each user’s interests, the application could make even the toughest concepts feel engaging and accessible.
How We Built It
I chose Next.js, a modern React framework, to speed up development and combine frontend and backend logic in a single monorepo. Its built-in API routes make it easy to proxy requests and keep all application code together.
For AI content, I integrated the Sonar API because of its reliability, accuracy, and fast, source-grounded responses. Sonar fetches real facts, weaves them into a coherent anime-style narrative, and even generates detailed image prompts. Those prompts are then sent to an image-generation model to create the artwork that brings each story page to life.
Challenges We Ran Into
I encountered two major hurdles during development:
Prompt Engineering
Tuning the system prompts for both Perplexity’s Sonar API and the image-generation model took a lot of trial and error. Crafting a prompt that reliably produces accurate, story-ready facts and then converting those facts into effective image-generation prompts required careful iteration and adherence to best practices.Performance Optimization Generating multiple AI images can be slow, which risks breaking the user experience. I had to optimize API calls minimizing redundant data transfers to ensure each anime loads smoothly and quickly.
Accomplishments We’re Proud Of
- Robust Prompt Engineering
Through extensive iteration and testing, I crafted and refined system prompts for both the Sonar API and the image-generation model resulting in consistently accurate narratives and high-quality visuals across all five pages.
What We Learned
- The power of prompt engineering
By iterating on detailed system prompts, I discovered how reliably Sonar can generate accurate, consistent narratives proving the value of precise prompt engineering.
What’s Next for 5 Minute Anime
Our vision is to build a community where learning and creativity go hand in hand. Here’s what’s on the roadmap:
Community Showcase
A gallery where users can share their custom anime stories, celebrate each other’s work, and discover new topics.Collaborative Storytelling
Let multiple users co-create a mini-manga where each person contributes a page or character, turning learning into a group adventure.Expanded AI Tools
Introduce voice narration, animated GIF exports, and deeper customization (fonts, colour palettes, panel layouts) to keep the fun alive.
Built With
- css3
- html5
- javascript
- next.js
- node.js
- react
- tailwind
- typescript



Log in or sign up for Devpost to join the conversation.