- 发出请求
- 模型接口
- 完成对象
- OpenAI接口(Chat)
- Realtime (实时语音、对话)
- Anthropic Claude
- 谷歌Gemini
- Midjourney
- GPTs 相关
- 文生图接口
- 文生音乐
- 文生视频
- Rerank API
- 自动补全接口(Completions)
- 向量生成接口(Embeddings)
- 音频接口(Audio)
- 审查(Moderations)
- Python配置方式
- 帮助中心
- 回收站
查询 GPTs 详情
主站接口①
主站接口①
POST
https://api2.aigcbest.top/v1/chat/completions
请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json
Accept
string
可选
示例值:
application/json
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
model
string
必需
messages
array [object {2}]
必需
role
string
可选
content
string
可选
stream
boolean
必需
示例
{
"model": "get-gpts",
"messages": [
{
"role": "user",
"content": "g-YyyyMT9XH"
}
],
"stream": false
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api2.aigcbest.top/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "get-gpts",
"messages": [
{
"role": "user",
"content": "g-YyyyMT9XH"
}
],
"stream": false
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"id": "chatcmpl-89D59GtSYl6LXt0JjTi8F191HcYjb",
"object": "chat.completion",
"created": 1721897018,
"model": "get-gpts",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "```json\n{\n \"gizmo\": {\n \"id\": \"g-YyyyMT9XH\",\n \"organization_id\": \"org-OROoM5KiDq6bcfid37dQx4z4\",\n \"short_url\": \"g-YyyyMT9XH-chatgpt-classic\",\n \"author\": {\n \"user_id\": \"user-u7SVk5APwT622QC7DPe41GHJ\",\n \"display_name\": \"ChatGPT\",\n \"link_to\": \"https://openai.com\",\n \"is_verified\": true,\n \"selected_display\": \"name\",\n \"will_receive_support_emails\": null,\n \"display_socials\": []\n },\n \"voice\": {\n \"id\": \"ember\"\n },\n \"workspace_id\": null,\n \"model\": null,\n \"instructions\": null,\n \"settings\": null,\n \"display\": {\n \"name\": \"ChatGPT Classic\",\n \"description\": \"The latest version of GPT-4o with no additional capabilities.\",\n \"prompt_starters\": [],\n \"profile_pic_id\": \"file-i9IUxiJyRubSIOooY5XyfcmP\",\n \"profile_picture_url\": \"https://filesystem.site/cdn/20240725/Turvs3jlu1nnQXCKsyzSMoxtVq1K17.jpg\",\n \"categories\": [\n \"other\"\n ]\n },\n \"share_recipient\": \"link\",\n \"created_at\": \"2023-11-06T01:08:05.051553+00:00\",\n \"updated_at\": \"2024-06-13T23:11:16.704860+00:00\",\n \"last_interacted_at\": \"2024-07-25T04:20:35.037883+00:00\",\n \"num_interactions\": 1567,\n \"tags\": [\n \"unreviewable\",\n \"public\",\n \"first_party\"\n ],\n \"version\": null,\n \"live_version\": null,\n \"training_disabled\": null,\n \"sharing_targets\": null,\n \"appeal_info\": null,\n \"vanity_metrics\": {\n \"num_conversations\": null,\n \"num_conversations_str\": null,\n \"created_ago_str\": null,\n \"review_stats\": null\n },\n \"workspace_approval_date\": null,\n \"workspace_approved\": null,\n \"sharing\": null,\n \"current_user_permission\": {\n \"can_read\": true,\n \"can_view_config\": false,\n \"can_write\": false,\n \"can_delete\": false,\n \"can_export\": false,\n \"can_share\": false\n }\n },\n \"tools\": [],\n \"files\": [],\n \"product_features\": {\n \"attachments\": {\n \"type\": \"retrieval\",\n \"accepted_mime_types\": [\n \"application/vnd.oasis.opendocument.text\",\n \"text/x-diff\",\n \"text/x-script.python\",\n \"application/pdf\",\n \"text/css\",\n \"text/x-tex\",\n \"text/calendar\",\n \"application/vnd.apple.pages\",\n \"text/vbscript\",\n \"application/x-scala\",\n \"application/x-rust\",\n \"application/vnd.apple.keynote\",\n \"text/xml\",\n \"application/json\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"text/html\",\n \"text/plain\",\n \"application/x-powershell\",\n \"text/x-csharp\",\n \"text/x-c++\",\n \"text/javascript\",\n \"application/vnd.ms-powerpoint\",\n \"text/x-java\",\n \"text/x-rst\",\n \"application/x-sql\",\n \"application/rtf\",\n \"text/markdown\",\n \"text/x-php\",\n \"application/msword\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"text/x-vcard\",\n \"text/x-shellscript\",\n \"text/x-typescript\",\n \"application/x-yaml\",\n \"text/rtf\",\n \"application/javascript\",\n \"text/x-sh\",\n \"text/x-asm\",\n \"text/x-makefile\",\n \"text/x-lisp\",\n \"text/x-python\",\n \"text/x-c\",\n \"text/x-ruby\",\n \"message/rfc822\"\n ],\n \"image_mime_types\": [\n \"image/gif\",\n \"image/webp\",\n \"image/jpeg\",\n \"image/png\"\n ],\n \"can_accept_all_mime_types\": true\n }\n }\n}\n```"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 14,
"completion_tokens": 974,
"total_tokens": 988
}
}
修改于 2024-10-01 22:07:08