Provider Support
Integrate once and reach them all. VectorAxis speaks the OpenAI wire format, so a single integration routes to 50+ LLM providers plus Anthropic’s native API and Google Vertex, with no per-provider SDKs, no lock-in. Swap models or providers by changing a key, not your code.
- No lock-in. Move from one provider to another, or run several side by side, without touching application code.
- One format. Send OpenAI-style requests everywhere; VectorAxis translates to each provider’s wire format and back.
- Best price / latency. Route cheap tasks to a small provider and hard ones to a frontier model with a routing config.
There are two ways to tell VectorAxis which provider to use; both resolve to the same routing:
- Virtual key. Create a virtual key for a provider once, then send it as your API key. The provider and credentials are resolved server-side.
- Direct credentials. Send x-provider (the provider id, e.g. GROQ) plus x-api-key (your own key for that provider). Best for quick tests and bring-your-own-key flows.
These share the OpenAI wire format and route transparently. The most-requested first:
Plus a long tail of specialist and regional providers:
Anthropic requests are converted to the native Messages API format with automatic anthropic-version: 2023-06-01 header injection. Specify x-provider: ANTHROPIC or use an Anthropic virtual key; the translation is handled transparently, so you keep sending OpenAI-style requests and get OpenAI-style responses back.
TYPESAFE is not a chat provider. Jev answers typed questions (yes/no, choice, score) instead of generating text, and it is served on its own endpoint, POST /v1/systemone, in TypeSafe’s own format, so the TypeSafe SDK works by pointing its base URL at VectorAxis. A TypeSafe key is rejected on chat completions and the media endpoints. See System One (Jev).
Vertex AI is reached through its OpenAI-compatible endpoint. Create a VERTEX_AI virtual key with your GCP service-account JSON, project ID, and region. VectorAxis signs a short-lived OAuth2 token from the service account on each request (cached and refreshed automatically), so you never manage access tokens yourself. Model ids use the Vertex publisher form (google/gemini-2.0-flash); a bare id like gemini-2.0-flash is prefixed with google/ for you. Override the key's project or region per request with x-vertex-project and x-vertex-region (use global for the multi-region endpoint).
Set stream: true to receive the response as Server-Sent Events. Every provider streams in the OpenAI chat.completion.chunk format. For Anthropic, the native Messages SSE events (message_start, content_block_delta, message_delta) are translated to OpenAI chunks on the fly, ending with a chunk that carries token usage. Streaming requests bypass the cache and retry/fallback, since a stream cannot be replayed mid-flight.
- Cache. Fully bypassed; cache headers are ignored and no x-cache-status is returned. See Caching.
- Guardrails. Input checks run; output checks are skipped, and no x-guardrail-status is returned. See Guardrails.
- Retry / fallback. Disabled; the x-retry-count and x-fallback-provider headers are not returned.
Pass OpenAI-style tools in the request and the model's tool_calls come back in the same format. This works for OpenAI-compatible providers and for Anthropic. VectorAxis maps OpenAI tool definitions to Anthropic tool_use blocks and back, and converts tool-role result messages into Anthropic tool_result blocks. Tool calls also stream incrementally, as tool_calls deltas.