Skip to main content
POST
cURL
The tested AnyFast response reported model: "claude-sonnet-5.5" for a claude-sonnet-5-5 request and added request_id plus billing. Forced tool choice returned 400.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model ID.

Available options:
claude-sonnet-5-5
Example:

"claude-sonnet-5-5"

messages
object[]
required

Conversation turns. Pass assistant content blocks, including thinking blocks, back unchanged in multi-turn conversations. Do not prefill the final assistant response.

Minimum array length: 1
Example:
max_tokens
integer
required

Maximum output tokens across thinking and visible response text.

Required range: 1 <= x <= 128000
Example:

4096

system

System prompt. Keep it unchanged when replaying Sonnet 5.5 thinking blocks.

metadata
object

Request metadata.

stop_sequences
string[]

Custom text sequences that stop generation.

stream
boolean
default:false

Stream message events over SSE.

tools
object[]

Tool definitions available to the model. Keep this array unchanged when replaying Sonnet 5.5 thinking blocks.

tool_choice
object

Controls whether the model may use tools.

output_config
object

Output controls. Claude Sonnet 5.5 defaults to high effort.

thinking
object

Omit this field for adaptive thinking. between_tools works at low, medium, or high effort. Manual enabled with budget_tokens and disabled return 400.

Response

Message created successfully. A safeguard refusal is also returned with HTTP 200 and stop_reason set to refusal.

id
string
required
Example:

"msg_01XFDUDYJgAACzvnptvVoYEL"

type
enum<string>
required
Available options:
message
role
enum<string>
required
Available options:
assistant
content
object[]
required
Example:
model
string
required

The observed AnyFast response uses a dot-form ID; requests still use the hyphen-form public model ID.

Example:

"claude-sonnet-5.5"

stop_reason
enum<string>
required
Available options:
end_turn,
max_tokens,
stop_sequence,
tool_use,
refusal,
null
usage
object
required
container
object | null

Null in the observed AnyFast text response.

stop_sequence
string | null
stop_details
object | null

Additional details for a refusal or other stop condition.

request_id
string

Request ID added by AnyFast in the response body.

billing
object

AnyFast billing metadata; the billed USD amount is a string.