All features
04COST & TOKENS

Token cost, tracked for you

Pass token usage and Currai turns it into cost — per generation, then rolled up per trace, model, and day. Stop guessing what a feature costs and start watching it on a dashboard.

  • Input, output, and total tokens recorded on every generation.
  • Cost computed from a built-in, editable model price table.
  • Roll-ups by trace, model, user, and day out of the box.
  • Set budgets and alerts before a runaway prompt surprises you.

Track tokens & cost 💸

gen.end(
    output=completion.choices[0].message.content,
    usage={
        "input": completion.usage.prompt_tokens,
        "output": completion.usage.completion_tokens,
        "total": completion.usage.total_tokens,
        "unit": "TOKENS",
    },
)
# cost is computed for you and rolled up per trace, model, and day