Skip to content

Commit 1810b71

Browse files
committed
add Cloudflare pages
1 parent d1e229a commit 1810b71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/cloudflare_pages.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@
3636
3737
![Cloudflare_pages6.png](./img/Cloudflare_pages6.png)
3838

39-
**至此便大功告成。等待片刻,应该就可以通过你自己的域名来代替 OpenAI 的 API 地址了,比如在本文的例子中,想要请求 ChatGPT 的 API ,即是把官方 API 地址 https://api.openai.com/v1/chat/completions 换为我自己的域名 https://chatgptproxyapi-cfh.pages.dev/api/v1/chat/completions ,其他参数均参照官方示例即可。由于 Cloudflare 有每天免费 10 万次的请求额度,所以轻度使用基本是零成本的。**
39+
**至此便大功告成。等待片刻,应该就可以通过你自己的域名来代替 OpenAI 的 API 地址了,比如在本文的例子中,想要请求 ChatGPT 的 API ,即是把官方 API 地址 https://api.openai.com/v1/chat/completions 换为我自己的域名 https://openai-proxy-api.pages.dev/api/v1/chat/completions ,其他参数均参照官方示例即可。由于 Cloudflare 有每天免费 10 万次的请求额度,所以轻度使用基本是零成本的。**
4040

4141
### 使用
4242

43-
> 以我的搭建的服务`https://chatgptproxyapi-cfh.pages.dev/` 为例
43+
> 以我的搭建的服务`https://openai-proxy-api.pages.dev/` 为例
4444
4545
1. 对话
4646

4747
```bash
48-
curl --location 'https://chatgptproxyapi-cfh.pages.dev/api/v1/chat/completions' \
48+
curl --location 'https://openai-proxy-api.pages.dev/api/v1/chat/completions' \
4949
--header 'Authorization: Bearer sk-xxxxxxxxxxxxxxx' \
5050
--header 'Content-Type: application/json' \
5151
--data '{
@@ -89,7 +89,7 @@ curl --location 'https://chatgptproxyapi-cfh.pages.dev/api/v1/chat/completions'
8989
2. 查询key余额
9090

9191
```bash
92-
curl --location 'https://chatgptproxyapi-cfh.pages.dev/api/dashboard/billing/credit_grants' \
92+
curl --location 'https://openai-proxy-api.pages.dev/api/dashboard/billing/credit_grants' \
9393
--header 'Authorization: Bearer sk-xxxxxx'
9494

9595
```

0 commit comments

Comments
 (0)