banner
macintel

macintel

Better Freeloading Gemini

How to better freeload Gemini:
Google has released Gemini for a while now, and Gemini Pro allows 60 calls for free in 1 minute. It's already very comfortable for personal use. However, due to network issues in China, many people cannot easily use it.

If we have Cloudflare, it would be easier. I assume you already have a domain hosted on CF.

  1. Open dash.cloudflare.com and click on Workers and Pages in the left menu.
  2. Click on the "Create an Application" button, then click on "Create Worker".
  3. Give your worker a name, such as "gemini-pro-proxy", and click on "Deploy".
  4. You will see a page indicating successful deployment, then click on the "Edit Code" button, modify the code to the following, and click on "Save and Deploy".
export default {
async fetch(request, env) {
const url = new URL(request.url);
url.host = 'generativelanguage.googleapis.com';
return fetch(new Request(url, request))
}
}
  1. Finally, on this worker page, click on "Triggers", add a custom domain, bind your domain, such as gemini-pro-proxy.abc.com, and click on "Add".

The API key for Gemini Pro can be obtained at makersuite.google.com.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.