Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

14.4 KB
Raw Blame
/**
 * Pricing data — oauth-subscriptions family (OAuth / IDE subscription aliases (cc, codex, antigravity, copilot, kiro…)).
 * Pure data; merged by default-pricing.ts via spread (god-file decomposition; semantic split).
 */
import {
  GPT_6_ASTRA_PRICING,
  CLAUDE_FABLE_5_1_PRICING,
  CLAUDE_OPUS_5_5_PRICING,
  CLAUDE_OPUS_5_PRICING,
  CLAUDE_SONNET_5_PRICING,
  GEMINI_3_7_FLASH_PROMO_PRICING,
  GEMINI_3_8_FLASH_PROMO_PRICING,
  GEMINI_4_ARGON_PROMO_PRICING,
  GPT_5_3_CODEX_PRICING,
  GPT_5_5_PRICING,
  GPT_5_6_LUNA_PRICING,
  GPT_5_6_SOL_PRICING,
  GPT_5_6_TERRA_PRICING,
} from "./shared-tiers";

// Both connection ids and the legacy alias must reach the same billing data.
const ANTIGRAVITY_PRICING = {
  "gemini-3.1-pro-low": {
    input: 2.0,
    output: 12.0,
    cached: 0.25,
    reasoning: 18.0,
    cache_creation: 2.0,
  },
  "gemini-pro-agent": {
    input: 4.0,
    output: 18.0,
    cached: 0.5,
    reasoning: 27.0,
    cache_creation: 4.0,
  },
  "gemini-3.7-flash-low": GEMINI_3_7_FLASH_PROMO_PRICING,
  "gemini-3.7-flash-medium": GEMINI_3_7_FLASH_PROMO_PRICING,
  "gemini-3.7-flash-high": GEMINI_3_7_FLASH_PROMO_PRICING,
  "gemini-3.7-flash-tiered": GEMINI_3_7_FLASH_PROMO_PRICING,
  "gemini-3.8-flash": GEMINI_3_8_FLASH_PROMO_PRICING,
  "gemini-3.8-flash-low": GEMINI_3_8_FLASH_PROMO_PRICING,
  "gemini-3.8-flash-medium": GEMINI_3_8_FLASH_PROMO_PRICING,
  "gemini-3.8-flash-high": GEMINI_3_8_FLASH_PROMO_PRICING,
  "gemini-3.8-flash-tiered": GEMINI_3_8_FLASH_PROMO_PRICING,
  "gemini-4-argon": GEMINI_4_ARGON_PROMO_PRICING,
  "gemini-4-argon-low": GEMINI_4_ARGON_PROMO_PRICING,
  "gemini-4-argon-medium": GEMINI_4_ARGON_PROMO_PRICING,
  "gemini-4-argon-high": GEMINI_4_ARGON_PROMO_PRICING,
  "gemini-3.5-flash-lite": {
    input: 0.3,
    output: 2.5,
    cached: 0.03,
    reasoning: 2.5,
    cache_creation: 0.3,
  },
  "gemini-3.1-flash-lite": {
    input: 0.25,
    output: 1.5,
    cached: 0.025,
    reasoning: 1.5,
    cache_creation: 0.25,
  },
  "gemini-3-flash": {
    input: 0.5,
    output: 3.0,
    cached: 0.05,
    reasoning: 3.0,
    cache_creation: 0.5,
  },
  "claude-sonnet-4-6": {
    input: 3.0,
    output: 15.0,
    cached: 0.3,
    reasoning: 22.5,
    cache_creation: 3.0,
  },
  "claude-opus-4-6-thinking": {
    input: 5.0,
    output: 25.0,
    cached: 0.5,
    reasoning: 37.5,
    cache_creation: 5.0,
  },
  "claude-opus-5-5-low": CLAUDE_OPUS_5_5_PRICING,
  "claude-opus-5-5-medium": CLAUDE_OPUS_5_5_PRICING,
  "claude-opus-5-5-high": CLAUDE_OPUS_5_5_PRICING,
  "claude-sonnet-5-5-low": CLAUDE_SONNET_5_PRICING,
  "claude-sonnet-5-5-medium": CLAUDE_SONNET_5_PRICING,
  "claude-sonnet-5-5-high": CLAUDE_SONNET_5_PRICING,
  "gpt-oss-120b-medium": {
    input: 0.5,
    output: 2.0,
    cached: 0.25,
    reasoning: 3.0,
    cache_creation: 0.5,
  },
};

// Codex Standard: 250 / 25 / 1250 credits per MTok, at 25 credits per USD.
// https://developers.openai.com/codex/pricing
const GPT_6_ASTRA_CODEX_PRICING = GPT_6_ASTRA_PRICING;
// Codex Standard: Sol 50 / 5 / 250 and Luna 2.5 / 0.25 / 12.5 credits per MTok.
const GPT_6_SOL_CODEX_PRICING = {
  input: 2.0,
  output: 10.0,
  cached: 0.2,
  reasoning: 10.0,
  cache_creation: 2.5,
};
// GPT-6.1 Sol Standard: 50 / 2.5 / 250 credits per MTok (input / cached / output).
// Keep GPT-6 Sol's 5-credit cached rate separate. Dollar equivalents below use
// this table's existing 25 credits/USD convention, not included-plan usage.
// https://learn.chatgpt.com/docs/pricing#token-rates (checked 2026-10-07)
const GPT_6_1_SOL_CODEX_PRICING = {
  ...GPT_6_SOL_CODEX_PRICING,
  cached: 0.1,
};
const GPT_6_LUNA_CODEX_PRICING = {
  input: 0.1,
  output: 0.5,
  cached: 0.01,
  reasoning: 0.5,
  cache_creation: 0.125,
};

export const DEFAULT_PRICING_OAUTH = {
  cc: {
    "claude-fable-5-1": CLAUDE_FABLE_5_1_PRICING,
    "claude-fable-5": {
      input: 10.0,
      output: 50.0,
      cached: 1.0,
      reasoning: 50.0,
      cache_creation: 12.5,
    },
    "claude-opus-5-5": CLAUDE_OPUS_5_5_PRICING,
    "claude-opus-5": CLAUDE_OPUS_5_PRICING,
    "claude-opus-4-8": {
      input: 5.0,
      output: 25.0,
      cached: 0.5,
      reasoning: 25.0,
      cache_creation: 6.25,
    },
    "claude-opus-4-7": {
      input: 5.0,
      output: 25.0,
      cached: 0.5,
      reasoning: 25.0,
      cache_creation: 6.25,
    },
    "claude-opus-4-6": {
      input: 5.0,
      output: 25.0,
      cached: 0.5,
      reasoning: 25.0,
      cache_creation: 6.25,
    },
    "claude-sonnet-4-6": {
      input: 3.0,
      output: 15.0,
      cached: 0.3,
      reasoning: 15.0,
      cache_creation: 3.75,
    },
    "claude-sonnet-5": {
      input: 3.0,
      output: 15.0,
      cached: 0.3,
      reasoning: 15.0,
      cache_creation: 3.75,
    },
    "claude-opus-4-5-20251101": {
      input: 5.0,
      output: 25.0,
      cached: 0.5,
      reasoning: 25.0,
      cache_creation: 6.25,
    },
    "claude-sonnet-4-5-20250929": {
      input: 3.0,
      output: 15.0,
      cached: 0.3,
      reasoning: 15.0,
      cache_creation: 3.75,
    },
    "claude-haiku-4-5-20251001": {
      input: 1.0,
      output: 5.0,
      cached: 0.1,
      reasoning: 5.0,
      cache_creation: 1.25,
    },
  },
  cx: {
    "gpt-6-astra": GPT_6_ASTRA_CODEX_PRICING,
    "gpt-6-astra-ultra": GPT_6_ASTRA_CODEX_PRICING,
    "gpt-6-astra-max": GPT_6_ASTRA_CODEX_PRICING,
    "gpt-6-astra-xhigh": GPT_6_ASTRA_CODEX_PRICING,
    "gpt-6-astra-high": GPT_6_ASTRA_CODEX_PRICING,
    "gpt-6-astra-medium": GPT_6_ASTRA_CODEX_PRICING,
    "gpt-6-astra-low": GPT_6_ASTRA_CODEX_PRICING,
    "gpt-6-sol": GPT_6_SOL_CODEX_PRICING,
    "gpt-6-sol-ultra": GPT_6_SOL_CODEX_PRICING,
    "gpt-6-sol-max": GPT_6_SOL_CODEX_PRICING,
    "gpt-6-sol-xhigh": GPT_6_SOL_CODEX_PRICING,
    "gpt-6-sol-high": GPT_6_SOL_CODEX_PRICING,
    "gpt-6-sol-medium": GPT_6_SOL_CODEX_PRICING,
    "gpt-6-sol-low": GPT_6_SOL_CODEX_PRICING,
    "gpt-6.1-sol": GPT_6_1_SOL_CODEX_PRICING,
    "gpt-6.1-sol-ultra": GPT_6_1_SOL_CODEX_PRICING,
    "gpt-6.1-sol-max": GPT_6_1_SOL_CODEX_PRICING,
    "gpt-6.1-sol-xhigh": GPT_6_1_SOL_CODEX_PRICING,
    "gpt-6.1-sol-high": GPT_6_1_SOL_CODEX_PRICING,
    "gpt-6.1-sol-medium": GPT_6_1_SOL_CODEX_PRICING,
    "gpt-6.1-sol-low": GPT_6_1_SOL_CODEX_PRICING,
    "gpt-6-luna": GPT_6_LUNA_CODEX_PRICING,
    "gpt-6-luna-max": GPT_6_LUNA_CODEX_PRICING,
    "gpt-6-luna-xhigh": GPT_6_LUNA_CODEX_PRICING,
    "gpt-6-luna-high": GPT_6_LUNA_CODEX_PRICING,
    "gpt-6-luna-medium": GPT_6_LUNA_CODEX_PRICING,
    "gpt-6-luna-low": GPT_6_LUNA_CODEX_PRICING,
    "codex-auto-review": GPT_5_5_PRICING,
    // Codex uses credits per 1M tokens. OmniRoute stores the dollar-equivalent
    // values below at the documented conversion of 25 credits per USD.
    "gpt-5.6-sol": GPT_5_6_SOL_PRICING,
    "gpt-5.6-sol-ultra": GPT_5_6_SOL_PRICING,
    "gpt-5.6-sol-max": GPT_5_6_SOL_PRICING,
    "gpt-5.6-sol-xhigh": GPT_5_6_SOL_PRICING,
    "gpt-5.6-sol-high": GPT_5_6_SOL_PRICING,
    "gpt-5.6-sol-medium": GPT_5_6_SOL_PRICING,
    "gpt-5.6-sol-low": GPT_5_6_SOL_PRICING,
    "gpt-5.6-terra": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-terra-ultra": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-terra-max": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-terra-xhigh": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-terra-high": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-terra-medium": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-terra-low": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-luna": GPT_5_6_LUNA_PRICING,
    "gpt-5.6-luna-max": GPT_5_6_LUNA_PRICING,
    "gpt-5.6-luna-xhigh": GPT_5_6_LUNA_PRICING,
    "gpt-5.6-luna-high": GPT_5_6_LUNA_PRICING,
    "gpt-5.6-luna-medium": GPT_5_6_LUNA_PRICING,
    "gpt-5.6-luna-low": GPT_5_6_LUNA_PRICING,
    // GPT 5.5
    "gpt-5.5": GPT_5_5_PRICING,
    "gpt5.5": GPT_5_5_PRICING,
    "gpt-5.5-xhigh": GPT_5_5_PRICING,
    "gpt-5.5-high": GPT_5_5_PRICING,
    "gpt-5.5-medium": GPT_5_5_PRICING,
    "gpt-5.5-low": GPT_5_5_PRICING,
    "gpt-5.5-none": GPT_5_5_PRICING,
    // GPT 5.3 Codex family (all same pricing tier)
    "gpt-5.3-codex-spark": GPT_5_3_CODEX_PRICING,
    "gpt-5.3-codex": GPT_5_3_CODEX_PRICING,
    "gpt-5.3-codex-xhigh": GPT_5_3_CODEX_PRICING,
    "gpt-5.3-codex-high": GPT_5_3_CODEX_PRICING,
    "gpt-5.3-codex-low": GPT_5_3_CODEX_PRICING,
    "gpt-5.3-codex-none": GPT_5_3_CODEX_PRICING,
    "gpt-5.1-codex-mini-high": {
      input: 1.5,
      output: 6.0,
      cached: 0.75,
      reasoning: 9.0,
      cache_creation: 1.5,
    },
    "gpt-5.2-codex": {
      input: 5.0,
      output: 20.0,
      cached: 2.5,
      reasoning: 30.0,
      cache_creation: 5.0,
    },

    "gpt-5.2": {
      input: 5.0,
      output: 20.0,
      cached: 2.5,
      reasoning: 30.0,
      cache_creation: 5.0,
    },
    "gpt-5.1-codex-max": {
      input: 8.0,
      output: 32.0,
      cached: 4.0,
      reasoning: 48.0,
      cache_creation: 8.0,
    },
    "gpt-5.1-codex": {
      input: 4.0,
      output: 16.0,
      cached: 2.0,
      reasoning: 24.0,
      cache_creation: 4.0,
    },
    "gpt-5.1-codex-mini": {
      input: 1.5,
      output: 6.0,
      cached: 0.75,
      reasoning: 9.0,
      cache_creation: 1.5,
    },
    "gpt-5.1": {
      input: 4.0,
      output: 16.0,
      cached: 2.0,
      reasoning: 24.0,
      cache_creation: 4.0,
    },
    "gpt-5-codex": {
      input: 3.0,
      output: 12.0,
      cached: 1.5,
      reasoning: 18.0,
      cache_creation: 3.0,
    },
    "gpt-5-codex-mini": {
      input: 1.0,
      output: 4.0,
      cached: 0.5,
      reasoning: 6.0,
      cache_creation: 1.0,
    },
  },
  if: {
    "qwen3-coder-plus": {
      input: 1.0,
      output: 4.0,
      cached: 0.5,
      reasoning: 6.0,
      cache_creation: 1.0,
    },
    "kimi-k2": {
      input: 1.0,
      output: 4.0,
      cached: 0.5,
      reasoning: 6.0,
      cache_creation: 1.0,
    },
    "kimi-k2-thinking": {
      input: 1.5,
      output: 6.0,
      cached: 0.75,
      reasoning: 9.0,
      cache_creation: 1.5,
    },
    "deepseek-r1": {
      input: 0.75,
      output: 3.0,
      cached: 0.375,
      reasoning: 4.5,
      cache_creation: 0.75,
    },
    "deepseek-v3.2-chat": {
      input: 0.28,
      output: 0.42,
      cached: 0.014,
      reasoning: 0.63,
      cache_creation: 0.28,
    },
    "deepseek-v3.2": {
      input: 0.28,
      output: 0.42,
      cached: 0.014,
      reasoning: 0.63,
      cache_creation: 0.28,
    },
    "deepseek-v3.2-reasoner": {
      input: 0.55,
      output: 2.19,
      cached: 0.14,
      reasoning: 2.19,
      cache_creation: 0.55,
    },
    // Short-form aliases (Mar 2026)
    "deepseek-3.1": {
      input: 0.27,
      output: 1.1,
      cached: 0.07,
      reasoning: 2.2,
      cache_creation: 0.27,
    },
    "deepseek-3.2": {
      input: 0.27,
      output: 1.1,
      cached: 0.07,
      reasoning: 2.2,
      cache_creation: 0.27,
    },
    "minimax-m2": {
      input: 0.5,
      output: 2.0,
      cached: 0.25,
      reasoning: 3.0,
      cache_creation: 0.5,
    },
    "glm-4.6": {
      input: 0.5,
      output: 2.0,
      cached: 0.25,
      reasoning: 3.0,
      cache_creation: 0.5,
    },
    "glm-4.7": {
      input: 0.75,
      output: 3.0,
      cached: 0.375,
      reasoning: 4.5,
      cache_creation: 0.75,
    },
  },
  ag: ANTIGRAVITY_PRICING,
  antigravity: ANTIGRAVITY_PRICING,
  agy: ANTIGRAVITY_PRICING,
  gh: {
    "claude-opus-5": CLAUDE_OPUS_5_PRICING,
    "gpt-5": {
      input: 3.0,
      output: 12.0,
      cached: 1.5,
      reasoning: 18.0,
      cache_creation: 3.0,
    },
    "gpt-5-mini": {
      input: 0.75,
      output: 3.0,
      cached: 0.375,
      reasoning: 4.5,
      cache_creation: 0.75,
    },
    "gpt-5.1-codex": {
      input: 4.0,
      output: 16.0,
      cached: 2.0,
      reasoning: 24.0,
      cache_creation: 4.0,
    },
    "gpt-5.1-codex-max": {
      input: 8.0,
      output: 32.0,
      cached: 4.0,
      reasoning: 48.0,
      cache_creation: 8.0,
    },
    "gpt-4.1": {
      input: 2.5,
      output: 10.0,
      cached: 1.25,
      reasoning: 15.0,
      cache_creation: 2.5,
    },
    "claude-4.5-sonnet": {
      input: 3.0,
      output: 15.0,
      cached: 0.3,
      reasoning: 22.5,
      cache_creation: 3.0,
    },
    "claude-4.5-opus": {
      input: 5.0,
      output: 25.0,
      cached: 0.5,
      reasoning: 37.5,
      cache_creation: 5.0,
    },
    "claude-4.5-haiku": {
      input: 0.5,
      output: 2.5,
      cached: 0.05,
      reasoning: 3.75,
      cache_creation: 0.5,
    },
    "gemini-3-pro": {
      input: 2.0,
      output: 12.0,
      cached: 0.25,
      reasoning: 18.0,
      cache_creation: 2.0,
    },
    "gemini-3-flash": {
      input: 0.5,
      output: 3.0,
      cached: 0.03,
      reasoning: 4.5,
      cache_creation: 0.5,
    },
    "gemini-3.7-flash": GEMINI_3_7_FLASH_PROMO_PRICING,
    "gemini-2.5-pro": {
      input: 2.0,
      output: 12.0,
      cached: 0.25,
      reasoning: 18.0,
      cache_creation: 2.0,
    },
    "grok-code-fast-1": {
      input: 0.5,
      output: 2.0,
      cached: 0.25,
      reasoning: 3.0,
      cache_creation: 0.5,
    },
  },
  kiro: {
    "claude-sonnet-4.5": {
      input: 3.0,
      output: 15.0,
      cached: 1.5,
      reasoning: 15.0,
      cache_creation: 3.0,
    },
    "claude-haiku-4.5": {
      input: 0.5,
      output: 2.5,
      cached: 0.25,
      reasoning: 2.5,
      cache_creation: 0.5,
    },
    "claude-sonnet-5": {
      input: 3.0,
      output: 15.0,
      cached: 1.5,
      reasoning: 15.0,
      cache_creation: 3.0,
    },
    "deepseek-v3.2": {
      input: 0.27,
      output: 1.1,
      cached: 0.07,
      reasoning: 1.1,
      cache_creation: 0.27,
    },
    // Registry exposes this model as "deepseek-3.2" (no "v") — keep both keys priced.
    "deepseek-3.2": {
      input: 0.27,
      output: 1.1,
      cached: 0.07,
      reasoning: 1.1,
      cache_creation: 0.27,
    },
    "minimax-m2.1": {
      input: 0.4,
      output: 1.6,
      cached: 0.1,
      reasoning: 1.6,
      cache_creation: 0.4,
    },
    // MiniMax M2.5 — cheaper than M2.1, reasoning + tools
    "minimax-m2.5": {
      input: 0.27,
      output: 0.95,
      cached: 0.135,
      reasoning: 1.425,
      cache_creation: 0.27,
    },
    "glm-5": {
      input: 1.0,
      output: 3.2,
      cached: 0.2,
      reasoning: 4.8,
      cache_creation: 1.0,
    },
    "qwen3-coder-next": {
      input: 2.0,
      output: 8.0,
      cached: 0.5,
      reasoning: 8.0,
      cache_creation: 2.0,
    },
    // Kiro's GPT-5.6 family (kiro.dev/changelog/models, 2026-07-14) — same
    // per-tier rates the codex/openai aliases already bill at.
    "gpt-5.6-sol": GPT_5_6_SOL_PRICING,
    "gpt-5.6-terra": GPT_5_6_TERRA_PRICING,
    "gpt-5.6-luna": GPT_5_6_LUNA_PRICING,
  },
};