AI智能类
4.0Ultra & v1

2024-12-22 06:53:18

Start Me
Pasta

累计调用:8248

头像
客源
未开源

专注于企业级API开发与架构设计,5年以上开发经验

星火4.0Ultra

GET

最强大的大语言模型版本,文本生成、语言理解、知识问答、逻辑推理、数学能力等方面实现超越GPT 4-Turbo,优化联网搜索链路,提供更精准回答。

接口地址: https://api.qster.top/API/v1/4.0Ultra
接口示例: https://api.qster.top/API/v1/4.0Ultra/?msg=你好

请求参数

参数名 类型 必填 说明
msg string 问题
type string 默认json 可选json/text
character string 模型自定义角色 例如 “是一个导演”
sessionid string 临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容
qskey string 申请临时密钥

响应参数

参数 说明
problem 你给出的问题或者配置有问题
choices.message.content 聊天返回消息
code 200正常400失败 查看更多

代码示例

<?php
// 要调用的 URL
$url = "https://api.qster.top/API/v1/4.0Ultra";

// 参数数组
$params = [
"msg" => "问题",
"type" => "默认json 可选json/text",
"character" => "模型自定义角色 例如 “是一个导演”",
"sessionid" => "临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容",
"qskey" => "0",
];

// 使用 http_build_query 将参数转换为查询字符串
$queryString = http_build_query($params);

// 在 URL 中添加查询字符串
$finalUrl = $url . '?' . $queryString;

// 使用 file_get_contents 获取内容
$response = file_get_contents($finalUrl);

// 输出响应
echo $response;
?>

import requests

url = "https://api.qster.top/API/v1/4.0Ultra";
params = {
"msg" : "问题",
"type" : "默认json 可选json/text",
"character" : "模型自定义角色 例如 “是一个导演”",
"sessionid" : "临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容",
"qskey" => "0"
}
response = requests.get(url, params=params)
print(response.text)

function fetchData(url, params) {

const queryString = Object.keys(params)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
.join('&');
const fullUrl = `${url}?${queryString}`;

fetch(fullUrl)
.then(response => response.text())
.then(data => {
const resultElement = document.createElement('pre');
resultElement.textContent = data;
document.body.appendChild(resultElement);
})
.catch(error => console.error('Error fetching data:', error));
}

// 示例用法
const url = "https://api.qster.top/API/v1/4.0Ultra";
const params = {
"msg" : "问题",
"type" : "默认json 可选json/text",
"character" : "模型自定义角色 例如 “是一个导演”",
"sessionid" : "临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容",
"qskey" => "0"
};
fetchData(url, params);

在线调试