JARVIS / README.md
kingkolor8's picture
Upload 4 files
cd464a4 verified
|
Raw
History Blame Contribute Delete
1.58 kB
---
title: Gemini AI API (No Login)
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
tags:
- api
- playwright
- gemini
---
# πŸ€– Gemini AI API (Headless & No-Login)
This is a FastAPI-based wrapper for Google Gemini that runs on Hugging Face Spaces using Playwright. It operates in **Guest Mode** (no login required), opens a fresh browser session for every request, and automatically cleans up afterwards to ensure privacy and stability.
## ✨ Features
- πŸ”“ **No Login Required:** Runs in guest mode; no cookies or user_data needed.
- 🧹 **Auto-Cleanup:** Fresh browser instance for every API call.
- πŸ–ΌοΈ **Image Support:** Automatically downloads generated images and uploads them to ImgBB.
- ⚑ **FastAPI:** High-performance async API endpoints.
- 🐳 **Dockerized:** Pre-configured with Chromium and all dependencies.
## πŸš€ Setup Instructions
### 1. Create a Hugging Face Space
- Select **Docker** as the SDK.
- Upload `app.py`, `requirements.txt`, and `Dockerfile`.
### 2. Configure Secrets
Go to your Space **Settings > Variables and Secrets** and add:
- `IMGBB_API_KEY`: Your API key from [ImgBB](https://api.imgbb.com/) (Required for image uploads).
### 3. Files Required
Ensure these files are in your repository:
- `app.py` (Main application code)
- `requirements.txt` (Dependencies)
- `Dockerfile` (Installs Chromium + Python deps)
## πŸ“‘ API Usage
### Endpoint: `/chat`
**Method:** `POST`
**Content-Type:** `application/json`
#### Request Body
```json
{
"message": "Your prompt here"
}