Know what each of your customers costs you
If you resell AI features, your margin depends on what each end customer uses. Customer tags put that number in the API, with no extra bookkeeping on your side.
Most companies building on Tovano sell AI features to customers of their own, often thousands of them: an ad tool, a photo service, a support product. Their AI costs are not one number. They are the sum of what each of their customers used, and the margin on each customer is different.
Without help, finding that number means logging every request, matching it with a provider invoice and adding it up per customer in a spreadsheet. With Tovano it is one extra header.
Tag every call
Send your own ID for the end customer with each request, either in the customer field of a task or in the X-Tovano-Customer header. It can be any text up to 128 characters: an account ID, a workspace slug, an order number.
curl https://api.tovano.ai/v1/tasks \
-H "Authorization: Bearer $TOVANO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "image/demo-1",
"input": { "prompt": "Studio shot of a leather wallet", "n": 4 },
"customer": "client-0482"
}'
The tag is stored on the task and on its charge. It is never shown to anyone else, and you can use a pseudonymous ID if you prefer not to send real account names.
Ask for spend per customer
curl "https://api.tovano.ai/v1/usage?group_by=customer&from=2026-11-01&to=2026-11-30" \
-H "Authorization: Bearer $TOVANO_API_KEY"
{
"object": "usage",
"group_by": "customer",
"total_micro": 51384210000,
"data": [
{ "key": "client-0482", "tasks": 1820441, "failed": 312, "charged_micro": 9120400000 },
{ "key": "client-0517", "tasks": 940112, "failed": 87, "charged_micro": 5288030000 },
{ "key": "", "tasks": 20514, "failed": 9, "charged_micro": 102600000 }
]
}
The row with an empty key collects calls sent without a tag. Failed tasks are counted so you can spot a customer whose requests keep failing, but they add nothing to charged_micro.
The same view in the dashboard
The Usage page groups spend by model, by day, by project, by API key or by customer, and exports any view as CSV. The usage tables on monthly invoices stay per model, as your accounts team expects.
What teams do with it
- Usage-based pricing for their own plans. The monthly numbers per customer feed straight into their own billing system.
- Margin checks. Comparing what a customer pays with what they cost shows which plans need a new price.
- Fair-use limits. A nightly job reads the usage per customer and warns accounts that are far above their plan.
There is a step-by-step version of this in the guide Track spend per end customer.