promptdojo_

Write cost_per_user_month(usage) that takes a usage profile dict and returns the projected dollar cost per user per month as a float rounded to 2 decimals.

usage has four fields:

  • messages_per_day: int — how many model calls per day for this user
  • avg_input_tokens: int — average input tokens per call
  • avg_output_tokens: int — average output tokens per call
  • model: str — one of "haiku", "sonnet", "opus"

Use these 2026-real prices per million tokens (input / output):

  • haiku: $1.00 / $5.00
  • sonnet: $3.00 / $15.00
  • opus: $5.00 / $25.00

Treat one month as 30 days.

Two demo users run. Expected output:

power user (haiku):  $1.72/user/mo
pro user (sonnet):   $4.14/user/mo

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.