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 all 39 models with pricing data, or filter by provider/tier.
Calculate estimated costs for any model. Supports single model or multi-model comparison. Includes batch/streaming mode.
Find the cheapest model for your use case. Filter by budget, quality tier, or use case (coding, chat, classification, etc.).
Get an SVG pricing badge for any model. Embed in READMEs, docs, and blogs. Like shields.io but for AI API costs.
Compare 2+ models side by side with cost calculations. Returns per-request, daily, monthly, and yearly costs with savings summary.
Get personalized model recommendations based on use case, budget, quality, and context requirements.
Query Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
provider | string | Filter by provider slug | ?provider=openai |
tier | string | Filter by pricing tier (Budget, Mid, Premium) | ?tier=budget |
model | string | Get a single model by ID | ?model=openai-gpt5 |
/api/calculate Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
model | string | Model ID (single model) | required |
models | string | Comma-separated model IDs (comparison, max 10) | — |
input_tokens | number | Input tokens per request | 2000 |
output_tokens | number | Output tokens per request | 500 |
requests | number | Requests per day | 1000 |
days | number | Days per month | 30 |
mode | string | standard, streaming (+15% output), or batch (50% off) | standard |
/api/cheapest Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
input_tokens | number | Input tokens per request | 2000 |
output_tokens | number | Output tokens per request | 500 |
requests | number | Requests per day | 1000 |
budget | number | Max monthly budget (USD) | — |
use_case | string | Filter by use case: coding, chat, classification, extraction, reasoning, analysis | — |
quality | string | high (Premium+Mid) or budget (Budget only) | all |
limit | number | Max results (1-10) | 5 |
/api/badge Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
model | string | Model ID (required) | required |
style | string | Badge style: flat (default) or flat-square | flat |
format | string | Response format: SVG image (default), json, md, or url | SVG |
/api/compare Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
models | string | Comma-separated model IDs (required, 2-10) | required |
input_tokens | number | Input tokens per request | 1000 |
output_tokens | number | Output tokens per request | 500 |
requests_per_day | number | Requests per day | 1000 |
/api/recommend Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
use_case | string | Use case: coding, chat, classification, extraction, reasoning, analysis, creative, general, speed, long-context, multimodal, vision, summarization, multilingual | — |
budget | string | Budget tier: low/budget, mid/medium, high/premium | all |
quality | number | Minimum quality score (1-5) | — |
max_cost | number | Max cost per request (USD) | — |
min_context | number | Minimum context window (tokens) | — |
input_tokens | number | Input tokens for cost calculation | 1000 |
output_tokens | number | Output tokens for cost calculation | 500 |
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
[](https://getapipulse.com)
[](https://getapipulse.com)
[](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:
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
| Field | Type | Description |
|---|---|---|
id | string | Unique model identifier (e.g. openai-gpt5) |
name | string | Display name (e.g. "GPT-5") |
provider | string | Provider name (e.g. "OpenAI") |
providerSlug | string | URL-friendly provider ID (e.g. "openai") |
tier | string | Pricing tier: Budget, Mid, or Premium |
input | number | Input token cost per 1M tokens (USD) |
output | number | Output token cost per 1M tokens (USD) |
context | string | Context window size (e.g. "128K", "1M") |
verified | string | When pricing was last verified |
Available Providers
| Slug | Provider | Models |
|---|---|---|
openai | OpenAI | 10 models (GPT-5.5, GPT-5, GPT-4o, GPT-oss, etc.) |
anthropic | Anthropic | 6 models (Claude Opus 4.8, Opus 4.7, Sonnet 4.6, Haiku 4.5, etc.) |
google | 3 models (Gemini 3.1 Pro, 2.5 Pro, 2.0 Flash) | |
deepseek | DeepSeek | 3 models (V4 Pro, V4 Flash, V3) |
mistral | Mistral | 2 models (Large, Small) |
cohere | Cohere | 2 models (Command R+, Command R) |
together | Meta (Together.ai) | 4 models (Llama 4 Scout/Maverick, Llama 3.1 70B/8B) |
moonshot | Moonshot | 1 model (Kimi K2.6) |
xai | xAI | 2 models (Grok 4.3, Grok Build 0.1) |
ai21 | AI21 | 1 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.