Skip to content
Guides

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 ​

ProtocolEndpointBest ForNative Extras Preserved
OpenAI Chat CompletionsPOST /v1/chat/completionsMulti-provider switching across GPT, Claude, Gemini, DeepSeek, and Qwen with one SDK.Streaming, tool calling, response_format, vision, reasoning_effort.
OpenAI ResponsesPOST /v1/responsesNew OpenAI GPT-5 / o-series apps and Codex CLI.Stateful reasoning items, compaction (/v1/responses/compact), WebSocket mode.
Anthropic MessagesPOST /v1/messagesClaude Code and production Claude workloads.Explicit cache_control breakpoints, extended thinking blocks, tool use.
Google Gemini NativePOST /v1beta/models/{model}:generateContentGemini 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, and deepseek-chat by changing only the model string.
  • 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 → use POST /v1/messages.
  • You use OpenAI Responses features (previous_response_id, reasoning summaries, Codex CLI) → use POST /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 ​

Vanix AI Unified Model Gateway · https://api.vanix.io