Beta Claude Messages API
POSThttps://api.ace.324567.xyz/v1/messages
POSThttps://api.ace.324567.xyz/claude/messages

Claude Messages API, and the official input and output are completely consistent.

Request Headers

authorizationstring
Bearer token

Request Body

modelstringRequired parameter
Used to complete the model you prompted.
toolsarray
List of tool definitions that can be called by the model.
top_kinteger
Sample only from the top K candidate tokens with the highest probabilities each time.
top_pnumber
Use the nucleus sampling strategy.
streamboolean
Whether to return responses incrementally through Server-Sent Events (SSE).
Please select
systemstring | array
messagesarrayRequired parameter
metadataobject
user_idstring
thinkingobject
Thinking configuration is passed through as the original value, supporting additional fields and type/display values. Common types are adaptive, enabled, and disabled; whether specific parameters and combinations are accepted is determined by the selected model.
typestring
displaystring
The thinking content display mode is passed through as the original value. Common values are summarized and omitted; updates is beta and requires the thinking-display-updates-2026-08-18 request header. Actual mode support and returned content are determined by the selected model.
budget_tokensinteger
max_tokensintegerRequired parameter
Stop generating the maximum number of tokens output before.
temperaturenumber
The degree of randomness in the injection response.
tool_choiceobject
typestringRequired parameter
Please select
cache_controlobject
ttlstring
Please select
typestringRequired parameter
output_configobject
Output and inference input configuration. The fields and levels supported by different models may vary.
effortstring
Control the overall inference input of the model, optional low, medium, high, xhigh, or max; please choose according to the specific model capabilities.
stop_sequencesarray
Custom text sequence, when encountered, the model will stop generating.

Response

Integration guide

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.

Claude AI
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.