Any AI Proxy API is a software tool designed to create a bridge between OpenAI's API format and various AI websites' web interfaces. It enables developers to interact with AI services like ChatGPT, Gemini AI Studio, and Grok through a REST API that mimics OpenAI's chat completions endpoint.
Key Features:
OpenAI-Compatible API: Supports the /v1/chat/completions endpoints for seamless integration.
Browser Automation: Utilizes ChromeDP with Fingerprint Chromium browser to automate interactions with AI websites.
Request Queue System: Handles requests sequentially through an efficient queue mechanism.
Configurable Workflows: Uses YAML-based configuration files to define and manage different automation workflows.
Multi-AI Service Support: Works with multiple AI platforms, including ChatGPT, Gemini AI Studio, and Grok.
Screenshot Functionality: Provides built-in screenshot capabilities for debugging purposes.
Audience & Benefit:
Ideal for developers and organizations looking to integrate AI services into their applications without relying on direct API access. This tool allows seamless interaction with various AI platforms through a single OpenAI-compatible interface, enabling flexibility and scalability in AI-driven applications.
The software can be installed via winget for easy setup and deployment.
README
Any Proxy API (Go)
A Go-based proxy server that provides OpenAI-compatible API endpoints for Any AI website using browser automation.
Overview
This project creates a bridge between OpenAI's API format and an AI website's web interface. It uses Playwright for browser automation to interact with Any AI website and provides a REST API that mimics OpenAI's chat completions endpoint.
camoufox-path: Path to Camoufox browser executable
api-port: Port for the API server
headless: Run browser in headless mode
instance: Array of AI Studio instances to manage. Each instance has its own configuration. All runner files must be defined in a directory corresponding to the instance name. For details on the runner file syntax, please refer to runner.md
Usage
Starting the Server
go run main.go
The server will start on the configured port (default: 2048).
API Endpoints
Chat Completions
POST http://localhost:2048/v1/chat/completions
Content-Type: application/json
{
"model": "instance-name/model-name",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
]
}
Workflow System
The application uses a YAML-based workflow system to define browser automation sequences. Workflows are stored in the runner/ directory and define step-by-step instructions for interacting with AI Studio.
For detailed information about the runner system, see runner.md.