AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Text and chat

Anthropic Messages

Send messages and Content Blocks with the Anthropic Messages-compatible structure.

The Messages API creates model responses from user and assistant messages and Content Blocks. It supports text, images, tool calls, streaming output, and extended thinking. Available content blocks, tools, and advanced parameters depend on the selected model and the models visible to the current API key.

POST/v1/messages

Generate the next assistant response from user and assistant messages. Message content can be a string or an array of text, image, tool, and document Content Blocks.

The API supports standard JSON responses and SSE streaming events. Image input, tool calling, and extended thinking depend on the selected model.

Authorization

anthropicApiKey
x-api-key<token>

Pass the API Key in the x-api-key Header.

In: header

Header Parameters

anthropic-version*string

Specify the API version to use.

Default"2023-06-01"
anthropic-beta?string

Specify the beta version to use. You can use commas to separate multiple values, or send the header multiple times.

Request Body

Messages represents text, images, tools, and extended thinking with Content Blocks. Choose a view for your task.

application/json
Text chat

Use user and assistant messages for single-turn or multi-turn conversations; provide system instructions in the top-level field.

model
A Messages-capable model ID visible to the current API key.
max_tokens
The maximum number of tokens the response may generate.
messages[]
User and assistant messages in chronological order.
application/json
{
  "model": "MODEL_ID",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Hello! Please introduce yourself."
    }
  ]
}
Field referenceThe complete field set is unchanged; descriptions emphasize the selected use case.

Basic text chat. messages can contain strings or text Content Blocks.

Image, tool, and extended-thinking support can vary by model and provider channel. Start with a minimal text request, then enable advanced fields one at a time.

Response Body

application/json

application/json

application/json

application/json

Anthropic Messages documentationReview the upstream protocol and recent field changes.