Create a message
POST/v1/messages
The Anthropic Messages API, for Claude Code and the Anthropic SDKs. Since 1.8.5, in DVARA Open Source and the Enterprise platform. The call runs the same governance as Chat Completions: policy, PII, guardrails, limits, routing, budgets, usage, cost, and audit.
Send the DVARA workspace key as x-api-key (what Claude Code and the
Anthropic SDKs send) or as Authorization: Bearer. A key with scopes
needs completions:write.
On a route to Anthropic, the request goes on as the client sent it:
every field, message role, content block, and the anthropic-beta
header. It is changed only where governance changes it, such as
redacted text or the routed model. Extended thinking passes through.
The reply, plain or streamed, comes back as Anthropic sent it. On a
route to another provider, DVARA translates the request and writes the
reply in Anthropic's shape; extended thinking is refused with
unsupported_capability, naming the provider.
Refused on every route with unsupported_capability: mcp_servers,
container, server tools, and metadata keys other than user_id.
Errors come back in Anthropic's envelope with the same status and
code as on any other DVARA endpoint.
Request
Responses
- 200
- 400
- 401
- 402
- 403
- 429
- 502
Message object, or Anthropic stream events when stream is true
Invalid request, unsupported field or capability, unknown model, or a missing or other anthropic-version.
A key is required. Missing, invalid, revoked, or expired keys are refused.
A budget or call cap refused the call.
Policy, PII, guardrail, scope, or IP access refused the call.
Per-key rate limit reached.
The provider failed, or its response was larger than the set limit (provider_response_too_large).