For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
API types
Supported LLM API endpoint types and route configurations
Agentgateway supports multiple LLM API endpoint types, called route types, that determine how clients interact with the gateway and how requests are routed to backends. In the simplified llm configuration, agentgateway maps standard endpoint paths to these route types automatically. In the binds/listeners/routes configuration, you set the route type explicitly in the policies.ai.routes map.
The following API types have dedicated guides:
- Chat completions — The OpenAI
/v1/chat/completionsendpoint. This is the most widely used API type for text generation and chat applications. - Responses — The OpenAI
/v1/responsesendpoint for stateful, multi-step model interactions. - Messages — The Anthropic
/v1/messagesendpoint for Claude models. - Realtime — The OpenAI Realtime API for low-latency, streaming voice and text interactions over WebSockets.
- Passthrough — Forwards requests directly to the backend provider without transformation.
Agentgateway also recognizes additional route types for specific endpoints, including embeddings (/v1/embeddings), models (/v1/models), and anthropicTokenCount (/v1/messages/count_tokens).
Chat completions
Send chat completion requests through agentgateway using the OpenAI Chat Completions API.
Responses
Send requests through agentgateway using the OpenAI Responses API.
Messages
Send requests through agentgateway using the Anthropic Messages API.
OpenAI Realtime
Proxy OpenAI Realtime API WebSocket traffic and track token usage.
Passthrough
Forward requests to the upstream provider without transformation.