• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

I Built a Full-Stack Proxy with a Dashboard to Scale the Gemini API. Stop Juggling Keys

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,477
Баллы
155


Hey Dev Community! 👋

If you're like me, you love hacking on projects with the Google Gemini API. But you also know that feeling... you're in the zone, code is flowing, and BAM! Rate limit exceeded. 😭

The free tier is fantastic, but that RPM/RPD limit can be a real creativity killer.

This exact problem bugged me so much that I decided to build my first major open-source project to solve it. I'm super excited (and a little nervous!) to share it with you all:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

.

🚀 This project is fresh off the press and actively being developed! I'm constantly adding new features, fixing bugs, and improving the developer experience. Your feedback and contributions are not just welcome—they're essential to making this tool amazing for the entire community.

✨ What's in the Box?

  • 🔑 Stop Juggling API Keys → Throw all your Google Gemini keys into one secure spot (a Supabase DB). The dashboard lets you add, toggle, or remove them on the fly. No more .env file madness!
  • ⚖ Automatic Load Balancing → It smartly spreads your requests across all your active keys. If one key gets tired and hits its limit, the proxy just grabs the next one. Zero downtime for your app.
  • 🛡 Your Own Secret Handshake → Create special proxy keys for your apps. This means your real Google API keys never leave the backend. Super secure!
  • 📊 Know What's Happening → A built-in dashboard shows you logs, performance, and usage in real-time. No more flying blind!
  • 🌍 Deploy It Your Way → The full-stack Next.js app is the easiest way to get everything, but if you just need the core logic, you can deploy it to Vercel Edge, Cloudflare Workers, and more.
🏗 How It Works


The concept is simple but powerful. Your application makes requests to your deployed Gemini Proxy instance using a proxy key. The proxy then uses Supabase as its "brain" to fetch an available Google Gemini API key, forward the request, and log the transaction.


Your App → Gemini Proxy → Google Gemini API

Supabase (for keys, logs, and metrics)



🚀 Get Up & Running in 5 Minutes


I wanted the setup to be as painless as possible. You can get the full experience (dashboard included!) up and running in about 5 minutes.

  1. Prep Supabase → You'll need a Supabase project to act as the brain. I made an

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    and a

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    with pictures and everything to walk you through it.
  2. One-Click Deploy to Vercel → Just hit this magic button on

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    . It'll clone the repo and get you ready to go.
  3. Connect to Supabase → Vercel will ask for your Supabase URL and key. Just paste 'em in.
  4. Launch! → You're live! You have a running instance with a dashboard.
  5. Feed It Some Keys → Now for the fun part. Use the CLI or the shiny new web UI to add your first proxy key and all your Google Gemini API keys.
💻 Show Me the Code


Okay, you're deployed. Now what? Just point your favorite AI library to your new proxy URL. Here's how it looks with the Official Google Genai. Check out how clean this is:


import { GoogleGenAI } from '@Google/genai';

const genAI = new GoogleGenAI({
apiKey: 'YOUR_PROXY_API_KEY',
httpOptions: {
baseUrl: '

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

',
},
});

// Generate content
const response = await genAI.models.generateContent({
model: 'gemini-2.0-flash',
contents: 'Count from 1 to 10',
});

console.log(response.text);




And boom! Your app is now supercharged, running through a scalable, managed proxy that you control.

🔥 This Project Needs YOUR Help


🔥 This project is in active development and I need YOUR help!

Honestly, this is my first big open-source project, and I'm really passionate about making it something the community finds useful. For now, my main collaborator has been AI (it's been an interesting journey, ask me about it sometime!), but I know that the best projects are built with people.

That's where you come in - and I genuinely appreciate every contribution!

  • 🐛 Found a bug?

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    - Please report it! I'm actively fixing issues and your bug reports help me make this tool rock-solid.
  • 💡 Got an idea?

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    - I'm all ears! Feature requests, improvements, or even just suggestions for better UX are incredibly valuable.
  • 👩‍💻 Want to contribute code?

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    - Pull requests are always welcome! Whether it's fixing a typo, adding a feature, or improving performance - every contribution matters and I'll make sure to acknowledge your hard work.
  • 📝 Questions about the code? → Don't hesitate to ask! I'm here to learn and grow with all of you, and your questions help me improve both the code and the documentation.

I'm looking for feedback, ideas, and maybe even a few brave souls who want to contribute. If you read my code and have questions or see a better way to do something, please tell me! I'm here to learn and grow with all of you.


👉 Check out the Repo:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



If you think this is a cool idea, please give it a ⭐ on GitHub! It would seriously make my day.

This is my first major open-source project, and I'm committed to making it amazing with your help. Let's build something great together!



Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу