Client Integration
Client Integration
Section titled “Client Integration”Use this page when a local client or SDK asks for a base URL, API key, model, endpoint, or streaming setting.
Connect a client
Section titled “Connect a client”- 1Start ProxAIRun the local proxy using your runtime config.
- 2Set the base URLPoint the client at the local Proxy listener, not the upstream provider.
- 3Pick the endpointThe request path determines the inbound protocol.
- 4Use a model nameRoutes match the client-facing model before optional upstream_model rewrite.
- 5Send a small requestVerify routing and error format before using tools or large prompts.
Base URL and endpoints
Section titled “Base URL and endpoints”| Client endpoint | Inbound protocol | Use when |
|---|---|---|
/v1/responses or /responses | openai_responses | The client supports OpenAI Responses semantics. |
/v1/chat/completions or /chat/completions | openai_chat_completions | The client expects Chat Completions choices[]. |
/v1/messages or /messages | anthropic_messages | The client sends Anthropic Messages payloads. |
API keys
Section titled “API keys”| Where | Value | Effect |
|---|---|---|
| Client UI or SDK | Any local placeholder if required | Satisfies the client; does not control upstream provider auth. |
providers.<name>.api_key | Real upstream provider key | Sent upstream using the provider protocol auth header. |
| Environment variables | Only if your launcher injects them into config or CLI | ProxAI does not require clients to send provider secrets. |
For exact auth behavior, see Behavior Contracts.
Model names and routes
Section titled “Model names and routes”The client-facing model is matched before provider model rewrite:
[[routing.routes]]request_protocol = "openai_chat_completions"match_kind = "exact"model_pattern = "MiniMax-M3-preview"provider = "minimax"upstream_model = "MiniMax-M3"model_patternmatches what the client sends.providerselects the upstream configuration.upstream_modelis what ProxAI sends to the provider.
See Routing and Providers and Route Matching.
Error format
Section titled “Error format”Use readable text for interactive debugging, and JSON when an SDK expects structured errors:
[error_responses]format = "json"See Error Responses.
Streaming clients
Section titled “Streaming clients”Streaming clients should expect protocol-specific terminal signals:
| Protocol | Terminal signal |
|---|---|
| OpenAI Responses | response.completed |
| OpenAI Chat Completions | [DONE] |
| Anthropic Messages | message_stop |
If a stream stalls after tool-call arguments begin, check [tool_calls].timeout_secs. See Streaming Behavior.