Tạo message (Anthropic)

Tương thích với [Anthropic Messages API](https://docs.anthropic.com/en/api/messages). Dùng cho Claude Code, Claude Desktop.

Authentication

AuthorizationBearer
API key làm bearer token. Tạo API key tại [Console](https://console.staging.tram.ai.vn/keys).

Headers

anthropic-versionstringOptionalDefaults to 2023-06-01

Phiên bản Anthropic API

Request

This endpoint expects an object.
modelstringRequired
Model ID
messageslist of objectsRequired

Danh sách messages

max_tokensintegerRequired

Số token tối đa

systemstringOptional
System prompt
streambooleanOptionalDefaults to false

Bật streaming (SSE)

temperaturedoubleOptional
Sampling temperature
toolslist of objectsOptional

Danh sách tools

Response

Thành công

idstring
typestring
rolestring
contentlist of objects
modelstring
stop_reasonstring
usageobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error