Claude
Claude Fable 5 · Messages
Text / Claude / Claude Fable 5 / Messages
POST
/v1/messagesRequest parameters
Authorization
Add an Authorization header whose value is Bearer followed by your API key.
Authorization: Bearer ****************
anthropic-version: 2023-06-01
Header parameters
Content-TypestringOptional
application/json
AcceptstringOptional
application/json
Body parametersapplication/jsonrequired
modelstringRequired
Model ID, fixed to `claude-fable-5`
messagesarray[object]Required
List of conversation messages; each has `role` (user / assistant) and `content` (text or content blocks)
max_tokensintegerRequired
Maximum number of tokens to generate; required by the Anthropic API
systemstring | array[object]Optional
System prompt, passed as a top-level field (not a message)
streambooleanOptional
Whether to stream the response (SSE), default `false`
stop_sequencesarray[string]Optional
Custom sequences that stop generation
toolsarray[object]Optional
Tool definitions for tool use
tool_choiceobjectOptional
Controls whether and which tool is used
metadataobjectOptional
Request metadata, such as `user_id`
thinkingobjectOptional
This model always uses adaptive thinking; omit this field and do not disable it or set `budget_tokens`
output_configobjectOptional
Output configuration; available children depend on the model
Example
{ "model": "claude-fable-5", "max_tokens": 1024, "messages": [ { "role": "user", "content": "Hi, tell me about yourself" } ]}Request code samples
curl https://api.hotrouter.ai/v1/messages \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "claude-fable-5", "max_tokens": 1024, "messages": [ { "role": "user", "content": "Hi, tell me about yourself" } ] }'Response
200 · Success
idstringRequired
Unique id of this response
typestringRequired
Object type (message)
rolestringRequired
Message role
contentarray[object]Required
Content blocks array
stop_reasonstringOptional
Finish reason (end_turn / max_tokens, etc.)
usageobjectRequired
Token usage of this call
Example
{ "id": "msg_xxx", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "Hi! Nice to meet you…" } ], "stop_reason": "end_turn", "usage": { "input_tokens": 12, "output_tokens": 24 }}
