# GoRoute AI Control Plane > GoRoute AI Control Plane is a 100% pure Go Enterprise AI Control Plane and embeddable Go SDK spanning five core modules: 1. AI Gateway (23 /v1 routes, 73+ provider profiles, adaptive load balancing, circuit breakers, exact-match cache), 2. AI Governance (Virtual API Keys, RBAC, AES-256-GCM vault, guardrails, SSRF protection), 3. AI FinOps (64-bit micro-dollar accounting, sliding-window rate limits, pre-flight tokenization), 4. AI Observability (OpenTelemetry, Prometheus, Operator Web UI), and 5. AI Agent Management (MCP Virtual Hub, A2A protocol, autonomous tool loops). - Canonical Site: https://goroute-ai.github.io/ - Full Documentation Corpus: https://goroute-ai.github.io/llms-full.txt ## Control Plane Documentation ### Start here - [GoRoute overview](https://goroute-ai.github.io/docs/start/overview) ([md](https://goroute-ai.github.io/docs/start/overview.md)): Learn what GoRoute does, where it fits in an AI application, and how to choose a way to get started. - [Quickstart: Standalone Gateway CLI](https://goroute-ai.github.io/docs/start/quickstart-gateway) ([md](https://goroute-ai.github.io/docs/start/quickstart-gateway.md)): Install GoRoute AI Gateway via the universal shell installer or source, configure providers, and interact with the Operator UI. - [Quickstart: Docker Compose](https://goroute-ai.github.io/docs/start/quickstart-docker) ([md](https://goroute-ai.github.io/docs/start/quickstart-docker.md)): Deploy GoRoute AI Gateway with PostgreSQL 16+ and Redis 7+ using Docker Compose and explore the Operator UI. - [Quickstart: Go SDK](https://goroute-ai.github.io/docs/start/quickstart-sdk) ([md](https://goroute-ai.github.io/docs/start/quickstart-sdk.md)): Install the GoRoute SDK, configure a model, and make your first chat request. - [System Architecture & Topology](https://goroute-ai.github.io/docs/start/architecture) ([md](https://goroute-ai.github.io/docs/start/architecture.md)): Deep dive into the GoRoute Enterprise AI Control Plane architecture, its 5 core modules, 10-step request lifecycle, multi-layer caching, and persistence layer. ### Route AI requests - [AI Gateway: Traffic Management & Model Routing](https://goroute-ai.github.io/docs/gateway) ([md](https://goroute-ai.github.io/docs/gateway.md)): Unified LLM proxy with 24 /v1 routes, 73+ provider profiles, complexity routing, 6 load-balancing strategies, circuit breakers, and 2-tier caching. - [Routing & Load Balancing](https://goroute-ai.github.io/docs/gateway/routing-and-load-balancing) ([md](https://goroute-ai.github.io/docs/gateway/routing-and-load-balancing.md)): Route prompts with GoRoute's zero-LLM Stage 1 complexity classifier and balance deployments across Stage 2 load-balancing strategies. - [Resiliency, Circuit Breakers & Fallbacks](https://goroute-ai.github.io/docs/gateway/resiliency-and-fallbacks) ([md](https://goroute-ai.github.io/docs/gateway/resiliency-and-fallbacks.md)): Isolate failing providers with 3-state Redis circuit breakers, jittered intra-group retries, and cross-provider fallback cascades. - [Deterministic Exact-Match Cache](https://goroute-ai.github.io/docs/gateway/caching) ([md](https://goroute-ai.github.io/docs/gateway/caching.md)): Configure GoRoute's tenant-isolated exact-match response cache for deterministic requests, using SHA-256 cache keys and memory or Redis storage. ### Use the API - [Chat Completions API](https://goroute-ai.github.io/docs/gateway/endpoints/chat-completions) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/chat-completions.md)): 100% OpenAI-compatible Chat Completions endpoint standardizing reasoning effort, role alternation, dynamic provider routing, and telemetry headers. - [Anthropic Messages Ingress API](https://goroute-ai.github.io/docs/gateway/endpoints/messages) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/messages.md)): Native Anthropic Messages API ingress and pre-flight token counting with thinking blocks, tool translation, and strict alternating turn consolidation. - [Legacy Text Completions API](https://goroute-ai.github.io/docs/gateway/endpoints/completions) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/completions.md)): OpenAI-compatible text completions endpoint supporting raw prompt text, prompt arrays, parameter controls, and token usage accounting. - [OpenAI Responses API](https://goroute-ai.github.io/docs/gateway/endpoints/responses) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/responses.md)): OpenAI Responses API specification supporting instructions, polymorphic input, synchronous JSON, and multi-event SSE streaming. - [Function & Tool Calling](https://goroute-ai.github.io/docs/gateway/endpoints/tool-calling) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/tool-calling.md)): Standardized tool calling across OpenAI, Anthropic, and Gemini with strict schema enforcement and Model Context Protocol (MCP) alignment. - [Server-Side Autonomous Tool Loop](https://goroute-ai.github.io/docs/gateway/endpoints/autonomous-tool-loop) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/autonomous-tool-loop.md)): In-process multi-turn tool execution orchestrator with safety boundaries, execution budgets, and anti-double-billing FinOps ledger tracking. - [Model Management & Access Control](https://goroute-ai.github.io/docs/gateway/endpoints/model-management) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/model-management.md)): The 4-layer model access control hierarchy, tri-state capability verification, pricing provenance, and declarative model routing groups. - [Embeddings API](https://goroute-ai.github.io/docs/gateway/endpoints/embeddings) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/embeddings.md)): Dense vector embeddings across OpenAI, Google Gemini, Mistral, Cohere Embed v3, and Voyage AI with base64 encoding and dimension reduction. - [Document Reranking API](https://goroute-ai.github.io/docs/gateway/endpoints/rerank) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/rerank.md)): Unified document reranking across Cohere v2 and Jina AI with structured rank fields, top_n filtering, and micro-dollar search unit accounting. - [Audio Transcription, Translation & Speech API](https://goroute-ai.github.io/docs/gateway/endpoints/audio) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/audio.md)): High-throughput audio transcription (Whisper STT), translation, and speech synthesis (TTS) with retryable disk spooling and precision integer FinOps. - [Image Generation, Edits & Variations API](https://goroute-ai.github.io/docs/gateway/endpoints/images) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/images.md)): OpenAI-compatible image generations, edits, and variations across DALL-E 2/3 and Google Imagen with quality tiers and resolution-based FinOps pricing. - [OpenAI Realtime WebSocket Protocol](https://goroute-ai.github.io/docs/gateway/endpoints/realtime) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/realtime.md)): Full-duplex speech and text sessions over WebSockets using nhooyr.io/websocket connection hijacking, event streaming, and session FinOps. - [Stateful Tenant Files API](https://goroute-ai.github.io/docs/gateway/endpoints/files) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/files.md)): Multi-tenant file storage with streaming SHA-256 hashing, 0700/0600 POSIX permissions, PostgreSQL indexing, and OpenAI Files compatibility. - [Asynchronous Batch Processing API](https://goroute-ai.github.io/docs/gateway/endpoints/batches) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/batches.md)): Asynchronous batch processing with 24-hour turnaround SLA, 50% off-peak cost discount, state transitions, and JSONL input/output pipelines. - [Content Moderation API](https://goroute-ai.github.io/docs/gateway/endpoints/moderations) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/moderations.md)): Fail-closed content moderation via OpenAI omni-moderation-latest with category flags, granular confidence scores, and virtual key security boundaries. - [Fast Heuristic Tokenization API](https://goroute-ai.github.io/docs/gateway/endpoints/tokenize) ([md](https://goroute-ai.github.io/docs/gateway/endpoints/tokenize.md)): Zero-latency in-process token counting approximating family-specific BPE and SentencePiece vocabularies without external network calls. ### Choose a model provider - [Providers Overview](https://goroute-ai.github.io/docs/providers/overview) ([md](https://goroute-ai.github.io/docs/providers/overview.md)): Complete provider matrix covering all 73 supported upstream ProviderType profiles, modalities, operation enforcement, and authentication mechanisms. - [OpenAI](https://goroute-ai.github.io/docs/providers/openai) ([md](https://goroute-ai.github.io/docs/providers/openai.md)): OpenAI provider integration for chat, reasoning, images, audio, embeddings, Responses API, and Realtime WebSockets. - [Anthropic Claude](https://goroute-ai.github.io/docs/providers/anthropic-claude) ([md](https://goroute-ai.github.io/docs/providers/anthropic-claude.md)): Anthropic provider integration for Claude Messages API, extended thinking, and role alternation tool consolidation. - [Google Gemini](https://goroute-ai.github.io/docs/providers/google-gemini) ([md](https://goroute-ai.github.io/docs/providers/google-gemini.md)): Google Gemini provider integration for chat, embeddings, multimodal inputs, image generation, audio, and thinking budgets. - [AWS Bedrock](https://goroute-ai.github.io/docs/providers/aws-bedrock) ([md](https://goroute-ai.github.io/docs/providers/aws-bedrock.md)): Native AWS Bedrock adapter with SigV4 signing, IAM auth, and Converse API. - [Google Cloud Vertex AI](https://goroute-ai.github.io/docs/providers/google-vertex) ([md](https://goroute-ai.github.io/docs/providers/google-vertex.md)): Google Cloud Vertex AI provider integration with Service Account auth, OAuth2 token caching, and Gemini models. - [Azure OpenAI Service](https://goroute-ai.github.io/docs/providers/azure-openai) ([md](https://goroute-ai.github.io/docs/providers/azure-openai.md)): Native Azure OpenAI Service adapter with API key, Entra ID token auth, custom deployment mapping, and version pinning. - [Cohere](https://goroute-ai.github.io/docs/providers/cohere) ([md](https://goroute-ai.github.io/docs/providers/cohere.md)): Native Cohere v2 adapter for Command R/R+, Embed v3, Rerank v3.5, and micro-dollar search unit FinOps accounting. - [Mistral AI](https://goroute-ai.github.io/docs/providers/mistral) ([md](https://goroute-ai.github.io/docs/providers/mistral.md)): Native Mistral AI provider adapter for Mistral Large, Codestral, Pixtral, and Embeddings. - [Ollama](https://goroute-ai.github.io/docs/providers/ollama) ([md](https://goroute-ai.github.io/docs/providers/ollama.md)): Native Ollama provider adapter for local inference, model auto-discovery, and streaming NDJSON translation. - [OpenAI-Compatible Dialects](https://goroute-ai.github.io/docs/providers/openai-compatible) ([md](https://goroute-ai.github.io/docs/providers/openai-compatible.md)): Comprehensive guide to the certified OpenAI-compatible dialect profiles and domain providers. - [Custom In-House Providers](https://goroute-ai.github.io/docs/providers/custom-provider) ([md](https://goroute-ai.github.io/docs/providers/custom-provider.md)): Register and configure custom in-house OpenAI-compatible deployments in configs/config.yaml. ### Protect requests and control access - [AI Governance: Security, Policies & Compliance](https://goroute-ai.github.io/docs/governance) ([md](https://goroute-ai.github.io/docs/governance.md)): Enterprise 4-layer policy, RBAC with OIDC/JWT, AES-256-GCM Vault, Virtual Keys, Two-Layer Guardrails with 19 drivers, and SSRF firewall. - [Scoped Virtual Keys & Quotas](https://goroute-ai.github.io/docs/governance/virtual-keys) ([md](https://goroute-ai.github.io/docs/governance/virtual-keys.md)): Create scoped GoRoute virtual API keys with model allowlists, organization and team access, spend budgets, and request or token quotas. - [RBAC & Key Vault Architecture](https://goroute-ai.github.io/docs/governance/rbac-and-vault) ([md](https://goroute-ai.github.io/docs/governance/rbac-and-vault.md)): Learn how GoRoute separates client virtual keys from provider credentials with four-layer role-based access control and an AES-256-GCM key vault. - [Organization Guardrails](https://goroute-ai.github.io/docs/governance/guardrails) ([md](https://goroute-ai.github.io/docs/governance/guardrails.md)): Configure request blocking, secret and PII handling, and output redaction for an organization. - [Network Security & SSRF Protection](https://goroute-ai.github.io/docs/governance/network-and-ssrf) ([md](https://goroute-ai.github.io/docs/governance/network-and-ssrf.md)): See how GoRoute blocks server-side request forgery with outbound network controls that protect cloud metadata, private IP ranges, and internal services. ### Manage cost and usage - [AI FinOps: Cost Management & Optimization](https://goroute-ai.github.io/docs/finops) ([md](https://goroute-ai.github.io/docs/finops.md)): Exact 64-bit integer micro-dollar accounting, modality pricing, budget reservations, PostgreSQL outboxes, and Redis Lua sliding-window rate limits. - [Cost Accounting and Spend Records](https://goroute-ai.github.io/docs/finops/micro-dollar-ledger) ([md](https://goroute-ai.github.io/docs/finops/micro-dollar-ledger.md)): Understand integer micro-dollar cost calculation and asynchronous spend persistence. - [Distributed Rate Limiting (RPM & TPM)](https://goroute-ai.github.io/docs/finops/rate-limiting) ([md](https://goroute-ai.github.io/docs/finops/rate-limiting.md)): Enforce distributed requests-per-minute and tokens-per-minute quotas with GoRoute's atomic Redis Lua sliding-window rate limiter. - [Pre-Flight Tokenizer](https://goroute-ai.github.io/docs/finops/preflight-tokenization) ([md](https://goroute-ai.github.io/docs/finops/preflight-tokenization.md)): Estimate prompt tokens before provider dispatch so GoRoute can enforce token quotas and reject oversized requests before they incur upstream costs. ### Connect agents and tools - [AI Agent Management: MCP, Tools & Agent Access](https://goroute-ai.github.io/docs/agents) ([md](https://goroute-ai.github.io/docs/agents.md)): MCP 2026-07-28 Virtual Hub, REST bridge, progressive discovery, sandboxed Stdio, A2A signed Agent Cards, gRPC, and autonomous tool loops. - [Model Context Protocol (MCP) Overview](https://goroute-ai.github.io/docs/agents/mcp-overview) ([md](https://goroute-ai.github.io/docs/agents/mcp-overview.md)): Comprehensive architecture guide for Model Context Protocol (MCP) supporting 2026-07-28 Streamable HTTP, legacy SSE adapters, and virtual hub aggregation. - [MCP Virtual Hub & Plain REST Bridge](https://goroute-ai.github.io/docs/agents/mcp-hub-and-rest) ([md](https://goroute-ai.github.io/docs/agents/mcp-hub-and-rest.md)): Enterprise routing guide for Virtual Hub aggregation (POST /mcp), scoped server routing, curated toolsets, and the plain REST bridge (/mcp-rest/*). - [MCP Progressive Tool Discovery](https://goroute-ai.github.io/docs/agents/mcp-progressive-discovery) ([md](https://goroute-ai.github.io/docs/agents/mcp-progressive-discovery.md)): Scale to hundreds of enterprise tools without context bloat using 256-bit opaque handles, registry feeds, schema hydration, and OpenAPI transport. - [MCP Stdio Process Sandboxing](https://goroute-ai.github.io/docs/agents/mcp-stdio-sandboxing) ([md](https://goroute-ai.github.io/docs/agents/mcp-stdio-sandboxing.md)): Process isolation, environment variable scrubbing, execution timeouts, and binary allowlists for local command-line MCP tools. - [Agent-to-Agent (A2A) Protocol Overview](https://goroute-ai.github.io/docs/agents/a2a-overview) ([md](https://goroute-ai.github.io/docs/agents/a2a-overview.md)): Architecture of the Linux Foundation A2A v1.0 protocol in GoRoute: dual HTTP/JSON-RPC bindings, SSE streaming, and transactional outbox webhooks. - [Cryptographic Agent Cards (JCS & JWS)](https://goroute-ai.github.io/docs/agents/a2a-agent-cards) ([md](https://goroute-ai.github.io/docs/agents/a2a-agent-cards.md)): RFC 8785 JSON Canonicalization Scheme (JCS) and RFC 7515 JSON Web Signature (JWS) signing for A2A Agent Cards. - [A2A OpenAI Bridge & gRPC Service](https://goroute-ai.github.io/docs/agents/a2a-bridge-and-grpc) ([md](https://goroute-ai.github.io/docs/agents/a2a-bridge-and-grpc.md)): Call autonomous A2A agents using standard OpenAI SDKs via model: a2a/{slug} or high-performance native gRPC lf.a2a.v1.A2AService. ### Connect your tools - [Integrations Overview](https://goroute-ai.github.io/docs/integrations/overview) ([md](https://goroute-ai.github.io/docs/integrations/overview.md)): Connect OpenAI- and Anthropic-compatible SDKs, coding agents, IDEs, agent frameworks, and observability backends to GoRoute AI Gateway. - [Claude Code](https://goroute-ai.github.io/docs/integrations/claude-code) ([md](https://goroute-ai.github.io/docs/integrations/claude-code.md)): Configure Anthropic Claude Code to route inference, token counting, and MCP tool calls through GoRoute AI Gateway. - [Cursor, Continue & Cline](https://goroute-ai.github.io/docs/integrations/cursor-and-ides) ([md](https://goroute-ai.github.io/docs/integrations/cursor-and-ides.md)): Connect Cursor, Continue.dev, and Cline IDE extensions to GoRoute AI Gateway over /v1 with Virtual Keys. - [Codex CLI, Gemini CLI & OpenWebUI](https://goroute-ai.github.io/docs/integrations/codex-and-cli-agents) ([md](https://goroute-ai.github.io/docs/integrations/codex-and-cli-agents.md)): Route OpenAI Codex CLI, Gemini CLI, and OpenWebUI through GoRoute AI Gateway via /v1 and /v1/responses. - [OpenAI SDKs (Python & TypeScript)](https://goroute-ai.github.io/docs/integrations/openai-sdks) ([md](https://goroute-ai.github.io/docs/integrations/openai-sdks.md)): Use the official Python and TypeScript openai SDKs with GoRoute AI Gateway for chat completions, streaming, embeddings, Responses API, and Realtime WebSockets. - [Anthropic SDKs (Python & TypeScript)](https://goroute-ai.github.io/docs/integrations/anthropic-sdks) ([md](https://goroute-ai.github.io/docs/integrations/anthropic-sdks.md)): Use the official Python anthropic and TypeScript @anthropic-ai/sdk packages with GoRoute AI Gateway via /anthropic/v1/messages and count_tokens. - [Agent Frameworks (LangChain, OpenAI Agents SDK & Google ADK)](https://goroute-ai.github.io/docs/integrations/agent-frameworks) ([md](https://goroute-ai.github.io/docs/integrations/agent-frameworks.md)): Connect LangChain, OpenAI Agents SDK, and Google ADK to GoRoute AI Gateway for unified model routing, MCP tool hubs, and A2A agent dispatch. - [OpenTelemetry & Prometheus](https://goroute-ai.github.io/docs/integrations/otel-and-prometheus) ([md](https://goroute-ai.github.io/docs/integrations/otel-and-prometheus.md)): Configure OTLP/HTTP tracing with W3C traceparent and gen_ai.* attributes for OTel Collector, Jaeger, and Grafana Tempo, plus Prometheus /metrics. ### Deploy and operate GoRoute - [Complete Configuration and Environment Reference](https://goroute-ai.github.io/docs/deploy/configuration) ([md](https://goroute-ai.github.io/docs/deploy/configuration.md)): Comprehensive configuration reference detailing 70+ YAML parameters, environment variable overrides, and model routing policies. - [Deployment and Storage Architecture](https://goroute-ai.github.io/docs/deploy/deployment-and-storage) ([md](https://goroute-ai.github.io/docs/deploy/deployment-and-storage.md)): Comprehensive production guide covering database migrations, 16 persistent schemas, and the clustered Redis keyspace and TTL matrix. - [Kubernetes & Kustomize Deployment](https://goroute-ai.github.io/docs/deploy/kubernetes-kustomize) ([md](https://goroute-ai.github.io/docs/deploy/kubernetes-kustomize.md)): Deploy GoRoute AI Gateway on Kubernetes with hardened Kustomize manifests, non-root security, health probes, PostgreSQL 16, Redis, and Prometheus. - [Helm Chart Deployment](https://goroute-ai.github.io/docs/deploy/helm-chart) ([md](https://goroute-ai.github.io/docs/deploy/helm-chart.md)): Deploy GoRoute AI Gateway on Kubernetes using the official Helm chart (v0.3.0 / v1.8.0) with HPA, PDB, NetworkPolicy, and migration hooks. - [Embedded Operator Web UI](https://goroute-ai.github.io/docs/deploy/operator-ui) ([md](https://goroute-ai.github.io/docs/deploy/operator-ui.md)): Comprehensive architecture and operator guide for the embedded React 19 Operator Web UI mounted at /ui/. - [Observability, Metrics & Health Probes](https://goroute-ai.github.io/docs/deploy/observability) ([md](https://goroute-ai.github.io/docs/deploy/observability.md)): Production guide for Prometheus metrics scraping, W3C distributed traceparent propagation, and active deployment health probes. - [Production Readiness Checklist](https://goroute-ai.github.io/docs/deploy/production-checklist) ([md](https://goroute-ai.github.io/docs/deploy/production-checklist.md)): Production checklist for GoRoute AI Gateway: SSRF firewall, secret validation, RBAC/OIDC, fail-closed rate limits, circuit breakers, and load testing. - [Troubleshooting & Recovery Runbooks](https://goroute-ai.github.io/docs/deploy/troubleshooting) ([md](https://goroute-ai.github.io/docs/deploy/troubleshooting.md)): Diagnostic guides and production recovery runbooks for common error codes, SSRF blocks, budget exceedances, rate limits, and circuit breakers. ### Contribute - [Engineering Guide for Coding Agents](https://goroute-ai.github.io/docs/contributing/claude-code-and-agents) ([md](https://goroute-ai.github.io/docs/contributing/claude-code-and-agents.md)): Contributor guide for configuring Claude Code, Cursor, Copilot, and coding agents working on the ai-gateway-go codebase itself. ### What changed - [Release Notes](https://goroute-ai.github.io/docs/releases) ([md](https://goroute-ai.github.io/docs/releases.md)): GoRoute AI Gateway release history, upgrade instructions, and database migration guidance. - [v1.8.0](https://goroute-ai.github.io/docs/releases/v1.8.0) ([md](https://goroute-ai.github.io/docs/releases/v1.8.0.md)): GoRoute AI Gateway v1.8.0 release notes: Two-Layer Guardrails Engine, 19 drivers, Starlark custom_code, /v1/guardrails/apply, and Light/Dark Operator UI. - [v1.7.0](https://goroute-ai.github.io/docs/releases/v1.7.0) ([md](https://goroute-ai.github.io/docs/releases/v1.7.0.md)): GoRoute AI Gateway v1.7.0 release notes: SSRF hardening, pure-SDK parity with Realtime, 63-path specgen, round-robin routing, Helm, and migrations 0013-0015. - [v1.6.0](https://goroute-ai.github.io/docs/releases/v1.6.0) ([md](https://goroute-ai.github.io/docs/releases/v1.6.0.md)): GoRoute AI Gateway v1.6.0 release notes: expanded provider compatibility, modality FinOps, migration 0012, Kubernetes Kustomize, and production tests. - [v1.5.0](https://goroute-ai.github.io/docs/releases/v1.5.0) ([md](https://goroute-ai.github.io/docs/releases/v1.5.0.md)): GoRoute AI Gateway v1.5.0 release notes: security hardening, Redis Cluster/Sentinel, durable FinOps outbox, streaming guardrails, and OTLP tracing. ## Go SDK Handbook - [Go SDK Overview](https://goroute-ai.github.io/docs/sdk/overview) ([md](https://goroute-ai.github.io/docs/sdk/overview.md)): Choose embedded or remote client mode and find the next SDK guides. - [Client Initialization & Configuration](https://goroute-ai.github.io/docs/sdk/client-configuration) ([md](https://goroute-ai.github.io/docs/sdk/client-configuration.md)): Initialize the GoRoute Go SDK for embedded or remote gateway use, then configure client options, timeouts, and model requests. - [Chat and Streaming](https://goroute-ai.github.io/docs/sdk/chat-and-streaming) ([md](https://goroute-ai.github.io/docs/sdk/chat-and-streaming.md)): Send single-prompt and multi-turn requests, stream deltas, and handle cancellation. - [Virtual Keys and FinOps](https://goroute-ai.github.io/docs/sdk/virtual-keys-and-finops) ([md](https://goroute-ai.github.io/docs/sdk/virtual-keys-and-finops.md)): Create and revoke virtual keys and query spend through the Go SDK. - [MCP and A2A](https://goroute-ai.github.io/docs/sdk/mcp-and-a2a) ([md](https://goroute-ai.github.io/docs/sdk/mcp-and-a2a.md)): Register MCP servers and A2A agents with the Go SDK and use their gateway routes. - [Go SDK API Reference](https://goroute-ai.github.io/docs/sdk/go-sdk-reference) ([md](https://goroute-ai.github.io/docs/sdk/go-sdk-reference.md)): Public constructors, options, request types, and methods in pkg/gateway. ## API Reference - [API Reference Index](https://goroute-ai.github.io/docs/api/overview) ([md](https://goroute-ai.github.io/docs/api/overview.md)): Master API index for GoRoute AI Gateway /v1 data plane routes, admin control plane endpoints, MCP Virtual Hub, and A2A v1.0 specifications. - [Gateway Data Plane API Reference](https://goroute-ai.github.io/docs/api/gateway-api) ([md](https://goroute-ai.github.io/docs/api/gateway-api.md)): Reference for all 24 GoRoute AI Gateway /v1 data plane routes, request/response schemas, reasoning normalization, guardrails evaluation, and telemetry headers. - [Admin Control Plane API Reference](https://goroute-ai.github.io/docs/api/admin-api) ([md](https://goroute-ai.github.io/docs/api/admin-api.md)): Comprehensive reference for all 12 GoRoute AI Gateway admin control plane endpoint groups with full cURL examples and JSON schemas. - [Model Context Protocol (MCP) API Reference](https://goroute-ai.github.io/docs/api/mcp-api) ([md](https://goroute-ai.github.io/docs/api/mcp-api.md)): Complete specification of GoRoute MCP Virtual Hub, scoped server execution, curated toolsets, plain REST bridge, and progressive tool discovery. - [Agent-to-Agent (A2A) Protocol API Reference](https://goroute-ai.github.io/docs/api/a2a-api) ([md](https://goroute-ai.github.io/docs/api/a2a-api.md)): Specification of the A2A v1.0 protocol in GoRoute AI Gateway, covering Agent Cards, dual-binding dispatch, SSE streaming, gRPC, and OpenAI bridge. ## Optional ### Runnable Go Examples - [Go Examples & Task Cookbook](https://goroute-ai.github.io/docs/examples/overview) ([md](https://goroute-ai.github.io/docs/examples/overview.md)): Browse 26 runnable GoRoute Go examples and task-based cookbook recipes for routing, providers, FinOps, guardrails, MCP, and A2A. - [Hello Gateway](https://goroute-ai.github.io/docs/examples/hello-gateway) ([md](https://goroute-ai.github.io/docs/examples/hello-gateway.md)): Build your first GoRoute Go SDK application by starting an embedded AI gateway and sending a chat completion to a configured model. - [System Prompts](https://goroute-ai.github.io/docs/examples/system-prompt) ([md](https://goroute-ai.github.io/docs/examples/system-prompt.md)): Set system prompts with the GoRoute Go SDK to guide model behavior across supported provider APIs and reasoning models. - [Streaming Tokens](https://goroute-ai.github.io/docs/examples/streaming-tokens) ([md](https://goroute-ai.github.io/docs/examples/streaming-tokens.md)): Stream chat response tokens as server-sent events with the GoRoute Go SDK and translate provider streaming formats through one gateway. - [Temperature & Limits](https://goroute-ai.github.io/docs/examples/temperature-and-sampling) ([md](https://goroute-ai.github.io/docs/examples/temperature-and-sampling.md)): Control model sampling and cap generated tokens with GoRoute Go SDK options for predictable output and bounded response costs. - [Structured JSON](https://goroute-ai.github.io/docs/examples/json-mode-structured-output) ([md](https://goroute-ai.github.io/docs/examples/json-mode-structured-output.md)): Build a GoRoute Go SDK example that requests schema-guided JSON output for reliable, machine-readable model responses. - [Multi-Turn Memory](https://goroute-ai.github.io/docs/examples/multi-turn-conversation) ([md](https://goroute-ai.github.io/docs/examples/multi-turn-conversation.md)): Preserve conversation history across multiple chat turns with GoRoute's Go SDK request messages and an embedded gateway. - [OpenAI Direct](https://goroute-ai.github.io/docs/examples/openai-direct) ([md](https://goroute-ai.github.io/docs/examples/openai-direct.md)): Connect the GoRoute Go SDK directly to OpenAI and send chat requests through its unified provider interface. - [Anthropic Direct](https://goroute-ai.github.io/docs/examples/anthropic-direct) ([md](https://goroute-ai.github.io/docs/examples/anthropic-direct.md)): Connect the GoRoute Go SDK to Anthropic Claude and send model requests through the gateway's provider integration. - [Google Gemini Direct](https://goroute-ai.github.io/docs/examples/gemini-direct) ([md](https://goroute-ai.github.io/docs/examples/gemini-direct.md)): Connect a GoRoute Go application to Google Gemini and send model requests through the gateway's provider integration. - [Local Ollama](https://goroute-ai.github.io/docs/examples/local-ollama) ([md](https://goroute-ai.github.io/docs/examples/local-ollama.md)): Connect GoRoute AI Gateway to a local Ollama model using a custom API base URL for on-premises or offline inference. - [Unified Model Aliases](https://goroute-ai.github.io/docs/examples/unified-model-alias) ([md](https://goroute-ai.github.io/docs/examples/unified-model-alias.md)): Configure a logical model alias in GoRoute so applications can switch upstream AI providers without changing their model request code. - [Tool Definition](https://goroute-ai.github.io/docs/examples/single-tool-definition) ([md](https://goroute-ai.github.io/docs/examples/single-tool-definition.md)): Define an MCP tool schema in Go and discover it through the GoRoute virtual hub before invoking it from an application. - [Tool Execution](https://goroute-ai.github.io/docs/examples/tool-execution-callback) ([md](https://goroute-ai.github.io/docs/examples/tool-execution-callback.md)): Build a Go example that invokes an MCP tool through the GoRoute gateway hub and handles its structured execution result. - [Multi-Tool Inventory](https://goroute-ai.github.io/docs/examples/multi-tool-selection) ([md](https://goroute-ai.github.io/docs/examples/multi-tool-selection.md)): Combine specialized MCP tool servers in the GoRoute virtual hub and discover tools through one aggregated registry in a Go example. - [Autonomous Agent Loop](https://goroute-ai.github.io/docs/examples/autonomous-tool-loop) ([md](https://goroute-ai.github.io/docs/examples/autonomous-tool-loop.md)): Build a GoRoute agent loop that analyzes a request, executes tools over multiple turns, and returns a synthesized response. - [Outage Fallbacks](https://goroute-ai.github.io/docs/examples/failover-fallback-chain) ([md](https://goroute-ai.github.io/docs/examples/failover-fallback-chain.md)): Configure a GoRoute fallback target and run a Go example that sends requests to a backup model when the primary provider is unavailable. - [Round-Robin Balancer](https://goroute-ai.github.io/docs/examples/round-robin-balancer) ([md](https://goroute-ai.github.io/docs/examples/round-robin-balancer.md)): Configure round-robin model routing in GoRoute to distribute inference requests evenly across multiple backend deployments. - [Weighted Shuffle](https://goroute-ai.github.io/docs/examples/weighted-shuffle-routing) ([md](https://goroute-ai.github.io/docs/examples/weighted-shuffle-routing.md)): Split AI traffic between model deployments with weighted shuffle routing in GoRoute for gradual rollouts and controlled traffic allocation. - [Least Latency EWMA](https://goroute-ai.github.io/docs/examples/least-latency-ewma) ([md](https://goroute-ai.github.io/docs/examples/least-latency-ewma.md)): Use GoRoute's Peak-EWMA load balancer to track provider response times and route model requests toward the lowest-latency endpoint. - [Circuit Breakers](https://goroute-ai.github.io/docs/examples/circuit-breaker) ([md](https://goroute-ai.github.io/docs/examples/circuit-breaker.md)): Configure GoRoute circuit breaker thresholds in Go and learn how fast-failing protects services when an upstream model repeatedly errors. - [Exact-Match Cache](https://goroute-ai.github.io/docs/examples/exact-match-cache) ([md](https://goroute-ai.github.io/docs/examples/exact-match-cache.md)): Run a Go example of GoRoute's SHA-256 exact-match cache and see how repeated deterministic prompts can avoid another provider request. - [Rate Limiting](https://goroute-ai.github.io/docs/examples/sliding-window-rate-limiting) ([md](https://goroute-ai.github.io/docs/examples/sliding-window-rate-limiting.md)): Use the Go SDK to configure sliding-window request and token quotas that protect provider limits and keep usage fair across tenants. - [Virtual Keys & Budgets](https://goroute-ai.github.io/docs/examples/virtual-keys-and-budgets) ([md](https://goroute-ai.github.io/docs/examples/virtual-keys-and-budgets.md)): Create scoped GoRoute virtual API keys, set spend budgets, track usage in micro-dollars, and revoke keys from a runnable Go example. - [MCP Virtual Hub](https://goroute-ai.github.io/docs/examples/mcp-virtual-hub) ([md](https://goroute-ai.github.io/docs/examples/mcp-virtual-hub.md)): Connect upstream Model Context Protocol servers to the GoRoute virtual hub and invoke their tools over JSON-RPC from a Go example. - [A2A Agent Network](https://goroute-ai.github.io/docs/examples/a2a-agent-network) ([md](https://goroute-ai.github.io/docs/examples/a2a-agent-network.md)): Register signed A2A Agent Cards and route tasks between agents through GoRoute using its OpenAI-compatible agent bridge. - [Embedded Microservice](https://goroute-ai.github.io/docs/examples/embedded-http-microservice) ([md](https://goroute-ai.github.io/docs/examples/embedded-http-microservice.md)): Embed GoRoute AI Gateway in a Go HTTP service with Kubernetes liveness and readiness probes and graceful shutdown handling.