cURL
curl --request POST \
--url https://www.anyfast.ai/v1/responses \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-6.1-sol",
"input": "Review this retry design and propose a safe implementation plan.",
"reasoning": {"effort":"high","summary":"auto"},
"max_output_tokens": 4096
}'import requests
url = "https://www.anyfast.ai/v1/responses"
payload = {
"model": "gpt-6.1-sol",
"input": "<string>",
"instructions": "<string>",
"reasoning": { "effort": "medium" },
"max_output_tokens": 64000,
"text": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
],
"stream": False,
"prompt_cache_key": "<string>",
"prompt_cache_options": { "ttl": "30m" },
"include": ["<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-6.1-sol',
input: '<string>',
instructions: '<string>',
reasoning: {effort: 'medium'},
max_output_tokens: 64000,
text: {},
tools: [
{
type: 'function',
name: '<string>',
description: '<string>',
parameters: {},
strict: true
}
],
stream: false,
prompt_cache_key: '<string>',
prompt_cache_options: {ttl: '30m'},
include: ['<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-6.1-sol',
'input' => '<string>',
'instructions' => '<string>',
'reasoning' => [
'effort' => 'medium'
],
'max_output_tokens' => 64000,
'text' => [
],
'tools' => [
[
'type' => 'function',
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
],
'stream' => false,
'prompt_cache_key' => '<string>',
'prompt_cache_options' => [
'ttl' => '30m'
],
'include' => [
'<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-6.1-sol\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"reasoning\": {\n \"effort\": \"medium\"\n },\n \"max_output_tokens\": 64000,\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"stream\": false,\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"include\": [\n \"<string>\"\n ]\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-6.1-sol\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"reasoning\": {\n \"effort\": \"medium\"\n },\n \"max_output_tokens\": 64000,\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"stream\": false,\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"include\": [\n \"<string>\"\n ]\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-6.1-sol\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"reasoning\": {\n \"effort\": \"medium\"\n },\n \"max_output_tokens\": 64000,\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"stream\": false,\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"include\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "response",
"model": "gpt-6.1-sol",
"status": "queued",
"output": [
{
"id": "<string>",
"type": "<string>",
"status": "<string>",
"role": "<string>",
"phase": "<string>",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{}
],
"logprobs": [
{}
]
}
],
"name": "<string>",
"arguments": "<string>",
"call_id": "<string>"
}
],
"created_at": 123,
"completed_at": 123,
"background": true,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123
}
},
"reasoning": {
"effort": "low",
"summary": "<string>",
"context": "<string>",
"mode": "<string>"
},
"error": {},
"incomplete_details": {},
"content_filters": [
{
"blocked": true,
"source_type": "<string>",
"content_filter_raw": [
{}
],
"content_filter_results": {},
"content_filter_offsets": {}
}
],
"tool_usage": {},
"max_output_tokens": 123,
"max_tool_calls": 123,
"instructions": "<string>",
"metadata": {},
"moderation": {},
"parallel_tool_calls": true,
"previous_response_id": "<string>",
"prompt_cache_key": "<string>",
"prompt_cache_retention": "<string>",
"safety_identifier": "<string>",
"service_tier": "<string>",
"store": true,
"text": {},
"tool_choice": "<string>",
"tools": [
{}
],
"truncation": "<string>",
"user": "<string>",
"frequency_penalty": 123,
"presence_penalty": 123,
"temperature": 123,
"top_p": 123,
"top_logprobs": 123
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}OpenAI
gpt-6.1-sol
通过 AnyFast 创建 GPT-6.1 Sol Responses 或 Chat Completions。
POST
/
v1
/
responses
cURL
curl --request POST \
--url https://www.anyfast.ai/v1/responses \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-6.1-sol",
"input": "Review this retry design and propose a safe implementation plan.",
"reasoning": {"effort":"high","summary":"auto"},
"max_output_tokens": 4096
}'import requests
url = "https://www.anyfast.ai/v1/responses"
payload = {
"model": "gpt-6.1-sol",
"input": "<string>",
"instructions": "<string>",
"reasoning": { "effort": "medium" },
"max_output_tokens": 64000,
"text": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": True
}
],
"stream": False,
"prompt_cache_key": "<string>",
"prompt_cache_options": { "ttl": "30m" },
"include": ["<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-6.1-sol',
input: '<string>',
instructions: '<string>',
reasoning: {effort: 'medium'},
max_output_tokens: 64000,
text: {},
tools: [
{
type: 'function',
name: '<string>',
description: '<string>',
parameters: {},
strict: true
}
],
stream: false,
prompt_cache_key: '<string>',
prompt_cache_options: {ttl: '30m'},
include: ['<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-6.1-sol',
'input' => '<string>',
'instructions' => '<string>',
'reasoning' => [
'effort' => 'medium'
],
'max_output_tokens' => 64000,
'text' => [
],
'tools' => [
[
'type' => 'function',
'name' => '<string>',
'description' => '<string>',
'parameters' => [
],
'strict' => true
]
],
'stream' => false,
'prompt_cache_key' => '<string>',
'prompt_cache_options' => [
'ttl' => '30m'
],
'include' => [
'<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-6.1-sol\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"reasoning\": {\n \"effort\": \"medium\"\n },\n \"max_output_tokens\": 64000,\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"stream\": false,\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"include\": [\n \"<string>\"\n ]\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-6.1-sol\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"reasoning\": {\n \"effort\": \"medium\"\n },\n \"max_output_tokens\": 64000,\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"stream\": false,\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"include\": [\n \"<string>\"\n ]\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-6.1-sol\",\n \"input\": \"<string>\",\n \"instructions\": \"<string>\",\n \"reasoning\": {\n \"effort\": \"medium\"\n },\n \"max_output_tokens\": 64000,\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {},\n \"strict\": true\n }\n ],\n \"stream\": false,\n \"prompt_cache_key\": \"<string>\",\n \"prompt_cache_options\": {\n \"ttl\": \"30m\"\n },\n \"include\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "response",
"model": "gpt-6.1-sol",
"status": "queued",
"output": [
{
"id": "<string>",
"type": "<string>",
"status": "<string>",
"role": "<string>",
"phase": "<string>",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{}
],
"logprobs": [
{}
]
}
],
"name": "<string>",
"arguments": "<string>",
"call_id": "<string>"
}
],
"created_at": 123,
"completed_at": 123,
"background": true,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123
}
},
"reasoning": {
"effort": "low",
"summary": "<string>",
"context": "<string>",
"mode": "<string>"
},
"error": {},
"incomplete_details": {},
"content_filters": [
{
"blocked": true,
"source_type": "<string>",
"content_filter_raw": [
{}
],
"content_filter_results": {},
"content_filter_offsets": {}
}
],
"tool_usage": {},
"max_output_tokens": 123,
"max_tool_calls": 123,
"instructions": "<string>",
"metadata": {},
"moderation": {},
"parallel_tool_calls": true,
"previous_response_id": "<string>",
"prompt_cache_key": "<string>",
"prompt_cache_retention": "<string>",
"safety_identifier": "<string>",
"service_tier": "<string>",
"store": true,
"text": {},
"tool_choice": "<string>",
"tools": [
{}
],
"truncation": "<string>",
"user": "<string>",
"frequency_penalty": 123,
"presence_penalty": 123,
"temperature": 123,
"top_p": 123,
"top_logprobs": 123
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}需要推理与工具调用时使用 Responses API。AnyFast 也接受 low 强度下的 Chat Completions 函数调用;
none 和 minimal 推理强度均不受支持。Responses API 返回
model: "gpt-6.1-sol";Chat Completions 返回 model: "azure/gpt-6.1-sol"。一次请求设置 prompt_cache_options.ttl: "30m" 后,响应仍报告 prompt_cache_retention: "24h";有效缓存时长尚未验证。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
此模型不支持 none 或 minimal;请从请求中移除 temperature、top_p 和 top_logprobs。
可用选项:
gpt-6.1-sol 文本或有序输入项,包括文本和图像内容。
Show child attributes
Show child attributes
可见输出和推理 token 的最大数量。
必填范围:
1 <= x <= 128000文本详细程度或结构化输出配置。
Show child attributes
Show child attributes
可用选项:
none, auto, required Show child attributes
Show child attributes
此模型的 include 中不要请求 message.output_text.logprobs。
响应
响应创建成功。
可用选项:
response 示例:
"gpt-6.1-sol"
可用选项:
queued, in_progress, completed, incomplete, failed, cancelled 文本位于 type 为 output_text 的消息内容块;函数调用位于 function_call 输出项。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
AnyFast 响应中观察到的内容过滤诊断信息。
Show child attributes
Show child attributes
AnyFast 响应中观察到的工具用量信息。
网关返回的值;带推理的请求仍应省略此采样参数。
网关返回的值;带推理的请求仍应省略此采样参数。
此页面对您有帮助吗?