跳转到主要内容
POST
当应用、SDK 或智能体需要 Anthropic Messages 请求与响应格式时,请使用此端点。 发送包含 model、messages 和 max_tokens 的标准 Messages 请求体。Capriole AI 会在转发给上游前,把 latest 别名 解析为所选上游 Claude 模型;继续转发 system、tools、thinking 和 stream 等兼容字段;并原样返回上游 JSON 或 SSE 流。 POST /v1/messages 接受 claude-latest、claude-fable-5-1、claude-fable-5、claude-opus-5-5、claude-opus-5、claude-opus-4-8、claude-opus-4-7、claude-opus-4-6 和 claude-sonnet-4-6。使用 claude-latest 可以在不修改配置的情况下选择 Fable 5.1。 POST /v1/messages/count_tokens 接受相同的 Claude 模型 ID,用于执行 Anthropic 兼容的 Token 计数检查。它会返回所选 Claude 模型的输入 Token 数,或返回错误。

授权

Authorization
string
header
必填

Use an API key created in the Capriole AI page. Send it as Authorization: Bearer sk-....

请求体

application/json
model
enum<string>
必填

Public Anthropic Messages model identifier or Claude latest alias

可用选项:
claude-latest,
claude-fable-5-1,
claude-opus-5-5,
claude-fable-5,
claude-opus-5,
claude-opus-4-8,
claude-opus-4-7,
claude-opus-4-6,
claude-sonnet-4-6
messages
object[]
必填

Anthropic-compatible conversation messages.

max_tokens
integer
必填

Maximum number of output tokens.

system

Optional Anthropic-compatible system prompt.

tools
object[]

Anthropic-compatible tool definitions.

thinking
object

Anthropic-compatible thinking options.

stream
boolean
默认值:false

Stream the response as Anthropic-compatible server-sent events.

响应

Anthropic Messages-compatible JSON response or SSE stream

Anthropic Messages-compatible response body.

最后修改于 2026年11月17日