Skip to content

Cost per customer, to the cent

Every call can carry your own customer ID. Tovano records it with the task, so spend per customer comes from one API call, across image, video, audio, text and agent jobs.

Simulated run Simulated · no API call 2:33.0

Request

GET https://api.tovano.ai/v1/usage?group_by=customer&from=2026-11-01&to=2026-11-12
Authorization: Bearer $TOVANO_API_KEY

Response · GET /v1/usage, grouped by customer

{
  "group_by": "customer",
  "from": "2026-11-01",
  "to": "2026-11-12",
  "total_micro": 1899820,
  "total_tasks": 10,
  "data": [
    {
      "key": "client-0256",
      "tasks": 2,
      "failed": 0,
      "charged_micro": 1021600
    },
    {
      "key": "client-0482",
      "tasks": 3,
      "failed": 0,
      "charged_micro": 752000
    },
    {
      "key": "client-0117",
      "tasks": 3,
      "failed": 0,
      "charged_micro": 66040
    },
    {
      "key": "client-0930",
      "tasks": 2,
      "failed": 0,
      "charged_micro": 60180
    }
  ]
}

Tasks

10 tasks

  1. client-0482 · image/demo-1

    tsk_ccd773f02aed · 4 images

    Completed $0.080
  2. client-0117 · text/demo-chat-1

    tsk_c378915fdafb · 2,900 in · 380 out tokens

    Completed $0.00442
  3. client-0930 · audio/demo-tts-1

    tsk_069d680e58ff · 1,800 characters

    Completed $0.054
  4. client-0482 · video/demo-1

    tsk_ee681915ac7c · 6 seconds

    Completed $0.600
  5. client-0256 · agent/ad-kit-1

    tsk_b18c26441298 · copy + image

    Completed $0.0216
  6. client-0117 · image/demo-1

    tsk_880601e30409 · 2 images

    Completed $0.040
  7. client-0930 · text/demo-chat-1

    tsk_4b2a0f12e42e · 4,100 in · 520 out tokens

    Completed $0.00618
  8. client-0482 · audio/demo-tts-1

    tsk_31b78b9995df · 2,400 characters

    Completed $0.072
  9. client-0256 · video/demo-1

    tsk_f618cd48b1f7 · 10 seconds

    Completed $1.00
  10. client-0117 · agent/ad-kit-1

    tsk_ecb9eab74173 · copy + image

    Completed $0.02162
Reserved $0.000 Charged $1.89982

Output

client-0256 $1.0216
client-0482 $0.752
client-0117 $0.06604
client-0930 $0.06018

Events

  1. 0:00.0POST /v1/tasks · tagged calls from 4 customers
  2. 0:39.0tsk_ccd773f02aed completed · $0.080
  3. 0:42.0tsk_c378915fdafb completed · $0.00442
  4. 1:03.0tsk_069d680e58ff completed · $0.054
  5. 1:21.0tsk_880601e30409 completed · $0.040
  6. 1:33.0tsk_ee681915ac7c completed · $0.600
  7. 1:33.0tsk_b18c26441298 completed · $0.0216
  8. 1:33.0tsk_4b2a0f12e42e completed · $0.00618
  9. 1:45.0tsk_31b78b9995df completed · $0.072
  10. 2:15.0tsk_ecb9eab74173 completed · $0.02162
  11. 2:21.0tsk_f618cd48b1f7 completed · $1.00
  12. 2:27.0GET /v1/usage?group_by=customer · 4 customers
  13. 2:33.0Done · 10 tasks · $1.89982 charged

A played-back run with realistic requests, responses and charges. No API call is made and no key is used. Times are compressed.

Cost of this run

$1.89982 for 10 tasks

ModelAmount
Demo Image 1
image/demo-18 images × $0.020 / image
$0.160
Demo Chat 1
text/demo-chat-17,780 input tokens × $1.00 / 1M input tokens
$0.00778
Demo Chat 1
text/demo-chat-11,510 output tokens × $4.00 / 1M output tokens
$0.00604
Demo Voice 1
audio/demo-tts-14,200 characters × $0.030 / 1K characters
$0.126
Demo Video 1
video/demo-116 seconds × $0.100 / second
$1.60
Total$1.89982

Unit prices from the model catalogue, in US dollars, excluding tax. Agent jobs are charged per step at each step model's price.

Bill it back

Your margin, per customer

CustomerTasksYour costYou bill
client-02562$1.0216$1.32808
client-04823$0.752$0.9776
client-01173$0.06604$0.085852
client-09302$0.06018$0.078234
Total10$1.89982$2.469766

The figures come from the run above. In production, read them from /v1/usage for any date range.

How it works

Three calls you would write anyway.

  1. 1

    Tag the call

    Send X-Tovano-Customer, or the customer field, with any request. Your own ID scheme, up to you.

  2. 2

    Read spend per customer

    GET /v1/usage?group_by=customer returns tasks and spend per tag for any date range. Filter /v1/tasks by customer for the line items.

  3. 3

    Bill it back

    Apply your margin and add it to your own invoice. Failed tasks are never charged, so they never reach your customer's bill either.

The code

Copy it, add your key, run it.

The same request in curl, TypeScript and Python. The TypeScript client is tovano on npm.

# 1. Tag each call with your own customer ID
curl https://api.tovano.ai/v1/tasks \
  -H "Authorization: Bearer $TOVANO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Tovano-Customer: client-0482" \
  -d '{ "model": "image/demo-1", "input": { "prompt": "Hero banner, autumn range", "n": 4 } }'

# 2. Read spend per customer for the month
curl "https://api.tovano.ai/v1/usage?group_by=customer&from=2026-11-01&to=2026-11-30" \
  -H "Authorization: Bearer $TOVANO_API_KEY"

More examples

What else teams run at volume.

All examples

Run it on your volume, with your contract.

Committed-volume pricing, monthly invoices, higher limits and a named contact for teams that run AI in production.