创建响应
curl --request POST \
--url https://www.anyfast.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.6-sol",
"input": [
{
"role": "user",
"content": "你好!"
}
],
"stream": false,
"temperature": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_output_tokens": 17,
"stop": "<string>",
"n": 1,
"text": {
"format": {}
},
"reasoning": {
"mode": "pro"
},
"tools": [
{}
],
"prompt_cache_options": {},
"tool_choice": "<string>",
"store": true,
"safety_identifier": "<string>",
"user": "<string>"
}
'import requests
url = "https://www.anyfast.ai/v1/responses"
payload = {
"model": "gpt-5.6-sol",
"input": [
{
"role": "user",
"content": "你好!"
}
],
"stream": False,
"temperature": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_output_tokens": 17,
"stop": "<string>",
"n": 1,
"text": { "format": {} },
"reasoning": { "mode": "pro" },
"tools": [{}],
"prompt_cache_options": {},
"tool_choice": "<string>",
"store": True,
"safety_identifier": "<string>",
"user": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gpt-5.6-sol',
input: [{role: 'user', content: '你好!'}],
stream: false,
temperature: 1,
frequency_penalty: 0,
presence_penalty: 0,
max_output_tokens: 17,
stop: '<string>',
n: 1,
text: {format: {}},
reasoning: {mode: 'pro'},
tools: [{}],
prompt_cache_options: {},
tool_choice: '<string>',
store: true,
safety_identifier: '<string>',
user: '<string>'
})
};
fetch('https://www.anyfast.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.anyfast.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-5.6-sol',
'input' => [
[
'role' => 'user',
'content' => '你好!'
]
],
'stream' => false,
'temperature' => 1,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'max_output_tokens' => 17,
'stop' => '<string>',
'n' => 1,
'text' => [
'format' => [
]
],
'reasoning' => [
'mode' => 'pro'
],
'tools' => [
[
]
],
'prompt_cache_options' => [
],
'tool_choice' => '<string>',
'store' => true,
'safety_identifier' => '<string>',
'user' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.anyfast.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"gpt-5.6-sol\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"你好!\"\n }\n ],\n \"stream\": false,\n \"temperature\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"max_output_tokens\": 17,\n \"stop\": \"<string>\",\n \"n\": 1,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {\n \"mode\": \"pro\"\n },\n \"tools\": [\n {}\n ],\n \"prompt_cache_options\": {},\n \"tool_choice\": \"<string>\",\n \"store\": true,\n \"safety_identifier\": \"<string>\",\n \"user\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.anyfast.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-5.6-sol\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"你好!\"\n }\n ],\n \"stream\": false,\n \"temperature\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"max_output_tokens\": 17,\n \"stop\": \"<string>\",\n \"n\": 1,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {\n \"mode\": \"pro\"\n },\n \"tools\": [\n {}\n ],\n \"prompt_cache_options\": {},\n \"tool_choice\": \"<string>\",\n \"store\": true,\n \"safety_identifier\": \"<string>\",\n \"user\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gpt-5.6-sol\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"你好!\"\n }\n ],\n \"stream\": false,\n \"temperature\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"max_output_tokens\": 17,\n \"stop\": \"<string>\",\n \"n\": 1,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {\n \"mode\": \"pro\"\n },\n \"tools\": [\n {}\n ],\n \"prompt_cache_options\": {},\n \"tool_choice\": \"<string>\",\n \"store\": true,\n \"safety_identifier\": \"<string>\",\n \"user\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_0ed94fe7ec73cf560169afd97bba648194b8661d445cfa4244",
"object": "response",
"created_at": 1773132155,
"model": "gpt-5.6-sol",
"status": "completed",
"output": [
{
"id": "msg_0ed94fe7ec73cf56",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "你好!有什么我可以帮您的?",
"annotations": [
{}
]
}
]
}
],
"usage": {
"input_tokens": 8,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 15,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 23
},
"completed_at": 1773132156,
"reasoning": {
"effort": "high",
"summary": "detailed"
},
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}OpenAI
gpt-5.6-sol
使用 Responses API 根据输入创建模型响应。
POST
/
v1
/
responses
创建响应
curl --request POST \
--url https://www.anyfast.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.6-sol",
"input": [
{
"role": "user",
"content": "你好!"
}
],
"stream": false,
"temperature": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_output_tokens": 17,
"stop": "<string>",
"n": 1,
"text": {
"format": {}
},
"reasoning": {
"mode": "pro"
},
"tools": [
{}
],
"prompt_cache_options": {},
"tool_choice": "<string>",
"store": true,
"safety_identifier": "<string>",
"user": "<string>"
}
'import requests
url = "https://www.anyfast.ai/v1/responses"
payload = {
"model": "gpt-5.6-sol",
"input": [
{
"role": "user",
"content": "你好!"
}
],
"stream": False,
"temperature": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_output_tokens": 17,
"stop": "<string>",
"n": 1,
"text": { "format": {} },
"reasoning": { "mode": "pro" },
"tools": [{}],
"prompt_cache_options": {},
"tool_choice": "<string>",
"store": True,
"safety_identifier": "<string>",
"user": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gpt-5.6-sol',
input: [{role: 'user', content: '你好!'}],
stream: false,
temperature: 1,
frequency_penalty: 0,
presence_penalty: 0,
max_output_tokens: 17,
stop: '<string>',
n: 1,
text: {format: {}},
reasoning: {mode: 'pro'},
tools: [{}],
prompt_cache_options: {},
tool_choice: '<string>',
store: true,
safety_identifier: '<string>',
user: '<string>'
})
};
fetch('https://www.anyfast.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.anyfast.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-5.6-sol',
'input' => [
[
'role' => 'user',
'content' => '你好!'
]
],
'stream' => false,
'temperature' => 1,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'max_output_tokens' => 17,
'stop' => '<string>',
'n' => 1,
'text' => [
'format' => [
]
],
'reasoning' => [
'mode' => 'pro'
],
'tools' => [
[
]
],
'prompt_cache_options' => [
],
'tool_choice' => '<string>',
'store' => true,
'safety_identifier' => '<string>',
'user' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.anyfast.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"gpt-5.6-sol\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"你好!\"\n }\n ],\n \"stream\": false,\n \"temperature\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"max_output_tokens\": 17,\n \"stop\": \"<string>\",\n \"n\": 1,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {\n \"mode\": \"pro\"\n },\n \"tools\": [\n {}\n ],\n \"prompt_cache_options\": {},\n \"tool_choice\": \"<string>\",\n \"store\": true,\n \"safety_identifier\": \"<string>\",\n \"user\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.anyfast.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-5.6-sol\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"你好!\"\n }\n ],\n \"stream\": false,\n \"temperature\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"max_output_tokens\": 17,\n \"stop\": \"<string>\",\n \"n\": 1,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {\n \"mode\": \"pro\"\n },\n \"tools\": [\n {}\n ],\n \"prompt_cache_options\": {},\n \"tool_choice\": \"<string>\",\n \"store\": true,\n \"safety_identifier\": \"<string>\",\n \"user\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gpt-5.6-sol\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": \"你好!\"\n }\n ],\n \"stream\": false,\n \"temperature\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"max_output_tokens\": 17,\n \"stop\": \"<string>\",\n \"n\": 1,\n \"text\": {\n \"format\": {}\n },\n \"reasoning\": {\n \"mode\": \"pro\"\n },\n \"tools\": [\n {}\n ],\n \"prompt_cache_options\": {},\n \"tool_choice\": \"<string>\",\n \"store\": true,\n \"safety_identifier\": \"<string>\",\n \"user\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "resp_0ed94fe7ec73cf560169afd97bba648194b8661d445cfa4244",
"object": "response",
"created_at": 1773132155,
"model": "gpt-5.6-sol",
"status": "completed",
"output": [
{
"id": "msg_0ed94fe7ec73cf56",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "你好!有什么我可以帮您的?",
"annotations": [
{}
]
}
]
}
],
"usage": {
"input_tokens": 8,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 15,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 23
},
"completed_at": 1773132156,
"reasoning": {
"effort": "high",
"summary": "detailed"
},
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
GPT-5.6 Sol 旗舰模型 ID。
可用选项:
gpt-5.6-sol 示例:
"gpt-5.6-sol"
供模型生成响应的文本或图像输入。
Minimum array length:
1Show child attributes
Show child attributes
示例:
[{ "role": "user", "content": "你好!" }]
为 true 时通过 SSE 流式传输响应增量。
采样温度,值越高输出越随机。
必填范围:
0 <= x <= 2示例:
1
根据 Token 在文本中出现的频率对其进行惩罚。
必填范围:
-2 <= x <= 2对已在文本中出现过的 Token 进行惩罚。
必填范围:
-2 <= x <= 2最大输出 Token 数。
必填范围:
x >= 16触发停止生成的序列。
生成的响应候选数量。
必填范围:
x >= 1模型文本响应的配置选项。
Show child attributes
Show child attributes
模型推理/思考的配置。
Show child attributes
Show child attributes
模型可调用的工具列表。
在支持时配置显式提示缓存。
控制模型调用哪个(如果有)工具。
是否存储生成的响应以供后续通过 API 检索,默认为 true。
稳定且保护隐私的终端用户标识,用于安全系统。
代表终端用户的唯一标识符。
响应
响应生成成功
示例:
"resp_0ed94fe7ec73cf560169afd97bba648194b8661d445cfa4244"
示例:
"response"
响应创建时的 Unix 时间戳。
示例:
1773132155
示例:
"gpt-5.6-sol"
可用选项:
completed, failed, in_progress, incomplete 示例:
"completed"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
响应完成时的 Unix 时间戳。
示例:
1773132156
Show child attributes
Show child attributes
Show child attributes
Show child attributes
此页面对您有帮助吗?
⌘I