> ## 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.

# Gateway Integration

> Use Planck AI Gateway through explicit OpenAI-compatible and Anthropic-compatible routes.

# Overview

Planck AI Gateway is the public entry point for AI requests. Use one base URL:

```text theme={null}
https://api.inquantum.ai
```

The gateway exposes explicit, supported routes instead of an unrestricted generic proxy. This keeps billing, logging, routing, provider-key handling, and safety features consistent across requests.

## Supported Public Routes

| 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`, `GET /v1/videos/{job_id}`, `GET /v1/videos/{job_id}/content`                                               |
| Audio transcription                       | `POST /v1/audio/transcriptions`                                                                                               |
| Audio translation                         | `POST /v1/audio/translations`                                                                                                 |
| Text to speech                            | `POST /v1/audio/speech`                                                                                                       |
| Files                                     | `GET /v1/files`, `POST /v1/files`, `GET /v1/files/{file_id}`, `DELETE /v1/files/{file_id}`, `GET /v1/files/{file_id}/content` |
| OpenAI-compatible models                  | `GET /v1/models`, `GET /v1/models/{model_id}`                                                                                 |
| Anthropic Messages, mapped through Planck | `POST /v1/messages`                                                                                                           |
| Native Anthropic passthrough              | `/anthropic/v1/*`                                                                                                             |
| Gateway metadata                          | `GET /v1/gateway/status`, `GET /v1/gateway/providers`                                                                         |

## Basic OpenAI-Compatible Request

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

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

const response = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Say hello." }],
});
```

```bash theme={null}
curl https://api.inquantum.ai/v1/chat/completions \
  -H "Authorization: Bearer $PLANCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{ "role": "user", "content": "Say hello." }]
  }'
```

## BYOK Provider Keys

When you use your own provider key, Planck still needs a Planck API key for authentication. Send the provider key separately:

```bash theme={null}
curl https://api.inquantum.ai/v1/chat/completions \
  -H "Authorization: Bearer $PLANCK_API_KEY" \
  -H "X-Provider-Key: $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{ "role": "user", "content": "Say hello." }]
  }'
```

You can also put the Planck key in `Planck-Auth` and keep the provider key in `Authorization`:

```bash theme={null}
Planck-Auth: Bearer $PLANCK_API_KEY
Authorization: Bearer $OPENAI_API_KEY
```

## Custom And Self-Hosted Targets

Custom targets are for OpenAI-compatible endpoints that you run or have approved for your organization. They are not a generic public proxy.

Custom targets are:

* BYOK-only
* limited to supported operations such as chat, responses, and embeddings
* configured per organization before production use
* required to use `https` for external targets
* blocked from private-network destinations outside local development

Send the target base URL with `Planck-Target-URL`:

```bash theme={null}
curl https://api.inquantum.ai/v1/chat/completions \
  -H "Authorization: Bearer $PLANCK_API_KEY" \
  -H "X-Provider-Key: $CUSTOM_PROVIDER_KEY" \
  -H "Planck-Target-URL: https://llm.example.com" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama-3.1-70b",
    "messages": [{ "role": "user", "content": "Hello from my model." }]
  }'
```

For local development, localhost-style targets can be enabled by the gateway operator. This is intended for local testing only.

## Anthropic

For most applications, use the mapped Anthropic route:

```bash theme={null}
curl https://api.inquantum.ai/v1/messages \
  -H "Authorization: Bearer $PLANCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-4.5-sonnet",
    "max_tokens": 256,
    "messages": [{ "role": "user", "content": "Say hello." }]
  }'
```

For Anthropic-native requests that need Anthropic-specific paths or semantics, use:

```text theme={null}
https://api.inquantum.ai/anthropic/v1/*
```
