API Reference
Agent Router exposes OpenAI-compatible and Anthropic-compatible REST-like APIs through a single gateway endpoint. Applications target the gateway using the request shapes they already use; routing, fallback, credentials, and telemetry are applied by the platform.
Introduction
There are two ways to call Agent Router, and both target the same endpoints and the same authentication model:
- HTTP APIs. The gateway speaks plain HTTPS, so any HTTP client works: curl, an existing OpenAI or Anthropic SDK pointed at the gateway URL, or a hand-built request. This is the lowest-friction path and the surface the reference pages in this section document.
- Language SDKs. Typed clients for Go, Python, and TypeScript wrap the same HTTP APIs with helpers for authentication, retries, and streaming. Reach for them when a typed surface and bundled examples are preferable to raw HTTP.
The SDKs mirror the HTTP surface, so anything described in the reference is reachable either way.
Get the full API specification
The complete Agent Router API is published as a single OpenAPI 3.1 document covering every service and endpoint. Import it into Postman, Insomnia, or Swagger UI, or feed it to a client generator such as openapi-generator.
Download the OpenAPI spec (YAML)
Always-current spec. The pinned agentrouter-openapi-0.1.1.yaml is also available at the same path.
Browse the interactive reference
Per-endpoint pages with request and response schemas and a built-in "try it" console. Every service is listed under API reference in the sidebar.
Make your first call
For a hands-on walkthrough, Make an AI API call through Agent Router covers getting a key, pointing an SDK at the gateway, and streaming a response in a few minutes. That guide also covers the tare CLI and the typed Agent Router SDKs.