Model Cost Comparison

Developers

Public, mostly keyless APIs for pricing datasets, benchmarks, and the models advisor — plus an official CLI. Start with the quickstart, then open the OpenAPI document.

Quickstart

  1. Read the agent index: /llms.txt
  2. Fetch OpenAPI: /openapi.json
  3. Call the versioned advisor:
    curl -sS -X POST https://modelcostcomparison.com/api/v1/models/advisor \
      -H 'Content-Type: application/json' \
      -d '{"message":"support chatbot 50k messages/month"}'
  4. Or install the CLI: npx modelcostcomparison advisor "…"

API keys

Documented public surfaces (datasets, OpenAPI, /api/v1/models/advisor) do not require an API key. The models advisor is rate-limited per client. The pricing-refresh cron endpoint requires Authorization: Bearer <CRON_SECRET> and is not for public clients.

Sandbox

Production hosts the public sandbox: download pricing JSON and benchmarks JSON, and POST the rate-limited advisor. No separate staging credentials are required for read-only integration tests. API index: GET /api/v1.

Versioning and deprecation

Stable REST operations use major-version URL paths beginning with /api/v1. Breaking changes ship under a new major path (/api/v2). Additive, non-breaking changes may appear on the current major without a path bump.

Deprecated operations return Deprecation: true (RFC 9745) and a Link rel="successor-version" header pointing at the replacement. When a removal date is set, responses also include Sunset (RFC 8594).

Canonical advisor path: /api/v1/models/advisor. Legacy alias /api/mcc-model-advisor remains available and returns Deprecation: true plus Link rel="successor-version".

Errors

API failures return RFC 9457 application/problem+json with stable code, detail, optional resolution, and a nested error object for older clients. Wrong methods return 405 with an Allow header — never an empty body.

Official CLI

Package: modelcostcomparison on npm (homepage https://modelcostcomparison.com).

npm i -g modelcostcomparison
modelcostcomparison --help
modelcostcomparison pricing
modelcostcomparison advisor "RAG chatbot with high cache"
modelcostcomparison openapi
# optional alias: alias mcc=modelcostcomparison

Machine-readable links

← Back to calculator