Skip to content

rohilvagarwal/pixelATE-be

Repository files navigation

Pixel Art API with Google Gemini

This Django API converts images to pixel art using Google's Gemini API.

Setup

  1. Install dependencies:

    pip install -r requirements.txt
  2. Set up your Gemini API key:

    # Copy the example file
    cp .env.example .env
    
    # Edit .env and add your API key
    # Get your key from: https://aistudio.google.com/app/apikey
  3. Add your reference pixel art image: Place your reference pixel art sprite at media/pixel_art/reference.png

  4. Run the Django server:

    python manage.py runserver

Testing the API

  1. Test Gemini setup:

    python test_gemini.py
  2. Test the API endpoint:

    python test_api_request.py

Troubleshooting

If you're getting pixelated output instead of AI-generated pixel art:

  1. Check the Django server console for error messages
  2. Verify your API key is correct
  3. Ensure you have an active internet connection
  4. Check if the Gemini API service is available

The API will fall back to simple pixelation if the Gemini API fails.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages