Messages Protocol

Routes Anthropic Messages API requests to a native /v1/messages backend

Category: Setup-dependent integration
Task: Routes Anthropic Messages API requests to a native /v1/messages backend

Prerequisites: The external service, credentials, or certificates referenced by this configuration.

Run it: Use ghcr.io/praxis-proxy/ai:0.4.1 and follow the container quickstart to mount and start the configuration.

This configuration comes from the selected release. The example has not been run here; external services are not bundled.

Download the source file.

# Anthropic Messages Protocol Headers
#
# Routes Anthropic Messages API requests to a native `/v1/messages`
# backend. The `anthropic_messages_protocol` filter provides a
# centralized default `anthropic-version` header for internal or
# non-SDK callers when the header is absent.
#
# No request or response body transformation. Use this when the
# backend natively supports `/v1/messages`.

listeners:
  - name: anthropic-gateway
    address: "127.0.0.1:8080"
    filter_chains: [anthropic-native]

filter_chains:
  - name: anthropic-native
    filters:
      - filter: anthropic_messages_format
        on_invalid: continue

      - filter: anthropic_messages_protocol
        default_version: "2023-06-01"

      - filter: router
        routes:
          - path_prefix: "/"
            cluster: "anthropic-backend"

      - filter: load_balancer
        clusters:
          - name: "anthropic-backend"
            endpoints:
              - "127.0.0.1:3001"

insecure_options:
  allow_private_endpoints: true # example proxies to local backends