Supported models and providers
Last validated:
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:
| Provider | Base URL | Authorization | Compatibility flags | cost_basis |
|---|---|---|---|---|
| OpenAI | https://api.openai.com/ | bearer | openai_chat, openai_responses | openai |
| Anthropic | https://api.anthropic.com | x-api-key | anthropic_messages | anthropic |
| Google Gemini | https://generativelanguage.googleapis.com | x-goog-api-key | gemini_generate_content | google |
| Vertex AI (Gemini) | https://aiplatform.googleapis.com | bearer | google_generate_content | vertex |
| Vertex AI (Anthropic) | https://aiplatform.googleapis.com | bearer | google_raw_predict | vertex |
| Vertex AI Express | https://aiplatform.googleapis.com | x-goog-api-key | google_generate_content | vertex |
| Amazon Bedrock | https://bedrock-runtime.<region>.amazonaws.com | bearer | bedrock_model_invoke | bedrock |
| OpenRouter | https://openrouter.ai/api/ | bearer | openai_chat (default) | openrouter |
| Self-hosted | Your server URL | bearer (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.
| 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 Gemini API format |
bedrock_model_invoke | boolean | false | Supports Amazon Bedrock format |
google_generate_content | boolean | false | Supports Vertex AI Gemini format |
google_raw_predict | boolean | false | Supports Vertex AI raw predict for Anthropic models |
bedrock_converse | boolean | false | Supports Amazon Bedrock Converse API format |
experimental_gemini_cli_vertex_compat | boolean | false | Gemini 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.
| 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, 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:
anthropicopenaigooglebedrockbedrock-usbedrock-euvertexazureazure-euopenroutervercel
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 (usespath.Matchsyntax).as: Replacement model name for the pricing lookup.adjustment: Price multiplier (optional, default1.0). Use1.5to 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.