Agent Cost Compare
Self-serve API · 18 models · prices to 2026-06-19

Agent Cost Compare API

The same LLM token prices and agent cost-model engine that power this site, as a clean JSON API. Pull live-maintained list prices for 18 models across 7 providers, or POST your agent workflow and get cost-per-task, monthly spend, waste, and a cheaper-routing suggestion back.

Base URL

https://agentcostcompare.com/api/v1

Authentication

The fastest way to get a key and start sending requests is through the API marketplace listing. The API accepts an X-API-Key header (or the marketplace proxy header). During the open beta you can also call it without a key.

curl https://agentcostcompare.com/api/v1/models \
  -H "X-API-Key: YOUR_KEY"

Response shape

Success returns { data, meta }; errors return { error: { code, message } }. The meta block always carries pricesUpdated and a pricing disclaimer.

Endpoints

GET/models
Every model with input/output/cached list prices, capability tier, and context window. Filter with ?provider=anthropic or ?tier=frontier.
curl "https://agentcostcompare.com/api/v1/models?provider=anthropic"
GET/models/{id}
A single model by id, e.g. claude-opus-4-8.
GET/providers
All providers with their pricing-page URLs and caching notes.
GET/presets
Ready-made workflow scenarios (coding, support, research, rag, voice). Use a preset id as presetId in an estimate and override only what you need.
POST/estimate
Run the full agent cost model. Send a presetId as a baseline plus any overrides; add "compare": true to rank every model instead of pricing one.
curl -X POST https://agentcostcompare.com/api/v1/estimate \
  -H "Content-Type: application/json" \
  -d '{
    "presetId": "coding",
    "modelId": "claude-opus-4-8",
    "tasksPerMonth": 2000,
    "promptCaching": true
  }'
Same call as a quick GET:
curl "https://agentcostcompare.com/api/v1/estimate?presetId=coding&modelId=claude-opus-4-8&compare=true"

Machine-readable spec

Import the OpenAPI 3.0 spec into Postman, RapidAPI, or a client generator.

Limits & disclaimer

Soft rate limit of ~120 requests/min per IP on the open tier. Prices are public list prices, directional only, and change frequently — verify against each provider's pricing page before relying on them. Not affiliated with any provider.

Want a key with higher limits?

Metered plans (billing and quota handled for you) are listed on the API marketplace. Drop your marketplace listing link here once it's live.