Skip to content

API & MCP

The same engine, as JSON

Every number on this site comes from the API below: the published catalog, stack estimates, cost curves and price history, each price with its citation. Reading needs no key.

Reference

The full reference with schemas is at /docs. The OpenAPI 3.1 document is at /v1/openapi.json.

Endpoints

Responses are JSON. Errors are {"error":{"code","message"}}.

  • GET /v1/catalog

    Every published offering with its full price model, outbound links and the day's exchange rates.

    curl https://kompair.dev/v1/catalog
  • GET /v1/offerings/{slug}

    One published offering.

    curl https://kompair.dev/v1/offerings/{slug}
  • GET /v1/offerings/{slug}/history

    Published versions of an offering, newest first, with what changed in each.

    curl https://kompair.dev/v1/offerings/{slug}/history
  • POST /v1/estimate

    Monthly cost of a stack: every offering per workload, best first, with cited line items.

    curl -X POST https://kompair.dev/v1/estimate \
      -H "Content-Type: application/json" \
      -d '{"drivers":{"mau":10000,"requests_per_user":400,"data_per_user_mb":2,"files_per_user_mb":10,"emails_per_user":4,"revenue_per_user":3,"jobs_per_user":10},"workloads":[{"kind":"postgres"}]}'
  • POST /v1/curves

    Cost of every offering from 1k to 1M monthly active users, with crossover points.

    curl -X POST https://kompair.dev/v1/curves \
      -H "Content-Type: application/json" \
      -d '{"drivers":{"mau":10000,"requests_per_user":400,"data_per_user_mb":2,"files_per_user_mb":10,"emails_per_user":4,"revenue_per_user":3,"jobs_per_user":10},"workloads":[{"kind":"postgres"}]}'
  • GET /v1/presets

    The starting stacks the homepage offers.

    curl https://kompair.dev/v1/presets
  • POST /v1/describe

    Turns a description of an app into a stack of editable drivers and workloads. It never returns a price.

    curl -X POST https://kompair.dev/v1/describe \
      -H "Content-Type: application/json" \
      -d '{"text":"Next.js SaaS with Postgres, auth and Stripe, about 20k users"}'
  • GET /v1/auth/me

    Your key's tier, rate limit and verification state.

    curl https://kompair.dev/v1/auth/me \
      -H "Authorization: Bearer $KOMPAIR_KEY"

Get a key

A key raises your rate limit and identifies your traffic. Send it as Authorization: Bearer <key>.

Rate limits

AccessRequests per minute
No key, per IP address60
Free key100
Paid key1000

Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit you get 429 with Retry-After.

The paid tier is for commercial volume. It raises the limit and licenses commercial use with attribution. Payment runs through Polar: with a verified key, request a checkout link.

curl -X POST https://kompair.dev/v1/auth/checkout \
  -H "Authorization: Bearer $KOMPAIR_KEY"

MCP

A remote MCP endpoint serves the same engine to coding agents at https://kompair.dev/mcp, with the same key.

  • estimate_stackMonthly cost of a stack, with citations.
  • compare_offeringsTwo or more offerings of one kind on the same workload.
  • get_offeringOne offering's full price model.
  • price_historyDated price changes of an offering.
  • cheapest_for_workloadThe cheapest offering that meets a workload's requirements.