from decimal import Decimal as D # Alibaba Cloud Model Studio, Singapore, qwen3.6-plus, # <=256K input tokens per call. Rates checked 2026-12-03. INPUT_PER_MILLION = D("0.50") OUTPUT_PER_MILLION = D("3.00") MONTHLY_PRO = D("50.00") def dollars_per_task(calls, input_per_call, output_per_call): if not 0 < input_per_call <= 256_000: raise ValueError("This price tier covers at most 256K input tokens per call.") return calls * (input_per_call * INPUT_PER_MILLION + output_per_call * OUTPUT_PER_MILLION) / D(1_000_000) small = dollars_per_task(6, 6000, 1200) larger = dollars_per_task(12, 18000, 2000) assert small == D("0.0396") and larger == D("0.1800") assert small * 1262 < MONTHLY_PRO < small * 1263 assert larger * 277 < MONTHLY_PRO < larger * 278 print(f"Small: ${small:.4f}/task; larger: ${larger:.4f}/task") for tasks in (25, 100, 500, 1500): print(f"{tasks:>4} tasks: ${small*tasks:.2f} small; ${larger*tasks:.2f} larger") print("First whole-task counts above $50:", 1263, 278)