Claude Messages API
POSThttps://api.acedata.cloud/v1/messages
POSThttps://api.acedata.cloud/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
max_tokensintegerRequired parameter
Stop generating the maximum number of tokens output before.
temperaturenumber
The degree of randomness in the injection response.
tool_choiceobject
cache_controlobject
ttlstring
Please select
typestringRequired parameter
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.