|
## Claude 测试指南
### 1. 测试 SessionKey
```
curl --location 'https://zhucn.org/api/test_sessionkey' \
--header 'Content-Type: application/json' \
--data-raw '{"token":"sk-ant-sid01-xxxxxxxxxxxxxxxAA[email protected]\"sessionKey=sk-ant-sid01-xxxxxxxxxxxxxxxAA\""}'
```
### 2. 测试 SessionKey(上传文件)
```
curl --location 'https://zhucn.org/api/upload_sessionkey' \
--header 'Content-Type: application/json' \
--form 'file=test.txt"'
```
### 3. 模型列表
```
curl --location 'https://zhucn.org/v1/models' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk-ant-sid01-xxxxxxxxxxxxxxxAA'
```
### 4. 对话接口
```
curl --location 'https://zhucn.org/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk-ant-sid01-xxxxxxxxxxxxxxxAA' \
--data '{"model":"Claude 3.5 Sonnet (New)","messages":[{"role":"user","content":"今天买了两个苹果,昨天吃了一个苹果,还剩下几个苹果呢?"}],"stream":false}'
```
### 5. 判断 SessionKey 是否为 Pro
```
curl --location 'https://zhucn.org/api/is_pro' \
--header 'Content-Type: application/json' \
--data-raw '{"token":"sk-ant-sid01-xxxxxxxxxxxxxxxAA[email protected]\"sessionKey=sk-ant-sid01-xxxxxxxxxxxxxxxAA\""}'
```
### 6. 判断 SessionKey 是否为 Pro(上传文件)
```
curl --location 'https://zhucn.org/api/upload_is_pro' \
--header 'Content-Type: application/json' \
--form 'file="test.txt"'
``` |
|