Chat pricing

Chat is priced on the number of unique users that interact with your application each month. Messages, rooms and connection time don't affect your bill.

Ably prices on monthly active users (MAUs). A user who interacts with your application counts once in a calendar month, whichever products they use, however many messages they send or receive, however many rooms they join, and however long they stay connected.

Monthly active users

An MAU is a unique clientId that is active during a calendar month. The Chat SDK runs over a Pub/Sub realtime client, and a clientId becomes active when a Chat client created from a realtime client from the device package connects to Ably. It is counted once for that month, whether it was active for a minute or every day.

Each clientId is counted once per app. The same user counts once whether they connect from one device or several, and whether they use Chat alone or Chat alongside Pub/Sub, Spaces, AI Transport, LiveObjects or LiveSync in the same app.

Identifying users

The Chat SDK requires every client to have a clientId, because messages, reactions, typing indicators and presence are attributed to it. Because an MAU is identified by their clientId, the way you assign them decides what you are billed for:

  • Assign one clientId per user, and use it on every device and in every session. A user who chats from a phone and a laptop with different clientIds counts as two MAUs.
  • Never share a clientId between users.

Anonymous users

Users who are anonymous to your application still require a clientId. Generate an identifier for each anonymous user and store it on their device, so that a returning anonymous user counts only once. If your application generates a fresh identifier on every visit, each visit counts as a new MAU.

Servers

Chat clients created from a realtime client from the server package, such as bots, moderation services and clients that send messages on behalf of your system, are not counted as MAUs, however many rooms they join or messages they send.

If you call the REST API directly rather than through an SDK, declare the caller as a server. With API key authentication, add clientType=server as a request or connection parameter. With token authentication, add the x-ably-clientType claim with the value server to the JWT you issue to the server. A request that doesn't declare itself as a server is counted as a user.

Resource-based pricing

If your account is still on resource-based pricing, Chat is charged on what you use rather than on your number of MAUs: per million messages, per million channel minutes and per million connection minutes. Each room is backed by a single channel that all of its features share, so the rooms a client is attached to count as channel minutes. How messages are counted lists which Chat operations generate messages.

To move your account to MAU pricing, follow the migration guide.

Resource efficiency

Regardless of whether you are on MAU pricing or resource-based pricing, effectively managing resources is beneficial to your application:

  • Increase the heartbeatThrottleMs room option above its 10 second default in rooms that tolerate delayed typing feedback, to reduce typing indicator events.
  • Enable server-side batching in high-throughput rooms where a slight delay is acceptable, to group messages into single deliveries that count as one message each.
  • Use occupancy instead of presence when you only need member counts, not individual identities.
  • Detach from rooms when they are no longer needed, and release rooms that are no longer in use.