GenAI - Generative Artificial Intelligence API Proxy Service
Last update: 2024/10/02
NOTICE:
Please be aware that although GenAI and its affiliated organization - GitData - do not gather user information through this service, the server
providers for GenAI API proxy service and the Generative AI service providers may engage in such data collection. Furthermore, the
proxy service cannot guarantee a consistent connection speed. Users are strongly encouraged to utilize this
service with caution and at their own discretion.
Motivation
As of January 26, 2024, according to Google, its generative AI API is accessible in 180 regions, while for OpenAI, it spans 188 regions.
This service is expressly designed for individuals contending with geographical restrictions imposed by Generative AI service providers, which may entail limitations on API usage in specific countries or regions. Notably, GenAI's Generative AI API proxy service currently extends support to three prominent generative AI service providers: Google, Moonshot AI, and OpenAI.
It is designed to address the needs of users who hold a valid API key but find themselves outside their home countries or regions due to reasons such as travel, work, or study in locations that may not be covered by certain Generative AI service providers. Whether you are a professional on a business trip, an academic engaged in international research, or a student pursuing studies abroad, this service aims to provide a seamless and accessible experience, ensuring that users can leverage Generative AI capabilities regardless of their current geographical location.
Workflow
-
Request Initiation:
GenAI's API proxy service initiates the process by directing the user's request to its server, strategically located in a country or region that meets the eligibility criteria for specific Generative AI services. This initial step ensures seamless interaction with the Generative AI platform. -
Server Handoff:
Subsequently, GenAI's server takes charge of the request, acting as an intermediary between the user and the official server of the Generative AI service provider. This intermediary role allows for the optimization of the request's journey, enhancing efficiency and reliability. -
Provider's Server Processing:
The user's request then reaches the official server of the Generative AI service provider. This server, equipped with the necessary resources and capabilities, meticulously processes the request, leveraging the power of Generative AI algorithms to generate the desired outcome. -
Response Transmission:
Upon completion of the processing phase, the Generative AI service provider's server generates a response. This response is promptly sent back to GenAI's server, encapsulating the outcomes of the Generative AI computations. -
Relay to User's Device:
GenAI's server takes on the responsibility of relaying the processed response back to the user's device. This final step ensures that the user receives the generated content, thereby completing the cycle of interaction between the user, GenAI's server, and the Generative AI service provider.
Usage
-
General usage
- To proxy an API request for Google's models, substitute the original URL
https://generativelanguage.googleapis.com/
with the proxied URLhttps://api.genai.gd.edu.kg/google/
. - To proxy an API request for Moonshot AI's models, substitute the original URL
https://api.moonshot.cn/
with the proxied URLhttps://api.genai.gd.edu.kg/moonshot/
. - To proxy an API request for OpenAI's models, substitute the original URL
https://api.openai.com/
with the proxied URLhttps://api.genai.gd.edu.kg/openai/
.
- To proxy an API request for Google's models, substitute the original URL
-
R package "GenAI"
Set
TRUE
to parameterproxy
in functionsgenai.google
,genai.moonshot
, andgenai.openai
. -
Python package "GeAI"
Set
True
to parameterproxy
in functionconnect
under module GeAI and use the returned model parameter for text generations and chat generations.
Endpoints
The proxy servers are located in regions as follows:
-
Africa
- Cape Town, South Africa
- Osaka, Japan
- Seoul, South Korea
- Singapore, Singapore
- Tokyo, Japan
- Stockholm, Sweden
- Paris, France
- Dublin, Ireland
- Frankfurt, Germany
- London, United Kingdom
- Cleveland, United States of America
- Portland, United States of America
- San Francisco, United States of America
- Washington, D.C., United States of America
- Sydney, Australia
- São Paulo, Brazil
The determination of which server will proxy the API requests is influenced by the users' local internet conditions and load balancing factors.