Overview

AppleRouter is a powerful AI model routing service that provides a unified API interface supporting multiple AI providers. Our API is compatible with:

OpenAI

Full compatibility with OpenAI API format

Claude

Native Anthropic Claude Messages API support

Gemini

Google Gemini API format support

API Capabilities

Authentication

All API endpoints require authentication using Bearer tokens. Include your API key in the Authorization header:
Authorization: Bearer sk-your-api-key
Keep your API key secure and never expose it in client-side code.

Base URL

All API requests should be made to:
https://api.applerouter.ai

Request Format

Most endpoints accept JSON request bodies. Set the Content-Type header appropriately:
Content-Type: application/json

Response Format

Responses are returned in JSON format. Successful responses will include the requested data, while error responses follow this structure:
{
  "error": {
    "message": "Error description",
    "type": "error_type",
    "code": "error_code"
  }
}

Rate Limits

API rate limits depend on your subscription plan. If you exceed the rate limit, you’ll receive a 429 Too Many Requests response.

Multi-Format Support

AppleRouter automatically detects the request format based on headers:
HeadersFormat
x-api-key + anthropic-versionAnthropic Claude
x-goog-api-key or key query paramGoogle Gemini
DefaultOpenAI
This allows you to use your existing code with minimal changes.