tech-shrimp/gemini-playground
About
Deploy a serverless Gemini multimodal chat website in 10 seconds. All you need is a Gemini API key.
AI & Machine LearningMeasured star growth
- in 24h
- -1
- in 7 days
- -3
- in 15 days
- -3
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.MD
OriginalGemini 2.5 Playground
Author: Tech Shrimp
Available on Bilibili, YouTube, Douyin, and WeChat Official Account under the same name. Please credit the author when reposting.
Project Overview
Demo: https://play.210718.xyz
Deploy a Gemini multimodal chat website in 10 seconds with just a Gemini API Key. Accessible from any region/network environment, ready to use immediately. Free serverless deployment using Deno/Cloudflare Worker. Converts Gemini Chat API to the more universal OpenAI format, accessible directly within China. Compatible with AI programming, can be integrated with ChatBox and other AI clients.
Deno Deployment (Recommended)
Fork this project
Login/Register at https://dash.deno.com/
Create a project at https://dash.deno.com/new_project
Select this project, enter project name (please choose carefully as it affects the auto-assigned domain)
Set Entrypoint to
src/deno_index.ts, leave other fields emptySee image

Click Deploy Project
After successful deployment, you'll get a domain name. The site is ready to use, and the domain can also be used as a Chat API proxy.
Cloudflare Worker Deployment
Click the deploy button
Login to your Cloudflare account
Enter Account ID and API Token
Fork this project, enable Github Action
Deploy, open dash.cloudflare.com to view the deployed worker
For use in China, a custom domain name needs to be bound
See image

When using Cloudflare in China, you might encounter "400: User location is not supported for the API use." This might be due to Cloudflare routing to Hong Kong CDN nodes in the Guangdong-Hong Kong region. Recommend switching to Deno deployment.
Local Development
Install Deno on Windows:
irm https://deno.land/install.ps1 | iex
Install Deno on Mac/Linux:
curl -fsSL https://deno.land/install.sh | sh
Start the project:
cd project_directory
deno run --allow-net --allow-read src/deno_index.ts
Usage
Multimodal Chat
Enter API Key, click Connect button to start chatting. The three buttons are for:
- Enable microphone
- Enable camera
- Share screen

API Proxy
The API has been proxied to OpenAI format and can be used directly with OpenAI format API. Remember to replace the domain and Gemini API Key.
Curl:
Available models:
curl --location 'http://your.domain.com/v1/models' \
--header 'Authorization: Bearer YOUR-GEMINI-API-KEY'
Chat:
curl --location 'https://your.domain.com/v1/chat/completions' \
--header 'Authorization: Bearer YOUR-GEMINI-API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "system",
"content": "You are a test assistant."
},
{
"role": "user",
"content": "Testing. Just say hi and nothing else."
}
],
"model": "gemini-2.5-flash"
}'
ChatBOX:
See image
Cursor Programming:
See image
Acknowledgments/References:
Website UI:
Author: ChrisKyle
Project: https://github.com/ViaAnthroposBenevolentia/gemini-2-live-api-demo
MIT License : https://github.com/ViaAnthroposBenevolentia/gemini-2-live-api-demo/blob/main/LICENSE
Gemini to OpenAI format conversion:
Author: PublicAffairs
Project: https://github.com/PublicAffairs/openai-gemini
MIT License : https://github.com/PublicAffairs/openai-gemini/blob/main/LICENSE
Explore related projects
Loading…