curl https://www.anyfast.ai/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5-1",
"max_tokens": 4096,
"output_config": { "effort": "high" },
"messages": [
{ "role": "user", "content": "找出这份迁移计划中风险最高的几个假设。" }
]
}'import requests
url = "https://www.anyfast.ai/v1/messages"
payload = {
"model": "claude-fable-5-1",
"messages": [
{
"role": "user",
"content": "找出这份迁移计划中风险最高的几个假设。"
}
],
"max_tokens": 4096,
"system": "<string>",
"metadata": { "user_id": "<string>" },
"stop_sequences": ["<string>"],
"stream": False,
"tools": [
{
"name": "<string>",
"input_schema": {},
"description": "<string>"
}
],
"output_config": { "effort": "high" },
"thinking": { "type": "adaptive" },
"temperature": 1,
"top_p": 1,
"top_k": 123
}
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: 'claude-fable-5-1',
messages: [{role: 'user', content: '找出这份迁移计划中风险最高的几个假设。'}],
max_tokens: 4096,
system: '<string>',
metadata: {user_id: '<string>'},
stop_sequences: ['<string>'],
stream: false,
tools: [{name: '<string>', input_schema: {}, description: '<string>'}],
output_config: {effort: 'high'},
thinking: {type: 'adaptive'},
temperature: 1,
top_p: 1,
top_k: 123
})
};
fetch('https://www.anyfast.ai/v1/messages', 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/messages",
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' => 'claude-fable-5-1',
'messages' => [
[
'role' => 'user',
'content' => '找出这份迁移计划中风险最高的几个假设。'
]
],
'max_tokens' => 4096,
'system' => '<string>',
'metadata' => [
'user_id' => '<string>'
],
'stop_sequences' => [
'<string>'
],
'stream' => false,
'tools' => [
[
'name' => '<string>',
'input_schema' => [
],
'description' => '<string>'
]
],
'output_config' => [
'effort' => 'high'
],
'thinking' => [
'type' => 'adaptive'
],
'temperature' => 1,
'top_p' => 1,
'top_k' => 123
]),
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/messages"
payload := strings.NewReader("{\n \"model\": \"claude-fable-5-1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"找出这份迁移计划中风险最高的几个假设。\"\n }\n ],\n \"max_tokens\": 4096,\n \"system\": \"<string>\",\n \"metadata\": {\n \"user_id\": \"<string>\"\n },\n \"stop_sequences\": [\n \"<string>\"\n ],\n \"stream\": false,\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"input_schema\": {},\n \"description\": \"<string>\"\n }\n ],\n \"output_config\": {\n \"effort\": \"high\"\n },\n \"thinking\": {\n \"type\": \"adaptive\"\n },\n \"temperature\": 1,\n \"top_p\": 1,\n \"top_k\": 123\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/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"claude-fable-5-1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"找出这份迁移计划中风险最高的几个假设。\"\n }\n ],\n \"max_tokens\": 4096,\n \"system\": \"<string>\",\n \"metadata\": {\n \"user_id\": \"<string>\"\n },\n \"stop_sequences\": [\n \"<string>\"\n ],\n \"stream\": false,\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"input_schema\": {},\n \"description\": \"<string>\"\n }\n ],\n \"output_config\": {\n \"effort\": \"high\"\n },\n \"thinking\": {\n \"type\": \"adaptive\"\n },\n \"temperature\": 1,\n \"top_p\": 1,\n \"top_k\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/messages")
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\": \"claude-fable-5-1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"找出这份迁移计划中风险最高的几个假设。\"\n }\n ],\n \"max_tokens\": 4096,\n \"system\": \"<string>\",\n \"metadata\": {\n \"user_id\": \"<string>\"\n },\n \"stop_sequences\": [\n \"<string>\"\n ],\n \"stream\": false,\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"input_schema\": {},\n \"description\": \"<string>\"\n }\n ],\n \"output_config\": {\n \"effort\": \"high\"\n },\n \"thinking\": {\n \"type\": \"adaptive\"\n },\n \"temperature\": 1,\n \"top_p\": 1,\n \"top_k\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "msg_01XFDUDYJgAACzvnptvVoYEL",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "风险最高的假设是所有客户端都能接受计划中的切换窗口。"
}
],
"model": "claude-fable-5-1",
"stop_reason": "end_turn",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"cache_creation": {
"ephemeral_1h_input_tokens": 123,
"ephemeral_5m_input_tokens": 123
},
"output_tokens_details": {
"thinking_tokens": 123
}
},
"stop_sequence": "<string>",
"stop_details": {}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "请求参数无效"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "请求参数无效"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "请求参数无效"
}
}claude-fable-5-1
发送文本、图片、历史助手消息和工具结果。Claude Fable 5.1 可返回文本、Thinking 和工具调用内容块。
Adaptive Thinking 始终开启。请省略 thinking 或将类型设为 adaptive,并使用 output_config.effort 控制深度。强制工具调用和非默认采样值会返回 400。
curl https://www.anyfast.ai/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5-1",
"max_tokens": 4096,
"output_config": { "effort": "high" },
"messages": [
{ "role": "user", "content": "找出这份迁移计划中风险最高的几个假设。" }
]
}'import requests
url = "https://www.anyfast.ai/v1/messages"
payload = {
"model": "claude-fable-5-1",
"messages": [
{
"role": "user",
"content": "找出这份迁移计划中风险最高的几个假设。"
}
],
"max_tokens": 4096,
"system": "<string>",
"metadata": { "user_id": "<string>" },
"stop_sequences": ["<string>"],
"stream": False,
"tools": [
{
"name": "<string>",
"input_schema": {},
"description": "<string>"
}
],
"output_config": { "effort": "high" },
"thinking": { "type": "adaptive" },
"temperature": 1,
"top_p": 1,
"top_k": 123
}
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: 'claude-fable-5-1',
messages: [{role: 'user', content: '找出这份迁移计划中风险最高的几个假设。'}],
max_tokens: 4096,
system: '<string>',
metadata: {user_id: '<string>'},
stop_sequences: ['<string>'],
stream: false,
tools: [{name: '<string>', input_schema: {}, description: '<string>'}],
output_config: {effort: 'high'},
thinking: {type: 'adaptive'},
temperature: 1,
top_p: 1,
top_k: 123
})
};
fetch('https://www.anyfast.ai/v1/messages', 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/messages",
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' => 'claude-fable-5-1',
'messages' => [
[
'role' => 'user',
'content' => '找出这份迁移计划中风险最高的几个假设。'
]
],
'max_tokens' => 4096,
'system' => '<string>',
'metadata' => [
'user_id' => '<string>'
],
'stop_sequences' => [
'<string>'
],
'stream' => false,
'tools' => [
[
'name' => '<string>',
'input_schema' => [
],
'description' => '<string>'
]
],
'output_config' => [
'effort' => 'high'
],
'thinking' => [
'type' => 'adaptive'
],
'temperature' => 1,
'top_p' => 1,
'top_k' => 123
]),
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/messages"
payload := strings.NewReader("{\n \"model\": \"claude-fable-5-1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"找出这份迁移计划中风险最高的几个假设。\"\n }\n ],\n \"max_tokens\": 4096,\n \"system\": \"<string>\",\n \"metadata\": {\n \"user_id\": \"<string>\"\n },\n \"stop_sequences\": [\n \"<string>\"\n ],\n \"stream\": false,\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"input_schema\": {},\n \"description\": \"<string>\"\n }\n ],\n \"output_config\": {\n \"effort\": \"high\"\n },\n \"thinking\": {\n \"type\": \"adaptive\"\n },\n \"temperature\": 1,\n \"top_p\": 1,\n \"top_k\": 123\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/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"claude-fable-5-1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"找出这份迁移计划中风险最高的几个假设。\"\n }\n ],\n \"max_tokens\": 4096,\n \"system\": \"<string>\",\n \"metadata\": {\n \"user_id\": \"<string>\"\n },\n \"stop_sequences\": [\n \"<string>\"\n ],\n \"stream\": false,\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"input_schema\": {},\n \"description\": \"<string>\"\n }\n ],\n \"output_config\": {\n \"effort\": \"high\"\n },\n \"thinking\": {\n \"type\": \"adaptive\"\n },\n \"temperature\": 1,\n \"top_p\": 1,\n \"top_k\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/messages")
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\": \"claude-fable-5-1\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"找出这份迁移计划中风险最高的几个假设。\"\n }\n ],\n \"max_tokens\": 4096,\n \"system\": \"<string>\",\n \"metadata\": {\n \"user_id\": \"<string>\"\n },\n \"stop_sequences\": [\n \"<string>\"\n ],\n \"stream\": false,\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"input_schema\": {},\n \"description\": \"<string>\"\n }\n ],\n \"output_config\": {\n \"effort\": \"high\"\n },\n \"thinking\": {\n \"type\": \"adaptive\"\n },\n \"temperature\": 1,\n \"top_p\": 1,\n \"top_k\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "msg_01XFDUDYJgAACzvnptvVoYEL",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "风险最高的假设是所有客户端都能接受计划中的切换窗口。"
}
],
"model": "claude-fable-5-1",
"stop_reason": "end_turn",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"cache_creation": {
"ephemeral_1h_input_tokens": 123,
"ephemeral_5m_input_tokens": 123
},
"output_tokens_details": {
"thinking_tokens": 123
}
},
"stop_sequence": "<string>",
"stop_details": {}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "请求参数无效"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "请求参数无效"
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "请求参数无效"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
模型 ID。
claude-fable-5-1 "claude-fable-5-1"
对话消息。多轮对话中应原样回传 Assistant 内容块,包括 Thinking 块。不要预填最后一条 Assistant 回答。
1Show child attributes
Show child attributes
[
{
"role": "user",
"content": "找出这份迁移计划中风险最高的几个假设。"
}
]
Thinking 与可见回答合计允许使用的最大输出 Token 数。
1 <= x <= 1280004096
系统提示词。回传 Fable 5.1 Thinking 块时,应保持系统提示词逐字节不变。
请求元数据。
Show child attributes
Show child attributes
触发停止生成的自定义文本序列。
是否通过 SSE 流式返回消息事件。
模型可使用的工具定义。回传 Fable 5.1 Thinking 块时,应保持此数组不变。
Show child attributes
Show child attributes
控制模型是否可以使用工具。
Show child attributes
Show child attributes
输出控制配置。Claude Fable 5.1 默认使用 high effort。
Show child attributes
Show child attributes
请省略此字段或使用 Adaptive Thinking。手动 enabled 加 budget_tokens 和 disabled 均会返回 400。
Show child attributes
Show child attributes
不支持自定义 temperature。仅为向后兼容接受 1,正常请求请省略。
1 <= x <= 1不支持自定义核采样。仅为向后兼容接受 0.99–1,正常请求请省略。
0.99 <= x <= 1不支持。传入任何值都会返回 400。
响应
消息创建成功。安全分类器拒绝请求时同样返回 HTTP 200,并将 stop_reason 设为 refusal。
"msg_01XFDUDYJgAACzvnptvVoYEL"
message assistant Show child attributes
Show child attributes
[
{
"type": "text",
"text": "风险最高的假设是所有客户端都能接受计划中的切换窗口。"
}
]
"claude-fable-5-1"
end_turn, max_tokens, stop_sequence, tool_use, refusal, null Show child attributes
Show child attributes
拒绝或其他停止条件的附加信息。
此页面对您有帮助吗?