Free Public API · No auth · MIT

AI model pricing data,
free for everyone

A community-friendly JSON API exposing the same pricing data that powers the calculator. LiteLLM-verified, monthly-refreshed, CDN-cached. Build cost estimators, comparison tools, internal dashboards — no signup required.

30-second start

Just fetch it.

No API key, no rate limits for normal use, no signup. Hit any endpoint with a GET request.

# Get all models
curl https://aicostcalc.net/api/v1/models

# Get a single model
curl https://aicostcalc.net/api/v1/models/gpt-5-5

# Get just pricing (lighter payload)
curl https://aicostcalc.net/api/v1/pricing?provider=anthropic

All responses are JSON, all CORS-enabled, all aggressively CDN-cached (1 hour browser, 24 hour edge).

Endpoints

Three endpoints. Zero ceremony.

GET/api/v1/models

List all 10 supported AI models with full data (pricing, limits, capabilities, lifecycle). Supports filter query params.

Example:
GET /api/v1/models
GET /api/v1/models?provider=anthropic
GET /api/v1/models?category=flagship
GET /api/v1/models?capability=caching
GET /api/v1/models?status=active
Filters: provider / category / capability / status. Filters compose with AND.
GET/api/v1/models/{id}

Full data for a single model. Returns 404 with availableIds list if id is unknown.

Example:
GET /api/v1/models/gpt-5-5
GET /api/v1/models/claude-opus-4-7
GET /api/v1/models/deepseek-v3-2
GET/api/v1/pricing

Lightweight pricing-only response. Skip the metadata, keep just the prices. Same filter support as /models.

Example:
GET /api/v1/pricing
GET /api/v1/pricing?provider=openai
Schema

What you get back

Full schema reference is in our TypeScript types file. The shape of a model entry:

{
  "id": "gpt-5-5",
  "name": "GPT-5.5",
  "shortName": "GPT-5.5",
  "provider": "OpenAI",
  "providerId": "openai",
  "category": "flagship",          // flagship | small | reasoning | balanced
  "useCase": ["general", "vision", "reasoning", "coding"],
  "releaseDate": "2026-04-23",
  "status": "active",              // active | deprecated | preview | legacy
  "deprecatedAt": null,
  "successorId": null,

  "pricing": {
    "currency": "USD",
    "unit": "per_1m_tokens",
    "input": 5.00,
    "output": 30.00,
    "cachedInput": 0.50,           // null if not supported
    "cacheWrite": null,            // null if not supported
    "batchInput": 2.50,            // null if not supported
    "batchOutput": 15.00,
    "imagePerImage": null,         // null until image pricing added (V1.1)
    "reasoningOutput": null,
    "fineTunedInput": null,
    "fineTunedOutput": null
  },

  "limits": {
    "contextWindow": 1050000,
    "maxOutput": 128000,
    "maxImagesPerRequest": null,
    "knowledgeCutoff": "2026-02"
  },

  "tokenization": {
    "encoder": "o200k_base",       // tiktoken encoder, or "approximate"
    "approximationRatio": { "english": 4, "chinese": 1.5, "code": 3 }
  },

  "supports": {
    "vision": true, "audio": false, "tools": true, "streaming": true,
    "caching": true, "batch": true, "fineTuning": false, "structuredOutput": true
  },

  "lastVerified": "2026-05-12",
  "sources": [
    { "type": "community", "url": "...", "fetchedAt": "..." },
    { "type": "official",  "url": "...", "fetchedAt": "..." }
  ],
  "priceHistory": [
    { "date": "2026-04-23", "input": 5.00, "output": 30.00, "note": "Initial release" }
  ],
  "i18n": {
    "en": { "tagline": "...", "description": "..." },
    "zh": { "tagline": "...", "description": "..." }
  }
}
Data accuracy

Where the numbers come from

  • Primary source: LiteLLM's public model registry — the de facto industry standard, used by millions of LangChain and LiteLLM installations. Errors get caught and PR'd by the community within hours.
  • Secondary source: Each provider's official pricing page (links in every model's sources field).
  • Refresh cadence: Monthly (1st of every month) against both sources, with diff review before publication.
  • Disclaimer: This is informational data. For final billing accuracy, always verify against the provider's own pricing page. Spotted an error? Open a GitHub issue — corrections typically deploy within 24 hours.
What people build with this

Some ideas

Internal cost dashboards
Pipe pricing into your team's BI tool. See your AI spend against current public rates.
Slack/Discord bots
/cost gpt-5.5 → instant pricing. /compare gpt-5.5 claude-opus-4-7 → side-by-side.
Browser extensions
Inject cost estimates into provider playground / chat UI based on token count.
AI model recommendation UX
In your AI product, recommend the cheapest model meeting a capability requirement.
FinOps automation
Flag when a model's price changes (poll the API, diff against last snapshot).
AI gateway / proxy
Route requests to the cheapest available model that supports the required capability.
License

MIT

The data is free to use commercially, embed in products, redistribute. Attribution appreciated but not required. The same license applies to the source code.

Rate limits

None for normal use

Vercel CDN handles the load. Cached at edge for 24 hours, so most requests never even hit the origin. If you're planning 10K+ requests/hour, please say hi so we can size accordingly.

Built something with this?

Tell us on GitHub — we'll feature it here.

Share what you built →