{% extends "base.html" %} {% block title %}Costs — relay dashboard{% endblock %} {% block content %}
Spending by provider
{% if by_provider %}
{% for row in by_provider %} {% endfor %}
Provider Jobs Input tokens Output tokens Total tokens Estimated cost Share
{{ row.provider }} {{ row.job_count }} {{ "{:,}".format(row.input_tokens) }} {{ "{:,}".format(row.output_tokens) }} {{ "{:,}".format(row.input_tokens + row.output_tokens) }} ${{ "%.4f"|format(row.total_usd) }} {% if grand_total > 0 %} {% set share_pct = (row.total_usd / grand_total * 100) | round(1) %}
{{ share_pct }}%
{% else %} {% endif %}
{% else %}

No cost data yet.

{% endif %} {% if by_model %}
Spending by model (top 20)
{% for row in by_model %} {% endfor %}
Model Jobs Estimated cost Share
{{ row.model }} {{ row.job_count }} ${{ "%.4f"|format(row.total_usd) }} {% if grand_total > 0 %} {% set share_pct = (row.total_usd / grand_total * 100) | round(1) %}
{{ share_pct }}%
{% else %} {% endif %}
{% endif %}
Daily spending — last 30 days
{% if daily %}
{% for day in daily %}
{{ day.date[5:] }}
{% if max_daily > 0 %} {% set bar_pct = (day.total_usd / max_daily * 100) | round(1) %} {% else %} {% set bar_pct = 0 %} {% endif %}
{% if day.total_usd > 0 %} ${{ "%.4f"|format(day.total_usd) }} {% else %} $0 {% endif %}
{% endfor %}
Based on estimated_cost_usd field. Actual billed amounts may differ.
{% else %}

No spending data in the last 30 days.

{% endif %}
{% endblock %}