Crescent Remixer: @ Dev-in-the-BM's Google Ai Studio App

Crescent Remixer :crescent_moon::sparkles:

Crescent Remixer is an AI-powered application designed to transform your photos into amazing, new scenes and characters with a single click. Upload a picture of a person, choose some fun options, and let the AI instantly remix your image!


What It Does

This app is a creative playground for your photos, turning a standard portrait into something hilarious and unexpected.

  • Image Transformation: Easily upload a photo of a person and transform them into scenes like a pirate, an astronaut, a superhero, and more.
  • Easy Prompting: Use the Prompt Builder to choose from simple categories like role, action, emotion, and clothes to build your creative prompt.
  • Smart Suggestions: The app provides dynamic prompt suggestions (like “Astronaut,” “singer,” “dancing,” or “wearing glasses”) that change based on what you’ve already selected, making the process intuitive and fun.

How to Get Started

This project contains everything you need to run the application locally.

Prerequisites: You need Node.js installed on your machine.

  1. Install dependencies:

    npm install
    
  2. Set the API Key:
    You need a Gemini API Key to run the app. Create a file named .env.local in the root directory and add your key:

    .env.local

    GEMINI_API_KEY="YOUR_API_KEY_HERE"
    
  3. Run the app:

    npm run dev
    

    The app will start and be available in your web browser, typically at http://localhost:3000.


Under the Hood

The Crescent Remixer app is a React and TypeScript project that leverages Google’s Gemini models for its functionality:

  • Image Transformation: It uses the gemini-2.5-flash-image model. The prompt specifically requests the model to transform the image while maintaining the person’s facial features.
  • Contextual Prompts: A separate model call generates the creative suggestions for the prompt builder in real-time, providing an interactive experience.

:link: Give it a spin! :up_right_arrow:


2 Likes

I must be doing something wrong.

The generate button brings up a screen for about half a second then force closes.

Never used gemini before, got my api key from https://aistudio.google.com/app/api-keys

Are you running it in AI Studio or locally?

Locally. Studio works

Then you’re ahead of me.
I didnt get past AI Studio yet.

But it said in your repo you can run it local

Cuz all apps made in AI Studio are supposed to be able to be run locally.
Instructions how to run locally are set as the readme automatically when you export a project to Gitub.

But the current readme I had Gemini write up.

1 Like

Very cool, though I’d like to run it local.

Aside from Gemini having access, do you?

No.

1 Like

Is it blocked by filters?

What?

Its on Google AI Studio and Github.

Whether Google AI Studio is blocked depends on the filter.
Techloq probably blocks it by default, like all AIs.

I made many changes, completely redid the UI, everything works way smoother now.

Alright, after doing some debugging on local use, I’ve come to the conclusion that your code is correct, but the API usage of this model is not free. Ai studio has its own system.

Also, I noticed the model performs best by selecting the least amount of prompts possible. Too much and the face gets messed up.

The fact that it’s not free for the API I always knew. But I think that the 1.5 model is free (that’s what I use for AI API)

1 Like

I’m almost sure they have a free tier for the API.

I’m used it locally no problem with an API key.

I’m pretty sure 1.5 has been deprecated.

Get an API key over here: https://aistudio.google.com/app/api-keys

I dunno. Tried switching the model to 2.0 flash exp and it does work locally.

With gemini-2.5-flash-image, I get this error:

Remix failed: {"error":{"code":429,"message":"You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_input_token_count, limit: 0\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0\nPlease retry in 4.763020883s.","status":"RESOURCE_EXHAUSTED","details":[{"@type":"type.googleapis.com/google.rpc.QuotaFailure","violations":[{"quotaMetric":"generativelanguage.googleapis.com/generate_content_free_tier_input_token_count","quotaId":"GenerateContentInputTokensPerModelPerMinute-FreeTier","quotaDimensions":{"location":"global","model":"gemini-2.5-flash-preview-image"}},{"quotaMetric":"generativelanguage.googleapis.com/generate_content_free_tier_requests","quotaId":"GenerateRequestsPerMinutePerProjectPerModel-FreeTier","quotaDimensions":{"model":"gemini-2.5-flash-preview-image","location":"global"}},{"quotaMetric":"generativelanguage.googleapis.com/generate_content_free_tier_requests","quotaId":"GenerateRequestsPerDayPerProjectPerModel-FreeTier","quotaDimensions":{"model":"gemini-2.5-flash-preview-image","location":"global"}}]},{"@type":"type.googleapis.com/google.rpc.Help","links":[{"description":"Learn more about Gemini API quotas","url":"https://ai.google.dev/gemini-api/docs/rate-limits"}]},{"@type":"type.googleapis.com/google.rpc.RetryInfo","retryDelay":"4s"}]}}

The exp one ain’t that great