Bearer API KeyUse the Authorization: Bearer sk_live_... header; x-api-key is also supported.
🧩
Confirm the model call name firstFirst filter models that support this endpoint format on the Models page, then open a model detail page to copy its call name. Your account's final availability also depends on organization permissions.
Request structure
The section below confirms the method, URL and authentication scheme. It is an HTTP structure snippet, not a standalone runnable example.
HTTP
POST https://www.silvamux.com/api/v1/messages
Authorization: Bearer $SILVAMUX_API_KEY
Content-Type: application/json
Request body
application/json · AnthropicRequest · Required
Field
Type
Required
Description
max_tokens
integer
Yes
—
messages
array<Message>
Yes
—
messages.content
string | array<FreeFormObject>
Yes
—
messages.role
string (system | user | assistant | tool)
Yes
—
model
string
Yes
—
stream
boolean
No
Default: false
system
string | array<FreeFormObject>
No
—
Response
200Anthropic JSON 或 SSE 响应。
application/json · FreeFormObject
defaultAnthropic 兼容错误。
application/json · AnthropicError
Field
Type
Required
Description
error
object
Yes
—
error.message
string
Yes
—
error.type
string
Yes
—
type
string (error)
Yes
—
ℹ️
The historical path /api/anthropic/v1/messages remains supported for existing projects only; new projects should use /api/v1/messages.
{
"id": "msg_xxxx",
"type": "message",
"role": "assistant",
"content": [{"type": "text", "text": "Hello! How can I help you today?"}],
"usage": {"input_tokens": 10, "output_tokens": 15}
}
Streaming follows the Anthropic SSE specification.