-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathtest-api.http
More file actions
40 lines (34 loc) · 858 Bytes
/
Copy pathtest-api.http
File metadata and controls
40 lines (34 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
### 环境变量
@baseUrl = http://localhost:39527
@authToken = Bearer sk-qq669846
### 1. 聊天接口 (非流式)
POST {{baseUrl}}/v1/chat/completions
Content-Type: application/json
Authorization: {{authToken}}
{
"model": "gpt-4o",
"messages": [
{"role": "user", "content": "你好,请介绍一下自己"}
]
}
### 2. 聊天接口 (流式)
POST {{baseUrl}}/v1/chat/completions
Content-Type: application/json
Authorization: {{authToken}}
{
"model": "gpt-4o",
"messages": [
{"role": "user", "content": "你好,请介绍一下自己"}
],
"stream": true
}
### 3. 图片生成 - 默认尺寸 (1:1)
POST {{baseUrl}}/v1/images/generations
Content-Type: application/json
Authorization: {{authToken}}
{
"model": "dall-e-3",
"prompt": "一只可爱的小猫",
"n": 1,
"size": "1024x1024"
}