Free · No Auth Required

LLM Pricing API

Get current pricing for 39 AI models from 10 providers. Use it in your tools, dashboards, CI/CD pipelines, and cost calculators.

39 Models

GPT-5, Claude 4, Gemini 3, DeepSeek V4, Llama 4, and more

10 Providers

OpenAI, Anthropic, Google, Mistral, Cohere, Meta, DeepSeek, xAI, Moonshot, AI21

Always Free

No API key, no rate limits, no signup required

REST JSON

Simple GET requests, standard JSON responses, CORS enabled

Endpoints

GET /api/pricing

Get all 39 models with pricing data, or filter by provider/tier.

GET /api/calculate

Calculate estimated costs for any model. Supports single model or multi-model comparison. Includes batch/streaming mode.

GET /api/cheapest

Find the cheapest model for your use case. Filter by budget, quality tier, or use case (coding, chat, classification, etc.).

GET /api/badge

Get an SVG pricing badge for any model. Embed in READMEs, docs, and blogs. Like shields.io but for AI API costs.

GET /api/compare

Compare 2+ models side by side with cost calculations. Returns per-request, daily, monthly, and yearly costs with savings summary.

GET /api/recommend

Get personalized model recommendations based on use case, budget, quality, and context requirements.

Query Parameters

ParameterTypeDescriptionExample
providerstringFilter by provider slug?provider=openai
tierstringFilter by pricing tier (Budget, Mid, Premium)?tier=budget
modelstringGet a single model by ID?model=openai-gpt5

/api/calculate Parameters

ParameterTypeDescriptionDefault
modelstringModel ID (single model)required
modelsstringComma-separated model IDs (comparison, max 10)
input_tokensnumberInput tokens per request2000
output_tokensnumberOutput tokens per request500
requestsnumberRequests per day1000
daysnumberDays per month30
modestringstandard, streaming (+15% output), or batch (50% off)standard

/api/cheapest Parameters

ParameterTypeDescriptionDefault
input_tokensnumberInput tokens per request2000
output_tokensnumberOutput tokens per request500
requestsnumberRequests per day1000
budgetnumberMax monthly budget (USD)
use_casestringFilter by use case: coding, chat, classification, extraction, reasoning, analysis
qualitystringhigh (Premium+Mid) or budget (Budget only)all
limitnumberMax results (1-10)5

/api/badge Parameters

ParameterTypeDescriptionDefault
modelstringModel ID (required)required
stylestringBadge style: flat (default) or flat-squareflat
formatstringResponse format: SVG image (default), json, md, or urlSVG

/api/compare Parameters

ParameterTypeDescriptionDefault
modelsstringComma-separated model IDs (required, 2-10)required
input_tokensnumberInput tokens per request1000
output_tokensnumberOutput tokens per request500
requests_per_daynumberRequests per day1000

/api/recommend Parameters

ParameterTypeDescriptionDefault
use_casestringUse case: coding, chat, classification, extraction, reasoning, analysis, creative, general, speed, long-context, multimodal, vision, summarization, multilingual
budgetstringBudget tier: low/budget, mid/medium, high/premiumall
qualitynumberMinimum quality score (1-5)
max_costnumberMax cost per request (USD)
min_contextnumberMinimum context window (tokens)
input_tokensnumberInput tokens for cost calculation1000
output_tokensnumberOutput tokens for cost calculation500

Quick Start

Get all models

// JavaScript const res = await fetch('https://getapipulse.com/api/pricing'); const { models, meta } = await res.json(); console.log(meta.count); // 34 console.log(models[0].name); // "GPT-5.5"

Filter by provider

# cURL curl "https://getapipulse.com/api/pricing?provider=anthropic"

Get a single model

# Python import requests r = requests.get("https://getapipulse.com/api/pricing?model=openai-gpt4o-mini") model = r.json()["model"] print(f"${model['input']}/1M input, ${model['output']}/1M output")

Filter by tier

// Get all budget models const res = await fetch('https://getapipulse.com/api/pricing?tier=budget'); const { models } = await res.json(); // Returns: GPT-4o mini, GPT-oss, Gemini Flash, DeepSeek V4 Flash, etc.

Calculate costs for a model

// Calculate monthly cost for GPT-5 with 10K requests/day const res = await fetch('https://getapipulse.com/api/calculate?model=openai-gpt5&requests=10000'); const data = await res.json(); console.log(data.costs.monthly); // e.g. $4875.00

Compare multiple models

# Python — compare 3 models for your workload import requests r = requests.get("https://getapipulse.com/api/calculate", params={ "models": "openai-gpt5,anthropic-sonnet,deepseek-v4-pro", "requests": 5000, "input_tokens": 3000, "output_tokens": 800 }) for m in r.json()["results"]: print(f"{m['name']}: ${m['costs']['monthly']}/mo")

Find cheapest model for coding

// Find cheapest coding model under $100/mo const res = await fetch('https://getapipulse.com/api/cheapest?use_case=coding&budget=100'); const { recommendations } = await res.json(); console.log(recommendations[0].name); // Cheapest coding model

Compare models side by side

# Compare GPT-5 vs Claude Sonnet vs DeepSeek for your workload curl "https://getapipulse.com/api/compare?models=openai-gpt5,anthropic-sonnet46,deepseek-v4-pro&input_tokens=2000&output_tokens=500&requests_per_day=10000" // Response includes per-request, daily, monthly, yearly costs // and a summary with cheapest model and savings amount

Get model recommendations

// Get top 5 models for coding with high quality const res = await fetch( 'https://getapipulse.com/api/recommend?use_case=coding&budget=low&quality=4' ); const { recommendations } = await res.json(); recommendations.forEach(m => { console.log(`${m.name}: $${m.costPerRequest.toFixed(6)}/req`); });

Embed a pricing widget

Don't want to build your own UI? Drop a live pricing table, badge, or comparison chart into any page with one script tag. Full widget docs →

<!-- Embed a pricing table for any providers --> <div class="apipulse-widget" data-type="table" data-providers="openai,anthropic,google"></div> <script src="https://getapipulse.com/widget.js" async></script> <!-- Or a compact model badge --> <div class="apipulse-widget" data-type="badge" data-model="openai-gpt4o-mini"></div> <!-- Or a side-by-side comparison --> <div class="apipulse-widget" data-type="compare" data-models="openai-gpt5,anthropic-sonnet,google-pro"></div>

Add a pricing badge to your README

Show live model pricing in any GitHub README, docs page, or blog post. Auto-updates when prices change.

## Markdown — add to any README [![GPT-5 Pricing](https://getapipulse.com/api/badge?model=openai-gpt5)](https://getapipulse.com) [![Claude Sonnet](https://getapipulse.com/api/badge?model=anthropic-sonnet)](https://getapipulse.com) [![Gemini Flash](https://getapipulse.com/api/badge?model=google-flash)](https://getapipulse.com) ## HTML — for docs and blogs <a href="https://getapipulse.com"> <img src="https://getapipulse.com/api/badge?model=openai-gpt5" alt="GPT-5 Pricing"> </a> ## Get embed code as JSON curl "https://getapipulse.com/api/badge?model=openai-gpt5&format=json" // Returns: { embed: { markdown, html, rst }, badge_url, pricing }

Live Preview:

GPT-5 Pricing Badge Claude Sonnet Pricing Badge Gemini Flash Pricing Badge DeepSeek V4 Pro Pricing Badge

Response Format

Single model

{ "model": { "id": "openai-gpt4o-mini", "name": "GPT-4o mini", "provider": "OpenAI", "providerSlug": "openai", "tier": "Budget", "input": 0.15, "output": 0.60, "context": "128K", "verified": "May 2026" }, "source": "https://getapipulse.com", "docs": "https://getapipulse.com/pricing-index.html" }

Collection response

{ "models": [ ... ], "meta": { "count": 34, "providers": ["OpenAI", "Anthropic", ...], "tiers": ["Budget", "Mid", "Premium"], "lastUpdated": "2026-06-02", "source": "https://getapipulse.com", "docs": "https://getapipulse.com/pricing-index.html" } }

Model fields

FieldTypeDescription
idstringUnique model identifier (e.g. openai-gpt5)
namestringDisplay name (e.g. "GPT-5")
providerstringProvider name (e.g. "OpenAI")
providerSlugstringURL-friendly provider ID (e.g. "openai")
tierstringPricing tier: Budget, Mid, or Premium
inputnumberInput token cost per 1M tokens (USD)
outputnumberOutput token cost per 1M tokens (USD)
contextstringContext window size (e.g. "128K", "1M")
verifiedstringWhen pricing was last verified

Available Providers

SlugProviderModels
openaiOpenAI10 models (GPT-5.5, GPT-5, GPT-4o, GPT-oss, etc.)
anthropicAnthropic6 models (Claude Opus 4.8, Opus 4.7, Sonnet 4.6, Haiku 4.5, etc.)
googleGoogle3 models (Gemini 3.1 Pro, 2.5 Pro, 2.0 Flash)
deepseekDeepSeek3 models (V4 Pro, V4 Flash, V3)
mistralMistral2 models (Large, Small)
cohereCohere2 models (Command R+, Command R)
togetherMeta (Together.ai)4 models (Llama 4 Scout/Maverick, Llama 3.1 70B/8B)
moonshotMoonshot1 model (Kimi K2.6)
xaixAI2 models (Grok 4.3, Grok Build 0.1)
ai21AI211 model (Jamba 1.5 Large)

Try It Live — Pricing Data

Get raw pricing data for all models.

Try It Live — Cost Calculator

Calculate costs for a model with your exact usage.

Try It Live — Find Cheapest Model

Find the cheapest model for your use case.

Try It Live — Pricing Badge

Generate an SVG pricing badge for your README or docs.

Use Cases

Cost Dashboards

Build internal dashboards that track AI spending across your organization.

CI/CD Cost Checks

Alert your team when a model's price changes before deploying to production.

Budget Calculators

Power your own cost estimation tools with real-time pricing data.

Model Selection

Programmatically pick the cheapest model that meets your quality requirements.

Embeddable Widgets

Don't want to build your own UI? Use our drop-in widgets to add live pricing to your site, blog, or docs with one script tag.

<!-- Pricing table for OpenAI, Anthropic, Google --> <div class="apipulse-widget" data-type="table" data-providers="openai,anthropic,google"></div> <script src="https://getapipulse.com/widget.js" async></script> <!-- Model badge --> <div class="apipulse-widget" data-type="badge" data-model="openai-gpt4o-mini"></div> <!-- Side-by-side comparison --> <div class="apipulse-widget" data-type="compare" data-models="openai-gpt5,anthropic-sonnet,google-pro"></div>

See full widget documentation for all options, themes, and live previews.

Attribution

This API is free to use. We appreciate a link back to getapipulse.com when possible.

Pricing data provided by APIpulse

Related Tools

Cost Calculator

Calculate monthly costs for any model with our interactive calculator.

Model Compare

Compare pricing across models side by side.

Token Estimator

Estimate costs across all 39 models instantly.

Embed Widgets

Pricing tables, badges, and comparisons for your site or README.

Pricing Badges

SVG badges for 39 models with copy-paste Markdown/HTML embed code.

Claude 4 Migration Cheat Sheet

60-second switch guide for Claude 4 deprecation — replacements, code changes, cost comparison.