Proxy API
Base URL: https://proxy.avant.codes. Request and response bodies are the vendor’s own: point an Anthropic or OpenAI SDK at the proxy and keep using it as before.
Authentication
Section titled “Authentication”Send a workspace key (ws_…) or an Avant token in any of these headers:
Authorization: Bearer <credential>x-api-key: <credential>X-Workspace-Token: <credential>
Endpoints
Section titled “Endpoints”| Method | Path | Purpose |
|---|---|---|
| POST | /v1/messages |
Anthropic Messages |
| POST | /v1/chat/completions |
OpenAI Chat Completions |
| POST | /v1/responses |
OpenAI Responses |
| POST | /v1/decide |
TypeSafe decision API |
| GET | /v1/models |
Models this workspace can use |
| GET | /v1/workspace/self |
The workspace, its models and its permissions |
| GET | /v1/skills |
Skills enabled for the workspace |
| POST | /token |
Exchange a workload’s OIDC token. See Agents. |
Which inference endpoints a workspace accepts depends on its provider. Each provider page lists them, and so does the workspace’s Connect page.
SDKs for OpenAI need https://proxy.avant.codes/v1 as the base URL. Anthropic SDKs use https://proxy.avant.codes.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
| 400 | Bad request, or a policy rule such as content.requireSystemPrompt |
| 401 | Missing or invalid credential, or a key used where the auth mode only accepts tokens |
| 403 | Refused by policy: models.allowed, tools.deny, mcp.restrictToManaged, pii.block, pii.scan_timeout |
| 413 | limits.inputSize: the conversation is larger than the policy’s scan limit |
| 429 | limits.spendCap, with Retry-After |
| 502 | The vendor or cloud refused Avant’s credentials, or the upstream failed |
Policy refusals use the error shape of the API you called. Every response has X-Request-Id. Policy refusals also have X-Policy-Rule.