主题
列出模型
GET
https://az.gptplus5.com/v1/models
给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
为提供的提示和参数创建完成
请求参数
Authorization
在 Header 添加参数Authorization,其值为在 Bearer 之后拼接 Token
示例:Authorization: Bearer ********************
Header 参数
| 参数名 | 类型 | 必需 | 说明 | 示例 |
|---|---|---|---|---|
Content-Type | string | 必需 | application/json | |
Accept | string | 必需 | application/json | |
Authorization | string | 可选 | Bearer {{YOUR_API_KEY}} |
cURL 示例
bash
curl --location --request GET 'https://az.gptplus5.com/v1/models' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'返回响应
🟢200OK
响应 Body
| 参数名 | 类型 | 必需 | 说明 |
|---|---|---|---|
id | string | 必需 | |
object | string | 必需 | |
created | integer | 必需 | |
choices | array[object] | 必需 | |
└ index | integer | 可选 | |
└ message | object | 可选 | |
└ finish_reason | string | 可选 | |
usage | object | 必需 | |
└ prompt_tokens | integer | 必需 | |
└ completion_tokens | integer | 必需 | |
└ total_tokens | integer | 必需 |
响应示例
json
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}