v2
latestOpenAPI 3.1.02026-08-05267431678.1 KBMessages
Anthropic-compatible messages endpoint.
Thin shell over :func:services.inference.adapters.anthropic_messages.run_messages. The adapter handles content-block translation, LLM-passthrough vs Pioneer-task dispatch, SSE rendering, persistence, and error mapping. The router keeps only HTTP-shaped concerns: route declaration, auth, rate limiting.
Args: body: Validated :class:AnthropicMessagesRequest. request: FastAPI request (forwarded so the adapter can read API-key billing context out of request.state for streaming responses). auth: Authenticated request context.
Returns: :class:AnthropicMessagesResponse for non-streaming, or a :class:StreamingResponse of Anthropic SSE events when body.stream is true.
Request body
Response
Non-streaming Anthropic Messages response. When the request sets stream=true the server emits an Anthropic-shaped SSE event stream over text/event-stream instead; that stream shape is documented in the Anthropic Messages API reference.