Skip to content

Provider Setup

A provider is a named upstream configuration. The provider name is your label; the provider protocol controls outbound wire behavior.

[providers.openai]
protocol = "openai_responses"
base_url = "https://api.openai.com"
api_key = "..."
FieldMeaning
`protocol`Outbound provider protocol: openai_responses, openai_chat_completions, or anthropic_messages.
`base_url`Upstream provider origin. ProxAI constructs the protocol path.
`api_key`Real upstream key. Sent using provider-owned auth headers.
`compatibility`Optional compatibility mode for provider-specific behavior when configured.
[routing.default_provider_names]
openai_responses = "openai"
openai_chat_completions = "openai"

Defaults are used only when no explicit route matches. See Behavior Contracts.

[[routing.routes]]
request_protocol = "openai_responses"
match_kind = "exact"
model_pattern = "my-model"
provider = "anthropic_upstream"
upstream_model = "claude-like-model"

Use request_protocol when the same model pattern should behave differently by endpoint.

Provider protocolUpstream auth header
openai_responses / openai_chat_completionsAuthorization: Bearer <api_key>
anthropic_messagesx-api-key: <api_key>

Client-supplied Authorization is not used as upstream provider auth. See Client Integration.