Price GraphQL queries before you run them.
Point costQL at your API once.
It writes a pricing pack: one small file your app can use to price any query, instantly, with no calls to a server.
T1 and T3 are two of costQL's three depths of fidelity: you pick the one your needs justify.
Build once. Quote anywhere.
Three steps take you from a live endpoint to a pricing pack your app carries with it.
Adapt
Tell costQL where your API lives and give it a few real IDs to query with. That's a short adapter file, about 90 lines. Three finished examples ship in the repo.
The adapter guide →Build
Run costql build. It sends calibration queries to your API, times the answers, and saves everything it learned as one JSON file: the pricing pack.
Quote
Load the pack in Python or JavaScript and price queries right where your code runs, with no more calls to your API. Both languages give the exact same answer.
Quote your first pack →from costql import PricingPack
pack = PricingPack.load("tmdb_t3.json") # one static file
quote = pack.quote('{ movie(id:"27205"){ cast(limit:8){ person{ name } } } }')
quote["price"] # 50.5 the most this query should cost
quote["typical_price"] # 36.4 what it usually costs
quote["confidence"] # "high"import { PricingPack } from "costql";
const pack = await PricingPack.load("tmdb_t3.json"); // the same file
const quote = pack.quote('{ movie(id:"27205"){ cast(limit:8){ person{ name } } } }');
quote.price // 50.5 the most this query should cost
quote.typical_price // 36.4 what it usually costs
quote.confidence // "high"Three depths of fidelity. Pick by need.
Every price is in work-time (ms): how much real work a query causes on your server. The tiers are how sharply costQL can see that work, and you only go as deep as your needs justify. Not everybody needs T3: T1 or T2 is often enough.
Works with any API
Sees each field
Sees shared work
Price your first query in 60 seconds
no signup, no serverThis is the real costQL engine, loaded on this page with three ready-made packs. Build a query from the schema on the left, or type your own: the price updates as you type.