> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> One key, one base URL (https://api.xroute.ai), every API. Browse every model and data endpoint XRoute routes to.

XRoute provides unified HTTP endpoints under the base prefix **`https://api.xroute.ai`** for 60+ LLMs, media generators, and 100+ real-time data APIs.

## Base URLs

All API requests share the unified origin `https://api.xroute.ai`:

| Mode / Service | Base URL / Endpoint Prefix |
| :- | :- |
| **OpenAI-compatible Gateway** | `https://api.xroute.ai/v1` |
| **Anthropic-compatible Gateway** | `https://api.xroute.ai/v1/messages` |
| **Native Format Gateway (e.g., Gemini)** | `https://api.xroute.ai/v1beta` |
| **Real-time Data & Account APIs** | `https://api.xroute.ai/apis/v1` |
| **MCP Server** | `https://mcp.xroute.ai/mcp` |

## Essentials

> [card] [Credit Balance](https://docs.xroute.ai/api-reference/credits-balance.md)
>
> Check your remaining prepaid Credits and key spending limits (`GET https://api.xroute.ai/apis/v1/account/balance`).

> [card] [Account Usage](https://docs.xroute.ai/api-reference/account-usage.md)
>
> Query historical invocation totals and settled USD spend (`GET https://api.xroute.ai/apis/v1/account/usage`).

> [card] [Chat Completions](https://docs.xroute.ai/api-reference/chat-completions.md)
>
> Call 60+ frontier models via OpenAI format, Anthropic format, or provider-native format under `https://api.xroute.ai`.

> [card] [List Models](https://docs.xroute.ai/api-reference/models-list.md)
>
> Fetch live model IDs, context windows, and token pricing (`GET https://api.xroute.ai/v1/models`).

## Settled call cost

Every paid response includes the `x-xroute-cost-usd` header reporting the exact USD amount deducted from your Credits balance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.