{
  "slug": "ai-api-pricing-compare",
  "title": "AI API Pricing Comparison — Every Major Provider (April 2026)",
  "h1": "AI API pricing comparison",
  "shortTitle": "API Pricing Compare",
  "description": "Per-million-token input, output, and cache prices across OpenAI, Anthropic, Google, Mistral, xAI, and Cohere.",
  "url": "https://aieconomyhub.co/ai-api-pricing-compare",
  "apiUrl": "https://aieconomyhub.co/api/page/ai-api-pricing-compare",
  "category": {
    "id": "models",
    "label": "Models & Pricing"
  },
  "kind": "comparison",
  "top": true,
  "lastUpdated": "2026-06-21",
  "faqs": [
    {
      "q": "What is the cheapest AI API in 2026?",
      "a": "Gemini 2.5 Flash at $0.15 input / $0.60 output per million tokens is the cheapest first-tier API. For non-real-time workloads the OpenAI / Anthropic batch APIs cut every published rate in half."
    },
    {
      "q": "Does prompt caching really save 90%?",
      "a": "Yes for the cached portion. Anthropic and OpenAI both price cache reads at roughly 10% of the standard input rate. The catch is the cache write (1×–1.25× normal input) and that only contiguous prefixes hit the cache."
    },
    {
      "q": "How much does GPT-5 cost per 1k tokens?",
      "a": "GPT-5 is $0.005 input / $0.020 output per 1,000 tokens (i.e. $5 / $20 per million). GPT-5 mini is $0.0004 / $0.0016 per 1k tokens."
    },
    {
      "q": "Which provider has the lowest output token cost?",
      "a": "Gemini 2.5 Flash at $0.60 per million output tokens is the lowest first-tier output rate. Output cost matters more than input for most production workloads — verbose responses are the single biggest line item on most LLM bills."
    },
    {
      "q": "What is the cheapest AI model in 2026?",
      "a": "Gemini 2.5 Flash at $0.15 input / $0.60 output per million tokens is the cheapest first-tier model from a major provider as of April 2026. GPT-5 mini ($0.40 / $1.60) and Claude Haiku 4 ($0.80 / $4.00) are competitive on quality."
    },
    {
      "q": "What is the most expensive AI model in 2026?",
      "a": "Claude Opus 4.7 at $15 input / $75 output per million tokens is currently the most expensive flagship model from a major provider. GPT-5 ($5/$20) and o4 ($15/$60) are the next tier down."
    }
  ],
  "howto": null,
  "dataset": {
    "name": "AI API pricing 2026 — every major provider",
    "description": "Per-million-token input, output, and cache prices across OpenAI (GPT-5 / GPT-4o / o4), Anthropic (Claude Opus 4.7 / Sonnet 4.5 / Haiku 4), Google (Gemini 2.5 Pro / Flash), Mistral, xAI, and Cohere.",
    "columnNames": [
      "provider",
      "model",
      "input_per_m_tokens",
      "output_per_m_tokens",
      "cache_read_per_m_tokens",
      "context_window"
    ]
  },
  "relatedTools": [
    {
      "slug": "chatgpt-vs-claude-vs-gemini",
      "title": "ChatGPT vs Claude vs Gemini",
      "url": "https://aieconomyhub.co/chatgpt-vs-claude-vs-gemini",
      "apiUrl": "https://aieconomyhub.co/api/page/chatgpt-vs-claude-vs-gemini"
    },
    {
      "slug": "claude-opus-vs-sonnet-vs-haiku",
      "title": "Opus vs Sonnet vs Haiku",
      "url": "https://aieconomyhub.co/claude-opus-vs-sonnet-vs-haiku",
      "apiUrl": "https://aieconomyhub.co/api/page/claude-opus-vs-sonnet-vs-haiku"
    },
    {
      "slug": "gpt5-vs-o4",
      "title": "GPT-5 vs o4",
      "url": "https://aieconomyhub.co/gpt5-vs-o4",
      "apiUrl": "https://aieconomyhub.co/api/page/gpt5-vs-o4"
    },
    {
      "slug": "which-ai-model",
      "title": "Which AI Model?",
      "url": "https://aieconomyhub.co/which-ai-model",
      "apiUrl": "https://aieconomyhub.co/api/page/which-ai-model"
    },
    {
      "slug": "ai-coding-tool-compare",
      "title": "Coding Tool Compare",
      "url": "https://aieconomyhub.co/ai-coding-tool-compare",
      "apiUrl": "https://aieconomyhub.co/api/page/ai-coding-tool-compare"
    },
    {
      "slug": "llm-vs-llm-tco-2026",
      "title": "LLM TCO 2026",
      "url": "https://aieconomyhub.co/llm-vs-llm-tco-2026",
      "apiUrl": "https://aieconomyhub.co/api/page/llm-vs-llm-tco-2026"
    }
  ],
  "attribution": {
    "canonicalUrl": "https://aieconomyhub.co/ai-api-pricing-compare",
    "requirement": "Free to use. When embedding this data, please link back to the canonical URL above with the link text \"API Pricing Compare\".",
    "license": "CC-BY-4.0 (attribution required)"
  }
}
