What lands in CostGraph
- Model spend per day, for each Cencori project and model.
- Optionally, spend per end user or per tenant, so you can charge model cost back to your own customers.
- Request counts and token counts, split into input, cache read, cache write, and output tokens.
- The model maker behind each call, such as Anthropic or OpenAI, and the kind of work it did, such as text generation, embeddings, or image generation.
Choose how the data reaches us
CostGraph pulls it
You supply a read-only usage export key and we call Cencori once a day. Nothing to run.
Cencori pushes it
You connect CostGraph from the Cencori console and Cencori sends us the same records.
Before you begin
- In Cencori, open Organization settings > Advanced > Usage export and create a
key. Organization owners and admins can create one. Cencori shows the key once,
so copy it before you close the dialog. It starts with
cuk_. - Copy your Cencori organization id from Organization settings > General > System identifier. CostGraph uses it as the billing account.
Let CostGraph pull
- Open Settings > Integrations and pick Cencori.
- Name the connection and pick the tenant these charges belong to.
- Paste the usage export key and the Cencori organization id.
- Optionally, choose what spend is attributed to:
projectattributes spend to each Cencori project. This is the default.end_userattributes spend to the end-user id your application sends on each request.tenantattributes spend to the tenants of your embedded agents.noneleaves the sub-account empty.
- Select Connect.
Credentials are encrypted at rest and used only to read billing data. Revoke the
key in Cencori at any time and the connection stops. Nothing else is affected.
Connect from Cencori
You can also start the connection from Cencori instead. In the Cencori console, open Settings > Integrations > CostGraph and follow the prompts. Cencori then pushes the same records to CostGraph, so you have no key to paste here. See Cencori’s CostGraph guide for the steps on their side.Run the exporter
To keep the usage export key inside your own infrastructure, run our exporter. It reads Cencori on a schedule and pushes the records for you. Run it in a container, a KubernetesCronJob, or a binary on a machine you already have.
Calls made with your own provider key
When a call runs on your own provider key, the model maker bills you for it, not Cencori. Those calls land in CostGraph at zero cost, so your Cencori spend shows only what Cencori billed. The amount the model maker charged is kept separately on the record inx_UpstreamProviderCost.
If you also connect that model maker, for example Anthropic
or OpenAI, its bill carries the real charge and
nothing is counted twice.
Cache reads
Each record carriesx_CacheReadTokens beside x_InputTokens. Comparing the two
shows how much of each prompt Cencori served from cache, which is one of the
largest levers on token spend.
A non-zero x_UnsplitRequests means Cencori could not split some requests into
input and cache tokens, so the token columns undercount for that record.