Update README.md
Browse files
README.md
CHANGED
|
@@ -60,7 +60,7 @@ license: mit
|
|
| 60 |
curl https://api.anthropic.com/v1/messages ...
|
| 61 |
|
| 62 |
# 替换为本代理
|
| 63 |
-
curl https://
|
| 64 |
-H "x-api-key: 你的访问密钥" \
|
| 65 |
-H "Content-Type: application/json" \
|
| 66 |
-d '{"model": "claude-4-6-sonnet", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'
|
|
@@ -73,7 +73,7 @@ import anthropic
|
|
| 73 |
|
| 74 |
client = anthropic.Anthropic(
|
| 75 |
api_key="你的访问密钥",
|
| 76 |
-
base_url="https://
|
| 77 |
)
|
| 78 |
|
| 79 |
message = client.messages.create(
|
|
@@ -91,7 +91,7 @@ from openai import OpenAI
|
|
| 91 |
|
| 92 |
client = OpenAI(
|
| 93 |
api_key="你的访问密钥",
|
| 94 |
-
base_url="https://
|
| 95 |
)
|
| 96 |
|
| 97 |
response = client.chat.completions.create(
|
|
@@ -146,7 +146,7 @@ response = client.chat.completions.create(
|
|
| 146 |
|
| 147 |
```bash
|
| 148 |
# 添加 Claude Key
|
| 149 |
-
curl -X POST https://
|
| 150 |
-H "Authorization: Bearer $MANAGEMENT_PASSWORD" \
|
| 151 |
-H "Content-Type: application/json" \
|
| 152 |
-d '{
|
|
@@ -155,7 +155,7 @@ curl -X POST https://shenhao-ohmyapi.hf.space/management/clients \
|
|
| 155 |
}'
|
| 156 |
|
| 157 |
# 添加 Gemini Key
|
| 158 |
-
curl -X POST https://
|
| 159 |
-H "Authorization: Bearer $MANAGEMENT_PASSWORD" \
|
| 160 |
-H "Content-Type: application/json" \
|
| 161 |
-d '{
|
|
|
|
| 60 |
curl https://api.anthropic.com/v1/messages ...
|
| 61 |
|
| 62 |
# 替换为本代理
|
| 63 |
+
curl https://ohmyapi-2api.hf.space/v1/messages \
|
| 64 |
-H "x-api-key: 你的访问密钥" \
|
| 65 |
-H "Content-Type: application/json" \
|
| 66 |
-d '{"model": "claude-4-6-sonnet", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'
|
|
|
|
| 73 |
|
| 74 |
client = anthropic.Anthropic(
|
| 75 |
api_key="你的访问密钥",
|
| 76 |
+
base_url="https://ohmyapi-2api.hf.space",
|
| 77 |
)
|
| 78 |
|
| 79 |
message = client.messages.create(
|
|
|
|
| 91 |
|
| 92 |
client = OpenAI(
|
| 93 |
api_key="你的访问密钥",
|
| 94 |
+
base_url="https://ohmyapi-2api.hf.space/openai",
|
| 95 |
)
|
| 96 |
|
| 97 |
response = client.chat.completions.create(
|
|
|
|
| 146 |
|
| 147 |
```bash
|
| 148 |
# 添加 Claude Key
|
| 149 |
+
curl -X POST https://ohmyapi-2api.hf.space/management/clients \
|
| 150 |
-H "Authorization: Bearer $MANAGEMENT_PASSWORD" \
|
| 151 |
-H "Content-Type: application/json" \
|
| 152 |
-d '{
|
|
|
|
| 155 |
}'
|
| 156 |
|
| 157 |
# 添加 Gemini Key
|
| 158 |
+
curl -X POST https://ohmyapi-2api.hf.space/management/clients \
|
| 159 |
-H "Authorization: Bearer $MANAGEMENT_PASSWORD" \
|
| 160 |
-H "Content-Type: application/json" \
|
| 161 |
-d '{
|