Messages API
Anthropic
Messages
Anthropic Messages API compatible endpoint. Supports streaming via the stream parameter.
POST
Messages API
Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
Function name for tracing and project-level guardrail function-scope filtering.
Parent span ID for distributed tracing context.
Body
application/json
Opt in to top-level automatic prompt caching: {"type":"ephemeral"} (optionally "ttl":"1h"). Places one moving breakpoint on the largest cacheable prefix. Explicit per-block cache_control on system/message/tool content takes precedence. Caching is off unless set. Cache writes cost 1.25x input and reads 0.1x
Any value
Any value
Any value