响应生成
curl --request POST \
--url https://api.hubto.ai/v1/responses \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>"
}
'import requests
url = "https://api.hubto.ai/v1/responses"
payload = {
"model": "<string>",
"input": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', input: '<string>'})
};
fetch('https://api.hubto.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"output": [
{}
]
}接口示例
响应生成
OpenAI Responses 接口。
POST
/
v1
/
responses
响应生成
curl --request POST \
--url https://api.hubto.ai/v1/responses \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>"
}
'import requests
url = "https://api.hubto.ai/v1/responses"
payload = {
"model": "<string>",
"input": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', input: '<string>'})
};
fetch('https://api.hubto.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"output": [
{}
]
}用途
用于以 Responses 风格发起生成请求,适合已经采用新接口结构的客户端。请求头
string
默认值:"Bearer YOUR_API_KEY"
必填
Bearer 鉴权请求头,格式为
Bearer YOUR_API_KEY。请求体
string
默认值:"gpt-5.4"
必填
模型名称。
string
默认值:"请概括 HubTo 的核心价值。"
必填
输入内容。
boolean
默认值:"false"
可选,是否流式返回。
integer
默认值:"512"
可选,限制本次生成的最大输出 token 数。
示例请求体
{
"model": "gpt-5.4",
"input": "请概括 HubTo 的核心价值。"
}
响应
string
请求 ID。
object[]
模型输出内容。