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

# Planck Header Directory

> Customer-facing headers supported by the Planck AI Gateway.

Use these headers with the AI Gateway at:

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

Most OpenAI-compatible SDKs should use `Authorization: Bearer $PLANCK_API_KEY`. Use `Planck-Auth` when you need `Authorization` to carry a provider key for BYOK.

<Note>
  `Planck-*` headers are canonical. Existing `Bifrost-*` headers remain accepted;
  when both forms are present, the Planck value takes precedence. See
  [Bifrost compatibility](/getting-started/migrating-from-bifrost).
</Note>

```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": "Hello" }]
  }'
```

## Authentication

<ResponseField name="Authorization" type="string">
  Standard bearer auth. Use `Bearer <PLANCK_API_KEY>` for normal gateway requests.
</ResponseField>

<ResponseField name="Planck-Auth" type="string">
  Planck-specific auth header. Use this when `Authorization` must contain a
  provider API key.
</ResponseField>

<ResponseField name="x-api-key" type="string">
  Alternate API key header for Planck keys.
</ResponseField>

<ResponseField name="X-Provider-Key" type="string">
  Explicit BYOK provider key header. Use this for OpenAI, Anthropic, or custom
  target provider keys.
</ResponseField>

<ResponseField name="Planck-Provider-Key" type="string">
  Alternate explicit BYOK provider key header.
</ResponseField>

## Routing

<ResponseField name="Planck-Billing-Mode" type="string">
  Optional request-level billing mode: `byok`, `ptb`, or `auto`. Omitted/`auto`
  uses stored BYOK first, then PTB. Explicit `byok` or `ptb` is strict and fails
  if that mode is unavailable.
</ResponseField>

<ResponseField name="Planck-Target-URL" type="string">
  Base URL for an approved custom or self-hosted OpenAI-compatible target.
  Custom targets are BYOK-only and are only available for supported operations.
</ResponseField>

<ResponseField name="Planck-OpenAI-Api-Base" type="string">
  Alternate OpenAI-compatible base URL override for OpenAI-compatible requests.
</ResponseField>

<ResponseField name="Planck-Gateway-Body-Mapping" type="string">
  Controls request/response body mapping for custom target routing. Supported
  values are `OPENAI`, `RESPONSES`, and `NO_MAPPING`.
</ResponseField>

<ResponseField name="Planck-Model-Override" type="string">
  Overrides the model used for cost calculation and provider mapping when the
  model cannot be derived from the request.
</ResponseField>

<ResponseField name="Planck-Fallbacks" type="JSON string">
  Defines an explicit fallback chain. Each item can include `target-url`,
  `headers`, `onCodes`, and `bodyKeyOverride`.
</ResponseField>

## Request Identity

<ResponseField name="Planck-Request-Id" type="string">
  Optional request UUID. If omitted, Planck generates one.
</ResponseField>

<ResponseField name="Planck-User-Id" type="string">
  User identifier for analytics, cost attribution, sessions, and user metrics.
</ResponseField>

<ResponseField name="x-stripe-customer-id" type="string">
  Optional Stripe customer identifier for billing-related workflows.
</ResponseField>

<ResponseField name="Planck-Node-Id" type="string">
  Optional node or deployment identifier for routing and analytics.
</ResponseField>

## Custom Properties

<ResponseField name="Planck-Property-[Name]" type="string">
  Adds custom metadata to the request. For example,
  `Planck-Property-Environment: production`.
</ResponseField>

<ResponseField name="Planck-Session-Id" type="string">
  Groups requests into a session.
</ResponseField>

<ResponseField name="Planck-Session-Path" type="string">
  Tracks nested request paths within a session.
</ResponseField>

<ResponseField name="Planck-Session-Name" type="string">
  Human-readable session name.
</ResponseField>

## Memory

<ResponseField name="Planck-Memory-Enabled" type="boolean">
  Opts a request into user memory when org, feature flag, and context profile
  settings also allow memory. If omitted or false, the request remains
  pass-through for memory. Advanced personalization layers, such as personalized
  ranking and persona hints, use this same explicit opt-in path.
</ResponseField>

<ResponseField name="Planck-Memory-Scope" type="string">
  Optional memory namespace within an organization and user, such as an app ID,
  project, customer tenant, or `default`.
</ResponseField>

## Planck Context

<ResponseField name="Planck-Knowledge-Base" type="string">
  Selects an organization knowledge base by UUID. The authenticated API key or
  user must have read access. `x-planck-knowledge-base` remains a deprecated
  compatibility alias; when both are present, `Planck-Knowledge-Base` wins.
</ResponseField>

<ResponseField name="Planck-Managed-Knowledge-Packs" type="string">
  Selects up to 16 comma-separated managed knowledge pack UUIDs. Every pack must
  be active and granted either directly to the request organization or by its
  tier policy. This is additive with `Planck-Knowledge-Base` and
  context-profile sources.
</ResponseField>

<ResponseField name="x-planck-workflow" type="string">
  Selects a workflow context.
</ResponseField>

<ResponseField name="x-planck-environment" type="string">
  Selects an environment such as `development`, `staging`, or `production`.
</ResponseField>

<ResponseField name="x-planck-context-profile" type="string">
  Selects a context profile.
</ResponseField>

## Caching

<ResponseField name="Planck-Cache-Enabled" type="boolean">
  Enables response caching for eligible requests.
</ResponseField>

<ResponseField name="Planck-Cache-Control" type="string">
  Sets cache duration, for example `max-age=3600`.
</ResponseField>

<ResponseField name="Planck-Cache-Bucket-Max-Size" type="string">
  Sets how many different responses can be cached for the same key.
</ResponseField>

<ResponseField name="Planck-Cache-Seed" type="string">
  Adds a cache namespace, such as a user or tenant id.
</ResponseField>

<ResponseField name="Planck-Cache-Ignore-Keys" type="string">
  Comma-separated JSON keys to exclude from cache key generation.
</ResponseField>

## Retries

<ResponseField name="Planck-Retry-Enabled" type="boolean">
  Enables automatic retry behavior.
</ResponseField>

<ResponseField name="Planck-Retry-Num" type="string">
  Maximum retry attempts.
</ResponseField>

<ResponseField name="Planck-Retry-Factor" type="string">
  Exponential backoff factor.
</ResponseField>

<ResponseField name="Planck-Retry-Min-Timeout" type="string">
  Minimum retry delay in milliseconds.
</ResponseField>

<ResponseField name="Planck-Retry-Max-Timeout" type="string">
  Maximum retry delay in milliseconds.
</ResponseField>

## Prompt And Safety

<ResponseField name="Planck-Prompt-Id" type="string">
  Associates the request with a managed prompt.
</ResponseField>

<ResponseField name="Planck-Prompt-Mode" type="string">
  Selects prompt behavior, such as testing mode.
</ResponseField>

<ResponseField name="Planck-Prompt-Version" type="string">
  Selects a prompt version.
</ResponseField>

<ResponseField name="Planck-Prompt-Format" type="string">
  Selects prompt formatting behavior.
</ResponseField>

<ResponseField name="Planck-Prompt-Name" type="string">
  Human-readable prompt name.
</ResponseField>

<ResponseField name="Planck-LLM-Security-Enabled" type="boolean">
  Enables prompt security checks.
</ResponseField>

<ResponseField name="Planck-Prompt-Security-Enabled" type="boolean">
  Alias for prompt security checks.
</ResponseField>

<ResponseField name="Planck-LLM-Security-Advanced" type="string">
  Advanced prompt security mode.
</ResponseField>

<ResponseField name="Planck-Moderations-Enabled" type="boolean">
  Enables moderation checks for supported request paths.
</ResponseField>

## Streaming And Timeouts

<ResponseField name="Planck-Stream-Force-Format" type="boolean">
  Forces OpenAI-compatible stream formatting.
</ResponseField>

<ResponseField name="Planck-Stream-Usage" type="boolean">
  Requests usage data in streamed responses when supported.
</ResponseField>

<ResponseField name="Planck-Increase-Timeout" type="boolean">
  Requests an increased timeout for long-running operations.
</ResponseField>

## Privacy

<ResponseField name="Planck-Omit-Request" type="boolean">
  Omits request body data from logs where supported.
</ResponseField>

<ResponseField name="Planck-Omit-Response" type="boolean">
  Omits response body data from logs where supported.
</ResponseField>

## Integrations

<ResponseField name="Planck-Posthog-Key" type="string">
  PostHog project key.
</ResponseField>

<ResponseField name="Planck-Posthog-Host" type="string">
  PostHog host.
</ResponseField>

<ResponseField name="Planck-Lytix-Key" type="string">
  Lytix integration key.
</ResponseField>

<ResponseField name="Planck-Lytix-Host" type="string">
  Lytix host.
</ResponseField>

<ResponseField name="Planck-Webhook-Enabled" type="boolean">
  Enables configured webhook side effects for the request.
</ResponseField>

## Experiments

<ResponseField name="Planck-Experiment-Id" type="string">
  Experiment identifier.
</ResponseField>

<ResponseField name="Planck-Experiment-Column-Id" type="string">
  Experiment column identifier.
</ResponseField>

<ResponseField name="Planck-Experiment-Row-Index" type="string">
  Experiment row index.
</ResponseField>

## Manual Access

<ResponseField name="Planck-Manual-Access-Key" type="string">
  Manual access key for approved manual logging or access workflows.
</ResponseField>

## Response Headers

| Header                       | Description                                      |
| ---------------------------- | ------------------------------------------------ |
| `Planck-Id`                  | Request id used by Planck.                       |
| `Planck-Status`              | `success` or `failed` for the gateway response.  |
| `Planck-Cache`               | Cache status, such as `HIT` or `MISS`.           |
| `Planck-Cache-Bucket-Idx`    | Cache bucket index used for the response.        |
| `Planck-Fallback-Index`      | Fallback index used for the response.            |
| `Planck-RateLimit-Limit`     | Active rate-limit quota.                         |
| `Planck-RateLimit-Remaining` | Remaining quota in the active rate-limit window. |
| `Planck-RateLimit-Policy`    | Active rate-limit policy.                        |
| `Planck-RateLimit-Reset`     | Seconds until the active rate limit resets.      |
| `X-Planck-Error`             | Machine-readable gateway error classification.   |

Legacy `Bifrost-*` response names are emitted alongside these headers during
the compatibility period.

## Webhook Delivery Headers

| Header                    | Description                                    |
| ------------------------- | ---------------------------------------------- |
| `Planck-Signature`        | HMAC signature for the webhook body.           |
| `Planck-Delivery-Id`      | Stable identifier for a webhook delivery.      |
| `Planck-Delivery-Attempt` | One-based delivery attempt number as a string. |

Legacy `Bifrost-*` webhook names are emitted alongside these headers during
the compatibility period.
