Dev.to AI 🤖 Ai 👁 0 📖 3 min read

A Tiny Cost Model for LLM + WhatsApp Automations (Bring Your Own Rates)

I'm a builder at NxFlowAI, a Mumbai AI automation agency. This post contains no vendor prices on purpose. Prices change, and I don't want you copying a number from me. You supply the rates from each provider's own pricin

I'm a builder at NxFlowAI, a Mumbai AI automation agency. This post contains no vendor prices on purpose. Prices change, and I don't want you copying a number from me. You supply the rates from each provider's own pricing page.

When people ask what AI automation costs Indian small businesses, they usually get a range. A range hides the useful part: which lines scale with volume and which don't. Here is a small script that makes those lines explicit, so you can see what happens to the monthly bill if enquiries double. For how we describe engagement types, see what AI automation costs Indian small businesses on our pricing page (it has no numbers, so this post is the arithmetic).

The idea

Split the running cost into three kinds of line:

  • Fixed per month: platform seat or plan, hosting, monitoring.
  • Per message: template messages you send on WhatsApp. Per Meta's documentation, businesses are charged per delivered template message, with rates set by template category and country, and non-template messages in an open customer service window are not charged. Read the current rules at Meta's pricing page.
  • Per AI call: input and output tokens for each model call, times your provider's rates.

The script

from dataclasses import dataclass

@dataclass
class Rates:
    # Fill these from each provider's own pricing page. None = not filled in.
    platform_monthly: float | None = None      # workflow platform plan
    hosting_monthly: float | None = None       # server, if self-hosted
    marketing_template: float | None = None    # per delivered message
    utility_template: float | None = None      # per delivered message
    service_message: float | None = None       # per message, if charged (rules change 1 Oct 2026)
    free_service_messages: int = 0             # monthly free tier, if any
    llm_in_per_1k: float | None = None         # per 1,000 input tokens
    llm_out_per_1k: float | None = None        # per 1,000 output tokens

@dataclass
class Volume:
    enquiries: int                  # inbound enquiries per month
    calls_per_enquiry: float        # model calls per enquiry (classify, draft, summarise)
    in_tokens: int                  # avg input tokens per call
    out_tokens: int                 # avg output tokens per call
    marketing_sends: int = 0        # template sends per month
    utility_sends: int = 0
    service_replies: int = 0        # replies inside the customer service window

def monthly(r: Rates, v: Volume) -> dict:
    def need(x, name):
        if x is None:
            raise ValueError(f"missing rate: {name}")
        return x
    lines = {}
    lines["platform"] = need(r.platform_monthly, "platform_monthly")
    lines["hosting"] = r.hosting_monthly or 0.0
    lines["marketing"] = v.marketing_sends * (r.marketing_template or 0.0)
    lines["utility"] = v.utility_sends * (r.utility_template or 0.0)
    billable_service = max(0, v.service_replies - r.free_service_messages)
    lines["service"] = billable_service * (r.service_message or 0.0)
    calls = v.enquiries * v.calls_per_enquiry
    lines["llm"] = calls * (
        (v.in_tokens / 1000) * (r.llm_in_per_1k or 0.0)
        + (v.out_tokens / 1000) * (r.llm_out_per_1k or 0.0)
    )
    lines["total"] = sum(lines.values())
    return lines

def double_it(r: Rates, v: Volume) -> dict:
    v2 = Volume(**{**v.__dict__,
                   "enquiries": v.enquiries * 2,
                   "marketing_sends": v.marketing_sends * 2,
                   "utility_sends": v.utility_sends * 2,
                   "service_replies": v.service_replies * 2})
    return monthly(r, v2)

How to read the output

Run monthly() and double_it() with your real rates and counts, then look at two things:

  1. Which line grew? Fixed lines don't grow when volume doubles; message and model lines do. A quote that hides these inside one monthly fee is telling you nothing about growth.
  2. Which line is missing? If your vendor's monthly fee doesn't say whether it covers Meta's charges and model usage, ask. It is a common source of surprise.

What the script cannot tell you

  • The build cost: that depends on how many systems and exceptions are involved, and a script can't price it.
  • The value side: what a recovered enquiry is worth. Do that arithmetic first; our free workflow-mapping guide is a starting point.
  • The rules side: Meta says pricing changes for some message types take effect on 1 October 2026, so re-read its page before trusting any number, including the ones you type in.

If you extend the script (retries, media messages, multiple numbers), I'd like to hear what you added.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.