/messages

Send and receive messages using Anthropic's API format. This endpoint is compatible with Claude and other Anthropic-style APIs.

POST
/v1/messages

Send a structured list of input messages and receive a model-generated message.

Request Body

modelThe model to use (required)
messagesArray of message objects (required)
max_tokensMaximum tokens to generate (required)
systemSystem instructions or context (optional)
Request Body
{
  "model": "your-model",
  "max_tokens": 1024,
  "system": "You are a helpful assistant.",
  "messages": [
    {"role": "user", "content": "Hello!"}
  ]
}