Inspiration

The inspiration behind Hero AI stems from a simple yet powerful belief: everyone, regardless of age – from young children to teenagers, and even adults – holds an unlimited capacity for imagination and the potential to be the protagonist of their own story. In an increasingly digital world, I was inspired to leverage technology (AI) not to standardize creativity, but to stimulate and personalize it for all. The goal was to create a tool that invites every user to step into the shoes of a hero, to explore imaginary worlds where their own name and a simple idea are the starting point for extraordinary adventures, accompanied by a unique illustration and made downloadable to be kept and re-read at any time, all in their preferred language. The powerful and straightforward affirmation, "I am a Hero," has been the driving force behind this universal vision.

What it does

Hero AI is an interactive and intuitive application that allows anyone to become the hero of a unique story, enriched with an AI-generated image or illustration, and downloadable in PDF format in the user's chosen language. It's simple: The user can set the app's language and the language in which the story will be generated. They then enter their name (or the name they wish to give their hero). They input a random keyword (an object, an animal, a place, an emotion – anything!). In an instant, our powerful AI (via the Gemini API) weaves an original and inspiring adventure, with the user's name at its core and the keyword creatively integrated into the narrative, and generates a unique image or illustration to accompany this story. The user can then download the complete story with its illustration in PDF format, to read and re-read offline at their leisure. The app aims to entertain, stimulate imagination, and build self-confidence by placing each user at the center of a captivating, visually engaging, and easily savable narrative, accessible in their preferred language, and suitable for a wide, international audience.

How we built it

The development of Hero AI was entirely carried out on the Bolt.new platform, leveraging its flexibility to integrate external APIs and file management capabilities. Here are the key steps in our process: User Interface (UI) Design with Localization: We created a clean and engaging user interface. This includes a welcoming homepage, clear input fields for the hero's name and keyword, an intuitive action button, and a visible and easy-to-access language selector for the app itself. A dedicated space for displaying the story and illustration was also integrated. Gemini API Integration with Multilingual Handling: The technical core of Hero AI relies on the multimodal Gemini API. When a user submits their name and a keyword, a request is sent to the Gemini API. The configured prompt includes instructions to generate a coherent and engaging story, adapted for a broad audience, integrating the name and keyword. Crucially, we added a parameter to the prompt to specify the desired output language for the story, based on the user's choice. The prompt also contains instructions for Gemini to generate an image or illustration that matches the style and content of the story. Display and Interaction: The story generated by Gemini and the image URL/image itself are then displayed on a new page. A "Start Over" button allows users to generate new adventures. PDF Download Functionality: After the story and image are generated, we utilize export capabilities (either via Bolt.new's built-in page/content-to-PDF conversion, or by integrating a third-party PDF generation API) to assemble the story text and its illustration into a structured PDF document. The language of the text in the PDF, of course, matches the language chosen by the user. A clear "Download Story as PDF" button is made available to the user. Testing and Iterations: We rigorously tested the app with various inputs and in different languages, refining the prompts for the Gemini API and the PDF download functionality to ensure quality, creativity, relevance, and perfect integration of all components, including localization.

Challenges we ran into

Integrating image generation via the Gemini API, PDF download functionality, and multilingual management added new layers of challenges: Multilingual AI Consistency: A significant challenge was ensuring the AI generates high-quality and consistent stories across different languages while integrating the keyword meaningfully. The quality of the AI's internal translations and its ability to maintain tone and style in various languages required precise prompt adjustments. Implementing Language Selector and UI Localization: Dynamically managing the app's user interface language (buttons, labels, messages) via Bolt.new required careful planning for a seamless user experience. Harmonizing Text-Image Across Languages: Ensuring the generated image remains relevant and consistent with the story, regardless of the text language, demanded particular attention to the image prompts, which typically remain in English for the AI. Optimizing Prompts for Image Generation: Obtaining quality illustrations suitable for a broad audience required experimenting with different styles and levels of detail in the prompts sent to Gemini for the image part. PDF Download Implementation: The challenge here was finding the most efficient and reliable method to convert dynamic content (generated text and image) into a downloadable PDF file via Bolt.new, ensuring proper formatting and encoding for different languages. Managing Potential API Costs and Limitations: Utilizing the Gemini API for text and image generation, and potentially a PDF API, can have implications for costs and quotas. This needed to be factored into the design and testing. API Response Times and User Flow: Generating text, images, and converting to PDF can take longer than simple text generation. We had to consider how to manage these waiting times to provide a smooth user experience.

Accomplishments that we're proud of

We are particularly proud of several aspects of Hero AI: Complete Multilingual Personalization: Successfully enabling users to create fully personalized stories (text and image) in their chosen language is a major achievement that opens the app to a global audience. Seamless Integration of Text and Image Generation via a Single API (Gemini): Combining these two modalities coherently significantly enriches the user experience. Instant Visual Personalization: Each story is now accompanied by a unique illustration, making every adventure more immersive and memorable. Durable and Portable Story Preservation: The PDF download feature allows users to create a personal library of their heroic adventures, to read and re-read at their leisure, offline. Universal Accessibility and Engagement: Thanks to localization and multilingual personalization, the app becomes universally accessible and engaging for an even broader audience, regardless of age or language. Demonstration of Multimodal AI Power Combined with No-Code Tools: This project highlights the ability of advanced AI models like Gemini to understand and generate different types of content in a coordinated manner, all orchestrated by Bolt.new.

What we learned

This project has been an even richer learning experience: The Potential and Challenges of Multimodal and Multilingual APIs: We concretely explored the capabilities of the Gemini API to generate both text and images in different languages, as well as the subtleties and challenges related to obtaining consistent and quality results on an international scale. The Importance of Precise Multimodal and Multilingual Prompts: Crafting prompts that guide the AI to generate both a story and a relevant image, while specifying the output language, is an art that requires experimentation and finesse. The Added Value of Visual Content and Portability: The addition of personalized illustrations and the ability to download as a PDF significantly enhances user engagement and immersion in the story, transforming an ephemeral digital experience into a tangible keepsake. Orchestrating Third-Party APIs with Bolt.new: We learned to integrate different layers of functionality (AI, PDF generation, localization) within Bolt.new's no-code environment. Managing API Resources and Performance: It's crucial to understand and manage aspects related to costs, rate limits, and API response times, especially for resource-intensive tasks like image generation and PDF conversion.s.

What's next for Hero AI

The adventure of Hero AI is just beginning! Here's what we envision for the future: Enhanced Visual and Narrative Style Control: Offer users more options to influence the genre, tone, and artistic style of the generated illustrations and narratives, with even finer linguistic adaptation. Deeper Interactivity Options: Integrate decision points within the story, where the user can choose the course of the adventure, making the narrative even more immersive. Integrated Story Library: Allow users to save their favorite stories directly within the app, with an easy-to-manage interface. Advanced Sharing Features: Provide optimized sharing options for social media or email. Audio Exploration: Integrate AI-generated voiceovers to read stories in different languages, making the experience even richer. Our goal is to continue developing Hero AI to make it an essential platform for creating personalized, enriched, and easily accessible stories, where everyone's imagination truly comes to life.

Built With

Share this project:

Updates