Supported models and providers

Last validated:

Aperture by Tailscale is currently in alpha.

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

This page is part of the Aperture reference documentation. For field-level configuration details, refer to the Aperture configuration reference. For step-by-step provider setup, refer to the Set up LLM providers guides. To configure coding agents to connect through Aperture, refer to the Set up LLM clients guides.

Provider matrix

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

ProviderBase URLAuthorizationCompatibility flagscost_basis
OpenAIhttps://api.openai.com/beareropenai_chat, openai_responsesopenai
Anthropichttps://api.anthropic.comx-api-keyanthropic_messagesanthropic
Google Geminihttps://generativelanguage.googleapis.comx-goog-api-keygemini_generate_contentgoogle
Vertex AI (Gemini)https://aiplatform.googleapis.combearergoogle_generate_contentvertex
Vertex AI (Anthropic)https://aiplatform.googleapis.combearergoogle_raw_predictvertex
Vertex AI Expresshttps://aiplatform.googleapis.comx-goog-api-keygoogle_generate_contentvertex
Amazon Bedrockhttps://bedrock-runtime.<region>.amazonaws.combearerbedrock_model_invokebedrock
OpenRouterhttps://openrouter.ai/api/beareropenai_chat (default)openrouter
Self-hostedYour server URLbearer (default)openai_chat (default)N/A

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.

FlagTypeDefaultDescription
openai_chatbooleantrueSupports /v1/chat/completions
openai_responsesbooleanfalseSupports /v1/responses
anthropic_messagesbooleanfalseSupports /v1/messages
gemini_generate_contentbooleanfalseSupports Gemini API format
bedrock_model_invokebooleanfalseSupports Amazon Bedrock format
google_generate_contentbooleanfalseSupports Vertex AI Gemini format
google_raw_predictbooleanfalseSupports Vertex AI raw predict for Anthropic models
bedrock_conversebooleanfalseSupports Amazon Bedrock Converse API format
experimental_gemini_cli_vertex_compatbooleanfalseGemini CLI short-form Vertex path rewriting

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.

Authorization types

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

ValueHeader formatUsed by
bearerAuthorization: Bearer <key>OpenAI and most providers
x-api-keyx-api-key: <key>Anthropic
x-goog-api-keyx-goog-api-key: <key>Google Gemini, Vertex AI Express

The authorization field is not required for all providers. For example, Vertex AI uses a service account key file instead of an API key (prefixed with keyfile::). Refer to set up a Vertex AI provider for step-by-step configuration instructions. Vertex AI Express uses x-goog-api-key with a standard API key. Refer to set up a Vertex AI Express provider for details.

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.

The following cost_basis values are supported:

  • anthropic
  • openai
  • google
  • bedrock
  • bedrock-us
  • bedrock-eu
  • vertex
  • azure
  • azure-eu
  • openrouter
  • vercel

To disable auto-inference globally, set auto_cost_basis to false at the top level of the configuration. When disabled, 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:

"anthropic": {
  "cost_basis": "anthropic",
  "model_cost_map": [
    // claude-opus-9-0 isn't in the pricing DB yet;
    // price it like claude-opus-4-6
    {"match": "claude-opus-9-*", "as": "claude-opus-4-6"},

    // Preview models priced like sonnet
    {"match": "claude-*-preview*", "as": "claude-sonnet-4-5",
     "adjustment": 1.1},
  ],
}

Each entry supports the following fields:

  • match: Glob pattern against the model name (uses path.Match syntax).
  • as: Replacement model name for the pricing lookup.
  • adjustment: Price multiplier (optional, default 1.0). Use 1.5 to mark up 50%.

Aperture uses the first matching entry.

Provider examples

The following examples show how to configure common providers.

OpenAI

Configure OpenAI with the chat and responses APIs:

{
  "providers": {
    "openai": {
      "baseurl": "https://api.openai.com/",
      "apikey": "YOUR_OPENAI_KEY",
      "models": ["gpt-5", "gpt-5-mini", "gpt-4.1"],
      "name": "OpenAI",
      "description": "OpenAI models",
      "compatibility": {
        "openai_chat": true,
        "openai_responses": true
      }
    }
  }
}

Anthropic

Configure Anthropic with the messages API and x-api-key authorization:

{
  "providers": {
    "anthropic": {
      "baseurl": "https://api.anthropic.com",
      "apikey": "YOUR_ANTHROPIC_KEY",
      "authorization": "x-api-key",
      "models": ["claude-sonnet-4-5", "claude-haiku-4-5", "claude-opus-4-5"],
      "compatibility": {
        "openai_chat": false,
        "anthropic_messages": true
      }
    }
  }
}

Google Gemini

Configure Google Gemini with the Gemini API and x-goog-api-key authorization:

{
  "providers": {
    "gemini": {
      "baseurl": "https://generativelanguage.googleapis.com",
      "apikey": "YOUR_GEMINI_KEY",
      "authorization": "x-goog-api-key",
      "models": ["gemini-2.5-flash", "gemini-2.5-pro"],
      "name": "Google Gemini",
      "compatibility": {
        "openai_chat": false,
        "gemini_generate_content": true
      }
    }
  }
}

Vertex AI

Configure Google Vertex AI with support for both Gemini models and Anthropic models with raw predict:

{
  "providers": {
    "vertex": {
      "baseurl": "https://aiplatform.googleapis.com",
      "authorization": "bearer",
      "apikey": "keyfile::ba3..3kb.data...67",
      "models": [
        "gemini-2.0-flash-exp",
        "gemini-2.5-flash",
        "gemini-2.5-flash-image",
        "gemini-2.5-pro",
        "claude-opus-4-5@20251101",
        "claude-haiku-4-5@20251001",
        "claude-sonnet-4-5@20250929",
        "claude-opus-4-6"
      ],
      "compatibility": {
        // Gemini model support
        "google_generate_content": true,
        // Anthropic via Vertex model support
        "google_raw_predict": true
      }
    }
  }
}

For step-by-step setup including GCP service account creation and key file generation, refer to set up a Vertex AI provider. For a simpler setup using API key authentication (Gemini models only), refer to set up a Vertex AI Express provider.

Amazon Bedrock

Configure Amazon Bedrock with the Bedrock model invocation API:

{
  "providers": {
    "bedrock": {
      "baseurl": "https://bedrock-runtime.us-east-1.amazonaws.com",
      "apikey": "bedrock-api-key-xxx",
      "authorization": "bearer",
      "models": [
        "us.anthropic.claude-haiku-4-5-20251001-v1:0",
        "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
        "us.anthropic.claude-opus-4-5-20251101-v1:0",
        "us.anthropic.claude-opus-4-6-v1"
      ],
      "compatibility": {
        "bedrock_model_invoke": true
      }
    }
  }
}

OpenRouter

Configure OpenRouter as a multi-provider aggregator:

{
  "providers": {
    "openrouter": {
      "baseurl": "https://openrouter.ai/api/",
      "apikey": "YOUR_OPENROUTER_KEY",
      "models": [
        "qwen/qwen3-235b-a22b-2507",
        "google/gemini-2.5-pro-preview",
        "x-ai/grok-code-fast-1"
      ]
    }
  }
}

Self-hosted

Configure a self-hosted LLM server accessible from the tailnet:

{
  "providers": {
    "private": {
      "baseurl": "YOUR_PRIVATE_LLM_URL",
      "models": ["qwen3-coder-30b", "llama-3.1-70b"]
    }
  }
}

Self-hosted providers use openai_chat compatibility by default. If your server exposes a different API format, set the appropriate compatibility flags.