ChatGPT、GPT-4 Turbo接口调用

接口地址

https://chat.xutongbao.top/api/light/chat/createChatCompletion

请求方式

post

请求参数

model可选值:

"gpt-3.5-turbo-1106"、 "gpt-3.5-turbo-16k" 、 "gpt-4"、"gpt-4-1106-preview"。 默认值为: "gpt-3.5-turbo-1106"

token获取方式:

访问:https://chat.xutongbao.top/

使用邮箱注册账号

点击【我的】

点击【API】

javascript 复制代码
{
    "model": "gpt-3.5-turbo-1106",
    "token": "sk-3d76d415-dd72-43ff-b7c8-65fb426f1d7b",
    "messages": [
        {
            "role": "user",
            "content": "你好"
        }
    ],
    "params": {
        "n": 1
    }
}

响应数据

javascript 复制代码
{
    "code": 200,
    "data": {
        "completion": {
            "id": "chatcmpl-8JGls95QfaJp8WI9oirVRqK7SMY8h",
            "object": "chat.completion",
            "created": 1699603392,
            "model": "gpt-3.5-turbo-1106",
            "choices": [
                {
                    "index": 0,
                    "message": {
                        "role": "assistant",
                        "content": "你好!有什么可以帮助你的吗?"
                    },
                    "finish_reason": "stop"
                }
            ],
            "usage": {
                "prompt_tokens": 9,
                "completion_tokens": 17,
                "total_tokens": 26
            },
            "system_fingerprint": "fp_eeff13170a"
        },
        "info": {
            "isSdHide": "2",
            "sdLimitCount": 2000,
            "sdTextToImg": 411,
            "token": "sk-3d76d415-dd72-43ff-b7c8-65fb426f1d7b",
            "numOfOneDayCanCallApi": 10,
            "numOfOneDayAlreadyCallApi": 3,
            "apiDate": "2023-11-10"
        }
    },
    "message": "成功"
}

postman截图

相关推荐
Lethehong6 小时前
Gemini 2.5 Pro (0605版本) 深度测评与体验指南
人工智能·chatgpt·googlecloud
深科文库19 小时前
构建 MCP 服务器:第 3 部分 — 添加提示
服务器·python·chatgpt·langchain·prompt·aigc·agi
深科文库1 天前
构建 MCP 服务器:第 4 部分 — 创建工具
python·chatgpt·prompt·aigc·agi·ai-native
幼稚园的山代王1 天前
Prompt Enginering(提示工程)先进技术
java·人工智能·ai·chatgpt·langchain·prompt
二十一_3 天前
🤖✨ ChatGPT API深度体验:让AI看懂图片、听懂语音、调用你的代码
前端·chatgpt·openai
福宝plus3 天前
只需1美元薅ChatGPT Team手把手的教程,教你如何解决“你不符合参与此促销活动折扣资格”或“您的银行卡被拒绝了”附上ChatGPT Team怎么取消订阅
chatgpt·openai·claude
dafanpai4 天前
Claude vs ChatGPT vs Gemini:功能对比、使用体验、适合人群
人工智能·chatgpt
dafanpai4 天前
gemini和chatgpt数据对比:谁在卷性能、价格和场景?
人工智能·chatgpt
爱吃的小肥羊5 天前
ChatGPT又双叒叕升级了,AI编程能联网,记忆功能免费用!
chatgpt·openai
我教你啊5 天前
不连网也能跑大模型?
chatgpt