AIStudioToAPI  by iBUHub

Google AI Studio to OpenAI/Gemini API adapter

Created 1 month ago
323 stars

Top 84.5% on SourcePulse

GitHubView on GitHub
Project Summary

A wrapper that exposes Google AI Studio as OpenAI- and Gemini-compatible APIs, this project targets developers needing to integrate Google's advanced AI models into their applications using standard API protocols. It simplifies development by abstracting the complexities of direct Google AI Studio web interaction, offering a streamlined experience for accessing Gemini capabilities.

How It Works

The adapter functions as a proxy, employing browser automation to interact with the Google AI Studio web interface. This approach translates incoming API requests into simulated browser actions, enabling access to Gemini models and features like tool calls, image generation, and TTS through widely adopted OpenAI and Gemini API specifications. This method avoids the need for developers to learn new SDKs or directly manage the AI Studio UI.

Quick Start & Requirements

Installation is available via npm or Docker. For direct execution on Windows, macOS, or Linux, clone the repository, run npm run setup-auth to automatically download the Camoufox browser, navigate Google AI Studio, and save authentication credentials, then start the service with npm start. Docker deployment simplifies setup with container execution, volume mounts for authentication files, and optional API key environment variables. Node.js and npm are prerequisites for direct setup.

Highlighted Details

  • Dual API compatibility: Supports both OpenAI and Gemini API formats.
  • Browser automation: Interacts with Google AI Studio via browser automation.
  • Tool Calls: Fully supports Function Calling for both OpenAI and Gemini interfaces.
  • Model Support: Access to Gemini models, including image generation and TTS capabilities.
  • Web Console: Features a visual console for account management, VNC login, and service status monitoring.

Maintenance & Community

The project lists contributors including iBenzene, bbbugg, and 挈挈, alongside others. No specific community channels like Discord or Slack are mentioned in the README.

Licensing & Compatibility

The project is licensed under CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0 International). This license explicitly prohibits commercial use, requiring adherence to the original license terms for use, distribution, and modification.

Limitations & Caveats

Account authentication via VNC login is exclusively supported within Docker containers. Direct execution requires manual setup using the setup-auth script. The CC BY-NC 4.0 license imposes significant restrictions on commercial applications. Deployment on platforms like Zeabur may be limited by free tier resource constraints.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
18
Issues (30d)
18
Star History
292 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.