Choose a Protocol
Vanix AI supports four first-class wire protocols simultaneously. Choosing the right protocol lets you preserve native provider capabilities (extended thinking, prompt caching, built-in tools) without rewriting application code.
Decision Matrix
| Protocol | Endpoint | Best For | Native Extras Preserved |
|---|---|---|---|
| OpenAI Chat Completions | POST /v1/chat/completions | Multi-provider switching across GPT, Claude, Gemini, DeepSeek, and Qwen with one SDK. | Streaming, tool calling, response_format, vision, reasoning_effort. |
| OpenAI Responses | POST /v1/responses | New OpenAI GPT-5 / o-series apps and Codex CLI. | Stateful reasoning items, compaction (/v1/responses/compact), WebSocket mode. |
| Anthropic Messages | POST /v1/messages | Claude Code and production Claude workloads. | Explicit cache_control breakpoints, extended thinking blocks, tool use. |
| Google Gemini Native | POST /v1beta/models/{model}:generateContent | Gemini CLI and native Gemini multimodal workflows. | Native systemInstruction, multi-part audio/video/PDF, thinking budgets, grounding. |
When to Use Cross-Protocol vs Native
Use OpenAI Chat Completions when:
- You want to A/B test or fail over between
gpt-4o,claude-sonnet-4-5,gemini-2.5-pro, anddeepseek-chatby changing only themodelstring. - Your stack already uses OpenAI-compatible frameworks (LangChain, Vercel AI SDK, LlamaIndex, Dify, Cursor, Cherry Studio).
Use Native Protocols when:
- You rely on Anthropic explicit prompt caching (
cache_control: {"type": "ephemeral"}) or Claude Code's native tool protocol → usePOST /v1/messages. - You use OpenAI Responses features (
previous_response_id, reasoning summaries, Codex CLI) → usePOST /v1/responses. - You send large native Gemini multimodal inputs (audio, video, PDF parts) or Gemini CLI workflows → use
/v1beta/models/*.
Zero Lock-In
The same VANIX_API_KEY and unified account balance work seamlessly across all four protocols. You can mix protocols within a single product—for example, Anthropic Messages for coding agents and OpenAI Embeddings for RAG search.
Explore Protocol Specifications
POST
Chat Completions
Universal multi-model chat, streaming, and function calling.
POST
OpenAI Responses
Modern OpenAI reasoning and stateful agent endpoint.
POST
Anthropic Messages
Native Claude protocol with thinking and prompt caching.
POST
Gemini Generate Content
Native Google Gemini multimodal and streaming protocol.