For AI agents: the complete documentation index is available at https://aioproxy.dev/llms.txt, the full documentation bundle is available at https://aioproxy.dev/llms-full.txt, and this page is available as Markdown at https://aioproxy.dev/guide/routing/protocols.md.
  • English
  • Protocols & Transparent Passthrough

    AIO Proxy supports diverse AI API protocols spanning chat completions, structured responses, vision, voice, embeddings, and agent runtimes.

    Supported Inbound Protocols

    Client ProtocolStandard Request PathFeature Highlights
    OpenAI Responses/v1/responsesNext-gen Responses API, streaming events, multimodal input, native tool lifecycle
    OpenAI Compatible/v1/chat/completionsStandard chat completions, function callings, tool calls, streaming SSE
    Anthropic Messages/v1/messagessystem prompt blocks, prompt caching, tool use, thinking tags
    Google Gemini/v1beta/models/*:generateContentGemini native contents format, multimodal inline data, safety settings
    OpenAI Embeddings/v1/embeddingsVector representations supporting batch text inputs
    OpenAI Realtime/v1/realtime, /v1/realtime/callsLow-latency WebRTC and WebSocket bidirectional audio/text streams
    OpenAI Media/v1/images/*, /v1/audio/*Image generation/edits, speech synthesis, and audio transcriptions

    Zero-Overhead Passthrough vs. Protocol Transforms

    AIO Proxy features a dual-engine architecture:

    1. Same-Protocol Raw Passthrough

    • When a client request matches the upstream provider's native protocol (e.g. Anthropic Client -> Anthropic Provider), AIO Proxy engages Raw Passthrough Mode.
    • Request bodies and response streams are piped transparently with zero-copy stream processing, introducing negligible latency (<1ms) while preserving vendor-specific headers, beta flags, and custom parameters.

    2. Cross-Protocol Intelligent Transforms

    • When protocols differ (e.g. Claude Code Anthropic Messages -> OpenAI Provider), AIO Proxy converts inbound payloads into universal model messages and invokes upstream via standardized adapter transforms.
    • Tools, function calling parameters, thoughts, and stream fragments are accurately translated.

    Multi-Protocol Endpoints

    Certain providers (such as OpenRouter, aggregator gateways, or multi-modal services) expose multiple protocol endpoints under one Base URL. You can declare endpoints to enable matching raw passthrough across different paths:

    config.jsonc
    {
      "providers": {
        "custom-gateway": {
          "kind": "api",
          "apiKey": "{{env.GATEWAY_KEY}}",
          "models": ["gpt-5", "claude-sonnet-4-6"],
          "endpoints": [
            // Serves OpenAI Compatible requests
            {
              "baseURL": "https://api.gateway.example/v1",
              "protocol": "openai-compatible",
            },
            // Serves Anthropic Messages requests natively
            {
              "baseURL": "https://api.gateway.example/v1",
              "protocol": "anthropic",
              "auth": "bearer",
            },
          ],
        },
      },
    }

    With this configuration:

    • Inbound /v1/chat/completions requests will passthrough to the OpenAI-compatible endpoint.
    • Inbound /v1/messages requests will passthrough directly to the Anthropic endpoint.