{"id":25693595,"url":"https://github.com/chen86860/vercel-openai-proxy","last_synced_at":"2026-02-18T17:31:17.363Z","repository":{"id":259358368,"uuid":"849654170","full_name":"chen86860/vercel-openai-proxy","owner":"chen86860","description":"Use Vercel Edge Functions to proxy requests to OpenAI services, addressing accessibility issues in regions where OpenAI is unavailable","archived":false,"fork":false,"pushed_at":"2024-12-31T02:22:16.000Z","size":99,"stargazers_count":2,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T15:49:26.222Z","etag":null,"topics":["openai","proxy-server","vercel"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chen86860.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-30T01:54:10.000Z","updated_at":"2025-10-08T03:16:46.000Z","dependencies_parsed_at":"2024-10-24T20:21:26.310Z","dependency_job_id":"8773bb2a-51e0-46ab-a581-667601054c51","html_url":"https://github.com/chen86860/vercel-openai-proxy","commit_stats":null,"previous_names":["chen86860/vercel-openai-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chen86860/vercel-openai-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen86860%2Fvercel-openai-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen86860%2Fvercel-openai-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen86860%2Fvercel-openai-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen86860%2Fvercel-openai-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chen86860","download_url":"https://codeload.github.com/chen86860/vercel-openai-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen86860%2Fvercel-openai-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29587078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openai","proxy-server","vercel"],"created_at":"2025-02-24T23:39:52.023Z","updated_at":"2026-02-18T17:31:17.309Z","avatar_url":"https://github.com/chen86860.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](README_ZH.md)\n\n# Vercel Region OpenAI Proxy\n\nUse Vercel Edge Functions to proxy requests to OpenAI services, addressing accessibility issues in regions where OpenAI is unavailable (e.g., Hong Kong, Mainland China).\n\nYou can also refer to this example to request other proxy services by specifying the region, not limited to OpenAI.\n\n## Deployment\n\nRegister a Vercel account, then click the button below to deploy this project to Vercel.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fchen86860%2Fvercel-openai-proxy\u0026project-name=vercel-openai-proxy)\n\n## Usage\n\nAfter deployment, you will receive a URL like `https://your-project-name-xxxx.vercel.app`. The proxy request URL should be `https://your-project-name-xxxx.vercel.app/openai/`, and you can use this URL to proxy requests to OpenAI services.\n\n### Example\n\nUsing the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to make a request:\n\n```js\n// request openai api, just replace https://api.openai.com to https://your-project-name-xxxx.vercel.app/openai/\nconst response = await fetch(\"https://your-project-name-xxxx.vercel.app/openai/v1/chat/completions\", {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    Authorization: \"Bearer OPENAI_KEY_HERE\",\n  },\n  body: JSON.stringify({\n    model: \"gpt-3.5-turbo\",\n    messages: [{ role: \"user\", content: \"Hello, world!\" }],\n  }),\n});\n```\n\nUsing the [openai](https://www.npmjs.com/package/openai) library to make a request:\n\n```js\nconst openai = new OpenAI({\n  apiKey: \"OPENAI_KEY_HERE\",\n  // Just set the baseURL\n  baseURL: \"https://your-project-name-xxxx.vercel.app/openai/v1/\",\n});\n```\n\n## Configuration\n\nBy default, unsupported regions have been excluded. If you need to add or modify regions, you can do so in `src/app/openai/[...path]/route.ts`.\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen86860%2Fvercel-openai-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchen86860%2Fvercel-openai-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen86860%2Fvercel-openai-proxy/lists"}