考虑签署我们的新服务:https://xgpt.cloud 更多的功能

Chats

备注
专家级别
API密钥应作为请求的授权头中的一个承载令牌发送。 获取你的API密钥.
列表

API端点:

GET
https://api.xn--gpt-u68dy61b.com/api/v1/chats

要求实例:

curl --location --request GET 'https://api.xn--gpt-u68dy61b.com/api/v1/chats' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
参数
类型
描述
search
可选 string
的搜索查询。
search_by
可选 string
搜索方式. 可能的值是: name姓名. 默认为: name.
favorite
可选 boolean
按最爱过滤。
sort_by
可选 string
排序方式. 可能的值是: id创建日期, name姓名. 默认为: id.
sort
可选 string
排序. 可能的值是: desc降序, asc升序. 默认为: desc.
per_page
可选 int
每页的结果. 可能的值是: 10, 25, 50, 100. 默认为: 25.
显示

API端点:

GET
https://api.xn--gpt-u68dy61b.com/api/v1/chats/{id}

要求实例:

curl --location --request GET 'https://api.xn--gpt-u68dy61b.com/api/v1/chats/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
商店

API端点:

POST
https://api.xn--gpt-u68dy61b.com/api/v1/chats

要求实例:

curl --location --request POST 'https://api.xn--gpt-u68dy61b.com/api/v1/chats' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'description={description}'
参数
类型
描述
name
需要 string
The chat name.
更新

API端点:

PUT PATCH
https://api.xn--gpt-u68dy61b.com/api/v1/chats/{id}

要求实例:

curl --location --request PUT 'https://api.xn--gpt-u68dy61b.com/api/v1/chats/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
参数
类型
描述
name
可选 string
The chat name.
favorite
可选 boolean
Whether the chat is favorite or not.
删除

API端点:

DELETE
https://api.xn--gpt-u68dy61b.com/api/v1/chats/{id}

要求实例:

curl --location --request DELETE 'https://api.xn--gpt-u68dy61b.com/api/v1/chats/{id}' \
--header 'Authorization: Bearer {api_key}'