Skip to content

User Guide

This guide is for developers using the AI Gateway to route LLM requests from AI coding agents and applications.


You are a developer who wants to:

  • Route AI agent requests through a centralized gateway instead of hitting provider APIs directly
  • Use any of the supported AI coding agents (Claude Code, OpenCode, Goose, Continue.dev, LangChain, Codex CLI)
  • Access multiple model providers (Bedrock, Anthropic, OpenAI, Google, Azure OpenAI) with a single set of credentials
  • Avoid managing individual provider API keys on your local machine

CapabilityDescription
Route across providersThe gateway config selects the provider and fails over across a priority chain (Bedrock primary, Anthropic-direct fallback) without client changes
Use either API formatSend requests in OpenAI Chat Completions format (/v1/chat/completions) or Anthropic Messages format (/v1/messages) on one port
Authenticate onceUse a single Cognito M2M token instead of per-provider API keys
Use any compatible agentConfigure Claude Code, OpenCode, Goose, Continue.dev, LangChain, or Codex CLI

Agent Setup

Step-by-step configuration for each supported AI coding agent.

Agent setup

API Reference

Endpoints, headers, request/response formats, and rate limits.

API reference

Routing Strategies

Provider failover and load balancing via agentgateway priority groups.

Routing strategies

Troubleshooting

Solutions for common errors: 401s, 403s, missing headers, and more.

Troubleshooting