Skip to Content
Pricing

Pricing

Pricing tracks the AI costs associated with running TA training simulations. It aggregates cost data by day and model, and provides a paginated history of generation groups with token counts and dollar amounts.

Pricing dashboard showing usage costs broken down by model, simulation, and time period

What is Pricing?

Every time a TA interacts with a student persona during an office-hours simulation, Glow makes AI model calls that consume tokens and incur costs. Pricing gives administrators visibility into this spending with:

  1. Daily cost chart (POST /system/pricing) — Daily aggregations showing total_cost and run_count per model, with filter options for models and agents.
  2. Group history (POST /system/groups) — Paginated table of AI generation groups showing per-group token counts, costs, and associated models/agents.

This helps institutions monitor budget consumption, compare model costs, and forecast future spending for their TA training programs.

Quick Start

CLI

Calls below use $GLOW_INSTANCE_URL + $GLOW_TOKEN — see Authentication to export them once.

# Get daily cost chart data glow system pricing # Get pricing for a specific date range glow system pricing --body '{"start_date": "2025-01-01", "end_date": "2025-01-31"}' # Search group history (paginated) glow system groups --body '{"page": 1, "page_size": 25, "sort_order": "desc"}' # Export pricing data glow system export

API

# Get daily cost aggregations curl -X POST $GLOW_INSTANCE_URL/system/pricing \ -H "Authorization: Bearer $GLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "start_date": "2025-01-01", "end_date": "2025-01-31" }' # Search group history curl -X POST $GLOW_INSTANCE_URL/system/groups \ -H "Authorization: Bearer $GLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "page": 1, "page_size": 20, "sort_order": "desc" }'

Filtering

FilterFieldDescription
Date rangestart_date, end_dateScope costs to a time window
Date range (alias)date_from, date_toAlternative date field names
Paginationpage, page_size (search only)Control page size
Sort directionsort_order (search only)"asc" or "desc"

Understanding the Daily Cost Response

The POST /system/pricing response includes:

  • daily — Array of PricingDailyItem buckets:
    • date_key — Date bucket (e.g., "2025-01-15")
    • model_id — Which AI model was used
    • total_cost — Dollar cost for this day + model combination
    • run_count — Number of AI runs in this bucket
  • model_options — Filter dropdown options for models (value, label, count).
  • agent_options — Filter dropdown options for agents.
  • resources — Resource metadata keyed by ID:
    • agents — Agent display names
    • models — Model display names
  • total_count — Total number of matching records.
  • analytics — Filter facets for the page.

Understanding Group History

The POST /system/groups response returns paginated PricingGroupItem rows:

  • group_id — UUID of the generation group
  • session_id — Associated session
  • group_name — Display name of the group
  • first_run_at, last_run_at — Time span of the group’s runs
  • run_count — Number of AI runs
  • total_input_tokens — Input tokens consumed
  • total_output_tokens — Output tokens generated
  • total_tokens — Combined token count
  • total_cost — Dollar cost as a string
  • agent_ids, agent_names — Agents used
  • model_ids, model_names — Models used

Model Breakdown

Exporting

# Export all pricing data as a denormalized ZIP glow system export

The response includes content (base64-encoded), file_name, mime_type, and row_count.

Common Operations

TaskCLIAPI Endpoint
Daily cost chartglow system pricingPOST /system/pricing
Group historyglow system groupsPOST /system/groups
Export dataglow system exportPOST /system/export
Refresh cachesPOST /system/refresh
Last updated on