General Introduction
Gemini Playground is an open source project designed to help users quickly deploy a multimodal dialog site . The project is developed by technical crawling shrimp , support the use of Gemini API Key deploys in less than 10 seconds. It can be deployed serverless via Deno or Cloudflare Worker and is mobile-ready, no matter where the user is located. The project will Gemini Chat API converted to a more general OpenAI formatIt is also available in China. Users can integrate it into AI clients such as AI Programming and ChatBox to provide a convenient multimodal conversation experience.
Function List
- Rapid deployment: Deploy multimodal dialog sites in as little as 10 seconds.
- Serverless deployment: Deno and Cloudflare Worker deployment methods are supported.
- multimodal dialog: Supports text, voice, video and other forms of dialog.
- API Proxy: Converted the Gemini Chat API to OpenAI format for domestic users.
- Mobile Adaptation: Adapt to cell phones and have conversations anytime, anywhere.
- AI Programming Integration: May be used in conjunction with ChatBox and other AI client integrations to support AI programming.
Using Help
Installation process
Deno deployment (recommended)
- Prepare a Gemini API Key (available for free).
- Fork this item.
- Login or Register Deno Account.
- Create a new project, select this project and fill in the project name (the project name will affect the automatically assigned domain name).
- Fill in the Entrypoint field
src/deno_index.ts
, leaving the other fields blank. - Click "Deploy Project" button, after successful deployment, you will get the domain name, open it and use it.
Cloudflare Worker Deployment
- Prepare a Gemini API Key (available for free).
- Click the Deploy button and log in to your Cloudflare account.
- Fill in the Account ID and API Token.
- Fork this project and enable Github Action.
- After the deployment is complete, open the Cloudflare Dashboard to view the deployed worker.
- Domestic use requires custom domain name binding, Deno deployment is recommended to avoid routing issues.
Usage
- multimodal dialog: Fill in the API Key in the website and click the "Connect" button to start a conversation. Support enable microphone, camera and share screen.
- API Proxy: The API has been proxied to the OpenAI format and users can directly use the API in OpenAI format by replacing the domain name and Gemini API Key.
- Get a list of available models:
bash
curl --location 'http://your.domain.com/v1/models' \
--header 'Authorization: Bearer YOUR-GEMINI-API-KEY'
- Have a conversation:
bash
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.0-flash-exp"
}'
- Get a list of available models: