# Provider compatibility reference

Last validated Jul 20, 2026

\[Missing snippet: aperture\_release\_note.mdx]

Aperture routes LLM requests to multiple providers, each with different base URLs, authentication methods, and API formats. This reference lists the supported providers, their compatibility flags, authorization types, and pricing options.

When you route requests to a provider, you direct Aperture to send request content to that third-party provider. The provider's handling of that content is governed by your agreement with the provider, not your agreement with Tailscale.
This topic is part of the [Aperture reference][kb-aperture-reference] documentation. For field-level configuration details, refer to the [Aperture configuration reference][kb-aperture-configuration]. For step-by-step provider setup, refer to the [set up LLM providers][kb-set-up-providers] guides. To configure coding agents to connect through Aperture, refer to the [set up LLM clients][kb-use-your-tools] guides.

## Provider matrix

The following table summarizes how to configure each supported provider type:

| Provider                                                  | Base URL                                                                     | Authorization      | Compatibility flags               | `cost_basis` | Guide                              |
| --------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------ | --------------------------------- | ------------ | ---------------------------------- |
| [OpenAI][kb-use-openai]                                   | `https://api.openai.com`                                                     | `bearer`           | `openai_chat`, `openai_responses` | `openai`     | [Set up][kb-use-openai]            |
| [Anthropic][kb-use-anthropic]                             | `https://api.anthropic.com`                                                  | `x-api-key`        | `anthropic_messages`              | `anthropic`  | [Set up][kb-use-anthropic]         |
| [Google Gemini][kb-use-google-gemini]                     | `https://generativelanguage.googleapis.com`                                  | `x-goog-api-key`   | `gemini_generate_content`         | `google`     | [Set up][kb-use-google-gemini]     |
| [Vertex AI (Gemini)][kb-use-vertex-ai]                    | `https://aiplatform.googleapis.com`                                          | `bearer`           | `google_generate_content`         | `vertex`     | [Set up][kb-use-vertex-ai]         |
| [Vertex AI (Anthropic)][kb-use-vertex-ai]                 | `https://aiplatform.googleapis.com`                                          | `bearer`           | `google_raw_predict`              | `vertex`     | [Set up][kb-use-vertex-ai]         |
| [Amazon Bedrock][kb-use-amazon-bedrock]                   | `https://bedrock-runtime.<region>.amazonaws.com`                             | `bearer`           | `bedrock_model_invoke`            | `bedrock`    | [Set up][kb-use-amazon-bedrock]    |
| [Microsoft Foundry (OpenAI)][kb-use-microsoft-foundry]    | `https://<resource>.services.ai.azure.com/api/projects/<project>/openai/`    | `bearer`           | `openai_chat`, `openai_responses` | `azure`      | [Set up][kb-use-microsoft-foundry] |
| [Microsoft Foundry (Anthropic)][kb-use-microsoft-foundry] | `https://<resource>.services.ai.azure.com/api/projects/<project>/anthropic/` | `bearer`           | `anthropic_messages`              | `azure`      | [Set up][kb-use-microsoft-foundry] |
| [OpenRouter][kb-use-openrouter]                           | `https://openrouter.ai/api/`                                                 | `bearer`           | `openai_chat` (default)           | `openrouter` | [Set up][kb-use-openrouter]        |
| [Vercel AI Gateway][kb-use-vercel]                        | `https://ai-gateway.vercel.sh`                                               | `bearer`           | `openai_chat`, `openai_responses` | `vercel`     | [Set up][kb-use-vercel]            |
| [Self-hosted][kb-use-self-hosted]                         | Your server URL                                                              | `bearer` (default) | `openai_chat` (default)           | N/A          | [Set up][kb-use-self-hosted]       |

The `baseurl` column shows the API root for each provider. Do not include path segments like `/v1` in `baseurl`. Aperture appends the full incoming request path to `baseurl` to construct the upstream URL, so including `/v1` results in a doubled path (for example, `/v1/v1/chat/completions`). The exceptions are OpenRouter, which uses `https://openrouter.ai/api/` because OpenRouter expects requests at `/api/v1/...`, and Microsoft Foundry, whose `baseurl` includes a project-scoped path ending in `/openai/`. For details on how URL construction works, refer to the [configuration reference][kb-aperture-configuration-url].

## Compatibility flags

The `compatibility` object in a provider configuration specifies which API formats the provider supports. These flags determine which endpoints Aperture exposes for the provider's models.

| Flag                      | Type    | Default | Description                                                          |
| ------------------------- | ------- | ------- | -------------------------------------------------------------------- |
| `openai_chat`             | boolean | `true`  | Supports `/v1/chat/completions`                                      |
| `openai_responses`        | boolean | `false` | Supports `/v1/responses`                                             |
| `anthropic_messages`      | boolean | `false` | Supports `/v1/messages`                                              |
| `gemini_generate_content` | boolean | `false` | Supports the direct Gemini API (`generativelanguage.googleapis.com`) |
| `bedrock_model_invoke`    | boolean | `false` | Supports Amazon Bedrock format                                       |
| `google_generate_content` | boolean | `false` | Supports Vertex AI Gemini format (`aiplatform.googleapis.com`)       |
| `google_raw_predict`      | boolean | `false` | Supports Vertex AI raw predict for Anthropic models                  |
| `bedrock_converse`        | boolean | `false` | Supports Amazon Bedrock Converse API format                          |

Enable the flags that match the API formats your provider supports. For providers that serve models from multiple vendors (such as Vertex AI with both Gemini and Anthropic models), enable multiple flags.

## Additional provider fields

In addition to `baseurl`, `apikey`, `authorization`, `models`, `compatibility`, `cost_basis`, `name`, `add_headers`, and `model_cost_map`, providers support the following optional fields. For complete documentation of all provider fields, refer to the [Aperture configuration reference][kb-aperture-configuration].

| Field         | Type    | Default | Description                                                                                                                                            |
| ------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `description` | string  | `""`    | Human-readable description of the provider.                                                                                                            |
| `preference`  | integer | `0`     | Routing priority. Higher values are preferred when multiple providers serve the same model.                                                            |
| `disabled`    | boolean | `false` | Excludes the provider from routing and the `/v1/models` endpoint. Use this field to temporarily disable a provider without removing its configuration. |

## Authorization types

Different providers require different authorization header formats. Set the `authorization` field on the provider to specify which format to use.

| Value                  | Header format                        | Used by                     |
| ---------------------- | ------------------------------------ | --------------------------- |
| `bearer`               | `Authorization: Bearer <key>`        | OpenAI and most providers   |
| `x-api-key`            | `x-api-key: <key>`                   | Anthropic                   |
| `x-goog-api-key`       | `x-goog-api-key: <key>`              | Google Gemini               |
| `hec`                  | `Authorization: Splunk <key>`        | Splunk HTTP Event Collector |
| `cf-aig-authorization` | `cf-aig-authorization: Bearer <key>` | Cloudflare AI Gateway       |

\[Missing snippet: aperture\_provider\_auth\_note.mdx]

### Credential source (`auth_mode`)

The `authorization` field sets the header style Aperture uses (refer to the [authorization types][ar-authorization-types] table above). The `auth_mode` field sets the *source* of the credential: whether Aperture injects the configured `apikey` or forwards the client's own credential to the upstream. The two fields are independent, and a passthrough provider still uses `authorization` to choose the header style.

| Value          | Behavior                                                                                                                                                                 |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `""` (default) | Inject the configured `apikey` on every request.                                                                                                                         |
| `override`     | Explicit form of the default. Inject the configured `apikey`. Requires a non-empty `apikey`, or the configuration fails to save.                                         |
| `passthrough`  | Forward the client's own `Authorization` or `x-api-key` header to the upstream unchanged. Fall back to the configured `apikey` only when the client sends no credential. |
| `none`         | Strip all upstream credentials, for providers that need none.                                                                                                            |

A `passthrough` provider with no configured `apikey` is passthrough-only: its models appear in `/v1/models` but are hidden from the built-in chat UI, because chat requests originate on the server and carry no client credential. For a full walkthrough, including using subscription-plan OAuth tokens, refer to [set up passthrough mode][kb-use-passthrough-mode].

### Custom headers

Some providers require additional headers beyond the standard `authorization` field. Use `add_headers` on the provider to include custom headers in every request Aperture sends to that provider. Each entry is a string in `"Header-Name: value"` format:

```json
{
  "providers": {
    "example-provider": {
      "baseurl": "https://api.example.com",
      "apikey": "<your-key>",
      "authorization": "bearer",
      "models": ["model-name"],
      "add_headers": [
        "Custom-Header: value"
      ]
    }
  }
}
```

Each string in the array must follow the `"Header-Name: value"` format.

## Cost basis

Aperture estimates the dollar cost of every LLM request. Cost estimates power quotas, hook metadata, and the per-model pricing shown in the Aperture dashboard.

Aperture auto-infers pricing for known providers based on the provider's `compatibility` flags (for example, `anthropic_messages` maps to Anthropic pricing). For providers where auto-inference does not apply, you can set `cost_basis` explicitly on the provider.

| `cost_basis` value | Pricing source                                |
| ------------------ | --------------------------------------------- |
| `anthropic`        | Anthropic API list prices                     |
| `openai`           | OpenAI API list prices                        |
| `google`           | Google Gemini API list prices                 |
| `bedrock`          | AWS Bedrock pricing (US rates, default)       |
| `bedrock-us`       | AWS Bedrock US-region pricing                 |
| `bedrock-eu`       | AWS Bedrock EU-region pricing                 |
| `bedrock-ap`       | AWS Bedrock AP-region pricing (uses US rates) |
| `vertex`           | Google Vertex AI pricing                      |
| `azure`            | Azure OpenAI standard pricing                 |
| `azure-eu`         | Azure OpenAI EU-region pricing                |
| `openrouter`       | OpenRouter pricing                            |
| `vercel`           | Vercel AI Gateway pricing                     |

To disable auto-inference globally, set `auto_cost_basis` to `false` at the top level of the configuration.

```json
{
  "auto_cost_basis": false,
  "providers": {
    "anthropic": {
      "cost_basis": "anthropic"
    }
  }
}
```

When `auto_cost_basis` is `false`, only providers with an explicit `cost_basis` produce cost estimates.

### Model cost map

When a model name does not appear in the pricing database (for example, after adding a new or custom model), you can use `model_cost_map` to map it to a known model for pricing purposes:

```json
{
  "providers": {
    "anthropic": {
      "cost_basis": "anthropic",
      "model_cost_map": [
        {"match": "claude-opus-5-*", "as": "claude-opus-4-8"},
        {"match": "claude-*-preview*", "as": "claude-sonnet-4-6", "adjustment": 1.1}
      ]
    }
  }
}
```

In this example, requests to any `claude-opus-5-*` model are priced like `claude-opus-4-8`, and preview models are priced like `claude-sonnet-4-6` with a 10% markup.

Each entry accepts the following fields:

| Field        | Type   | Default    | Description                                                                                                                                                        |
| ------------ | ------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `match`      | string | (required) | Glob pattern against the model name. Uses Go's `path.Match` syntax, where `*` matches any sequence of non-separator characters and `?` matches a single character. |
| `as`         | string | (required) | Replacement model name for the pricing lookup.                                                                                                                     |
| `adjustment` | float  | `1.0`      | Price multiplier. A value of `1.5` marks up 50%.                                                                                                                   |

Aperture uses the first matching entry.

## Related

The following topics provide additional information about providers and configuration:

* For the complete configuration schema, refer to the [Aperture configuration reference][kb-aperture-configuration].
* For step-by-step provider setup instructions, refer to the [set up LLM providers][kb-set-up-providers] guides.
* For instructions on configuring coding agents to connect through Aperture, refer to the [set up LLM clients][kb-use-your-tools] guides.

[ar-authorization-types]: #authorization-types

[kb-aperture-configuration-url]: /docs/aperture/configuration#how-aperture-builds-upstream-urls

[kb-aperture-configuration]: /docs/aperture/configuration

[kb-aperture-reference]: /docs/aperture/reference

[kb-set-up-providers]: /docs/aperture/set-up-providers

[kb-use-amazon-bedrock]: /docs/aperture/how-to/use-amazon-bedrock

[kb-use-anthropic]: /docs/aperture/how-to/use-anthropic

[kb-use-google-gemini]: /docs/aperture/how-to/use-google-gemini

[kb-use-microsoft-foundry]: /docs/aperture/how-to/use-microsoft-foundry

[kb-use-openai]: /docs/aperture/how-to/use-openai

[kb-use-openrouter]: /docs/aperture/how-to/use-openrouter

[kb-use-passthrough-mode]: /docs/aperture/how-to/use-passthrough-mode

[kb-use-self-hosted]: /docs/aperture/how-to/use-self-hosted

[kb-use-vercel]: /docs/aperture/how-to/use-vercel

[kb-use-vertex-ai]: /docs/aperture/how-to/use-vertex-ai

[kb-use-your-tools]: /docs/aperture/use-your-tools
