Anthropic Messages

Create a message using the Anthropic Claude API format. Text input only; supports both streaming (SSE) and non-streaming responses.

POSThttps://api.longcat.chat/anthropic/v1/messages

Authorizations

Authorizationstringheaderrequired

Authentication key, passed in the request header as Bearer YOUR_API_KEY.

default: false

Bodyapplication/json

modelstringrequired

Model identifier. Currently supports LongCat-2.0-Preview.

default: false
messagesarrayrequired

Array of message objects. Text input only.

default: false
rolestringrequired

Author role, one of user · assistant. System messages are passed separately via the system parameter.

default: false
contentstringrequired

Message content as a plain-text string.

default: false
max_tokensintegeroptional

Maximum number of tokens to generate.

default: false
streambooleanoptional

Whether to stream the response as SSE.

default: false
temperaturenumberoptional

Sampling temperature, range 0 ~ 1.

default: false
top_pnumberoptional

Nucleus sampling parameter.

default: false
systemstringoptional

System message used to set context.

default: false
thinkingobjectoptional

Whether to enable thinking. {"type":"enabled"} turns thinking on, {"type":"disabled"} turns it off.

default: false