File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 36
36
37
37
![ Cloudflare_pages6.png] ( ./img/Cloudflare_pages6.png )
38
38
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 万次的请求额度,所以轻度使用基本是零成本的。**
40
40
41
41
### 使用
42
42
43
- > 以我的搭建的服务` https://chatgptproxyapi-cfh .pages.dev/ ` 为例
43
+ > 以我的搭建的服务` https://openai-proxy-api .pages.dev/ ` 为例
44
44
45
45
1 . 对话
46
46
47
47
``` 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' \
49
49
--header ' Authorization: Bearer sk-xxxxxxxxxxxxxxx' \
50
50
--header ' Content-Type: application/json' \
51
51
--data ' {
@@ -89,7 +89,7 @@ curl --location 'https://chatgptproxyapi-cfh.pages.dev/api/v1/chat/completions'
89
89
2 . 查询key余额
90
90
91
91
``` 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' \
93
93
--header ' Authorization: Bearer sk-xxxxxx'
94
94
95
95
```
You can’t perform that action at this time.
0 commit comments