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

# Overview

> A brief introduction to the Edgee AI Gateway API.

Welcome to the Edgee AI Gateway API documentation. This guide will help you understand how to interact with the Edgee API to create chat completions and manage models through HTTP requests.

Edgee is an edge-native AI Gateway with private model hosting, automatic model selection, cost audits/alerts, and edge tools. The API is **OpenAI-compatible**, providing one API for any model and any provider.

## Base URL

All URLs referenced in the documentation have the following base:

```
https://api.edgee.ai
```

## Authentication

The Edgee API uses bearer authentication. When making requests, you must include your API Key in the `Authorization` header in the format `Bearer <token>`. For more details, please refer to the [Authentication](./authentication) page.

## Errors

When an error occurs, the Edgee API responds with a conventional HTTP response code and a JSON object containing more details about the error. For more information, please refer to the [Errors](./errors) page.

## Rate Limiting

Please note that the Edgee has its own rate limit technology to prevent abuse and ensure service stability.
If you exceed these limits, your requests will be throttled and you will receive a `429 Too Many Requests` response.
Additionally, usage limits may be enforced based on your API key configuration.

## API Formats

Edgee supports two API formats to accommodate different use cases and provider preferences:

<CardGroup cols={2}>
  <Card title="OpenAI Format" icon="https://mintcdn.com/edgee/q0pRfKOA-_MkO9qY/images/icons/openai.svg?fit=max&auto=format&n=q0pRfKOA-_MkO9qY&q=85&s=a65508ff5c1f9427cbaf745f9cc964e4" color="#8924A6" width="128" height="128" data-path="images/icons/openai.svg">
    Use `/v1/chat/completions` or `/v1/responses` for maximum flexibility. Works with all providers (OpenAI, Anthropic, Google, Meta, etc.).

    **Model format:** `provider/model` (e.g., `anthropic/claude-sonnet-4.5`)

    **Recommended for:** New integrations, multi-provider applications, and maximum flexibility.
  </Card>

  <Card title="Anthropic Format" icon="https://mintcdn.com/edgee/RmPUqoqJw-u0FxFP/images/icons/anthropic.svg?fit=max&auto=format&n=RmPUqoqJw-u0FxFP&q=85&s=a3a7b4a3892d3e3d041459e9d11db12d" color="#8924A6" width="128" height="128" data-path="images/icons/anthropic.svg">
    Use `/v1/messages` for native Anthropic Messages API format.

    **Model format:** `model` (e.g., `claude-sonnet-4.5`)

    **Recommended for:** Migrating from Anthropic's API, using Anthropic SDK, or requiring Anthropic-specific features.
  </Card>
</CardGroup>

**Choose the format that best fits your needs:**

* **For new projects**: Use the OpenAI formats (`/v1/chat/completions` and `/v1/responses`) for maximum flexibility and multi-provider support.
* **For Anthropic migrations**: Use the Anthropic format (`/v1/messages`) for seamless compatibility with existing code using Anthropic's SDK.

Both formats provide the same underlying AI capabilities and support Edgee's features.

## Features

<Columns cols={2}>
  <Card icon="link" iconType="duotone" color="#8924A6">
    **OpenAI-Compatible API**

    Fully compatible with the OpenAI API format, making it easy to switch between providers or use multiple providers through a single interface.
  </Card>

  <Card icon="layers" iconType="duotone" color="#8924A6">
    **Multi-Provider Support**

    Access models from multiple providers (OpenAI, Anthropic, etc.) through a single API endpoint. Simply specify the model using the format `{author_id}/{model_id}`.
  </Card>

  <Card icon="zap" iconType="duotone" color="#8924A6">
    **Streaming Support**

    Both streaming and non-streaming responses are supported. Enable streaming by setting `stream: true` to receive Server-Sent Events (SSE) with partial message deltas.
  </Card>

  <Card icon="code" iconType="duotone" color="#8924A6">
    **Function Calling**

    The API supports function calling (tools) that allows models to call external functions, enabling more interactive and powerful applications.
  </Card>

  <Card icon="chart-no-axes-combined" iconType="duotone" color="#8924A6">
    **Usage Tracking**

    Every response includes detailed usage statistics: token counts (prompt, completion, total), cached tokens, and reasoning tokens.
  </Card>
</Columns>
