Find me on Bilibili, YouTube, TikTok, and WeChat Official Account under the same name. Please credit the author when sharing.
Use Deno to proxy Open AI, Claude, Groq and other APIs to mainland China, breaking geographical restrictions.
- Login/Register at https://dash.deno.com/account/projects
- Click "New Playground" in the top right corner
- Copy all code from main.ts into the playground
- Click "Save & Deploy"
- Check the deployed service domain name (looks like: xxx.deno.dev)
- Fill in your domain name, service name to proxy, and API Key in the commands below
Proxy OpenAI
curl --location 'https://YOUR-DOMAIN/api.openai.com/v1/chat/completions' \
--header 'Authorization: Bearer YOUR-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"
}'
Proxy Groq
curl --location 'https://YOUR-DOMAIN/api.groq.com/v1/chat/completions' \
--header 'Authorization: Bearer YOUR-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"
}'