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

# AI Gateway Overview

> Use supported AI providers through a single OpenAI-compatible API with intelligent routing, fallbacks, and unified observability

Planck AI Gateway provides a unified API for supported LLM providers through OpenAI-compatible and Anthropic-compatible routes. Instead of wiring every provider directly into your application, use one familiar gateway interface with intelligent routing, fallbacks, billing, and **complete observability built in**.

## Why Use AI Gateway?

<CardGroup cols={2}>
  <Card title="One SDK for All Models" icon="code">
    Use OpenAI SDK patterns to access GPT, Claude, Gemini, and other supported
    models
  </Card>

  <Card title="No Rate Limits" icon="gauge">
    Skip provider tier restrictions - use credits with 0% markup
  </Card>

  <Card title="Always Online" icon="shield-check">
    Automatic failover across providers keeps your app running
  </Card>

  <Card title="Unified Observability" icon="chart-line">
    Track usage, costs, and performance across all providers in one dashboard
  </Card>
</CardGroup>

## How It Works

The AI Gateway sits between your application and LLM providers, acting as a unified translation layer:

1. **You make one request** - Use the OpenAI SDK format, regardless of which provider you want
2. **We translate & route** - Planck converts your request to the correct provider format (Anthropic, Google, etc.)
3. **Provider responds** - The LLM provider processes your request
4. **We log & return** - You get the response back while we capture metrics, costs, and errors

All through a single endpoint: `https://api.inquantum.ai`

## Supported Gateway Surface

The current gateway uses explicit public routes instead of an unrestricted generic proxy.

| Capability                   | Route                                                                                   |
| ---------------------------- | --------------------------------------------------------------------------------------- |
| Chat completions             | `POST /v1/chat/completions`                                                             |
| Structured JSON              | `POST /v1/chat/completions` with `response_format`                                      |
| Responses API                | `POST /v1/responses`                                                                    |
| Embeddings                   | `POST /v1/embeddings`                                                                   |
| Reranking                    | `POST /v1/rerank`                                                                       |
| Image generation             | `POST /v1/images/generations`                                                           |
| Video generation             | `POST /v1/videos`, then poll `GET /v1/videos/{job_id}`                                  |
| Audio                        | `POST /v1/audio/transcriptions`, `POST /v1/audio/translations`, `POST /v1/audio/speech` |
| Files                        | `/v1/files*`                                                                            |
| Anthropic messages           | `POST /v1/messages`                                                                     |
| Native Anthropic passthrough | `/anthropic/v1/*`                                                                       |
| Models                       | `GET /v1/models`, `GET /v1/models/{model_id}`                                           |

<Note>
  With credits, we manage provider API keys for you. With BYOK, you provide your
  own provider keys while keeping Planck logging, routing, and observability.
</Note>

## Choose an Operation

<CardGroup cols={2}>
  <Card title="Chat & Responses" icon="code" href="/gateway/text-generation">
    Generate text with OpenAI-compatible or Anthropic-compatible request formats
  </Card>

  <Card title="Structured JSON" icon="brackets-curly" href="/gateway/structured-json">
    Constrain model output to a JSON Schema your application can validate
  </Card>

  <Card title="Embeddings" icon="list" href="/gateway/embeddings">
    Convert text into vectors for search, retrieval, and similarity
  </Card>

  <Card title="Reranking" icon="arrow-down-wide-short" href="/gateway/reranking">
    Reorder documents by relevance to a query
  </Card>

  <Card title="Image Generation" icon="image" href="/gateway/image-generation">
    Generate an image through one gateway endpoint
  </Card>

  <Card title="Video Generation" icon="video" href="/gateway/video-generation">
    Submit, monitor, and download asynchronous video generations
  </Card>
</CardGroup>

## Quick Example

Add two lines to your existing OpenAI code to use the gateway with automatic observability:

```typescript theme={null}
import { OpenAI } from "openai";

const client = new OpenAI({
  baseURL: "https://api.inquantum.ai", // [!code ++]
  apiKey: process.env.PLANCK_API_KEY, // [!code ++]
});

const response = await client.chat.completions.create({
  model: "gpt-4o", // Or another supported model
  messages: [{ role: "user", content: "Hello!" }],
});
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Get Started in 5 Minutes" icon="rocket" href="/getting-started/quick-start">
    Set up AI Gateway and make your first request
  </Card>

  <Card title="Browse Model Registry" icon="list" href="https://inquantum.ai/models">
    See available models and their supported capabilities
  </Card>

  <Card title="Provider Routing" icon="route" href="/gateway/provider-routing">
    Configure automatic routing and fallbacks for reliability
  </Card>

  <Card title="Prompt Integration" icon="wand-magic-sparkles" href="/gateway/prompt-integration">
    Deploy and manage prompts through the gateway
  </Card>
</CardGroup>
