How to better freeload Gemini:
Google has released Gemini for some time now, and Gemini Pro can be called 60 times 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.
- Open dash.cloudflare.com and click on Workers and Pages in the left menu.
- Click the Create Application button, then click Create Worker.
- Give your worker a name, such as gemini-pro-proxy, and click Deploy.
- You will see a page indicating successful deployment, then click the Edit Code button, modify the code to the following, and click 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))
}
}
- Finally, on this worker page, click on Triggers, add a custom domain, and bind your domain, such as gemini-pro-proxy.abc.com. Just click Add.
Gemini Pro API key acquisition address: makersuite.google.com