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
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
import { DEFAULT_PRICING } from "./pricing/default-pricing";
export { DEFAULT_PRICING } from "./pricing/default-pricing";
// Default pricing rates for AI models
// All rates are in dollars per million tokens ($/1M tokens)
// Based on user-provided pricing for Antigravity models and industry standards for others
// Shared pricing constants to reduce duplication
type ProviderPricingTable = Record<string, Record<string, unknown>>;
/**
* Get pricing for a specific provider and model
* @param {string} provider - Provider ID (e.g., "openai", "cc", "antigravity")
* @param {string} model - Model ID
* @returns {object|null} Pricing object or null if not found
*/
export function getPricingForModel(
provider: string,
model: string
): Record<string, unknown> | null {
if (!provider || !model) return null;
const providerPricing = (DEFAULT_PRICING as ProviderPricingTable)[provider];
if (!providerPricing) return null;
const modelPricing = providerPricing[model];
if (!modelPricing || typeof modelPricing !== "object") return null;
return modelPricing as Record<string, unknown>;
}
/**
* Get all pricing data
* @returns {object} All default pricing
*/
export function getDefaultPricing() {
return DEFAULT_PRICING;
}
export { formatCost } from "../utils/formatting";