AgentRouter Pro

API Reference

AgentRouter API endpoint reference documentation

AgentRouter provides a unified API gateway compatible with multiple mainstream LLM providers.

Authentication

All API requests require authentication using an API key. You can provide your API key in one of two ways:

Authorization Header

Authorization: Bearer sk-ar-your-api-key

x-api-key Header

x-api-key: sk-ar-your-api-key

Available Endpoints

AgentRouter supports two main API formats:

  • OpenAI-Compatible API - Supports OpenAI, DeepSeek, Moonshot, and other providers
  • Anthropic-Compatible API - Supports Anthropic, AWS Bedrock, and other providers
  • Search - High-authority web search proxy with fixed per-call billing (see details)

Error Handling

The API returns standard HTTP status codes with error messages:

  • 400 - Bad Request - Invalid request parameters
  • 401 - Unauthorized - Authentication failed
  • 402 - Payment Required - Insufficient balance
  • 500 - Internal Server Error

Error response formats vary depending on the API type (OpenAI or Anthropic) being used.

On this page