Chat pricing
How Chat SDK features contribute to your message count and strategies to optimize costs.
The Chat SDK is built on top of Pub/Sub. All Chat operations generate Pub/Sub messages that follow the same counting rules.
Chat operations
The following table shows how Chat operations contribute to your message count:
| Operation | Messages counted |
|---|---|
| Messages | |
| Send message | 1 inbound message |
| Message delivery | 1 outbound message per subscriber |
| Update message | 1 inbound message |
| Message update delivery | 1 outbound message per subscriber |
| Delete message | 1 inbound message |
| Message deletion delivery | 1 outbound message per subscriber |
| History | |
| History retrieval | 1 outbound message per retrieved message |
| Typing indicators | |
| Typing keystroke | 1 inbound message; repeats every heartbeat interval (default 10s) |
| Typing keystroke delivery | 1 outbound message per subscriber per heartbeat |
| Typing stop | 1 inbound message |
| Typing stop delivery | 1 outbound message per subscriber |
| Room reactions | |
| Room reaction | 1 inbound message |
| Room reaction delivery | 1 outbound message per subscriber |
| Message reactions | |
| Message reaction send | 1 inbound message |
| Message reaction delete | 1 inbound message |
| Message reaction summary delivery | 1 outbound message per subscriber; multiple reactions may be rolled up into a single summary |
| Presence | |
| Presence enter | 1 inbound message |
| Presence leave | 1 inbound message |
| Presence update | 1 inbound message |
| Presence event delivery | 1 outbound message per presence subscriber |
| Occupancy | |
| Occupancy event | 1 outbound message per subscriber (generated on membership changes, debounced up to 15s) |
| Moderation | |
| Moderation rule invocation (before or after publish) | 1 outbound webhook event per moderated message |
Rooms and channels
Each Chat room is backed by a single Ably Pub/Sub channel. All room features, such as messages, typing, reactions, presence, and occupancy, share that one channel.
Channels contribute to your channel count. The more rooms a client is attached to, the more channels are consumed. Detach from rooms when they are no longer needed, and release rooms that are no longer in use to reduce your channel count.
Connections
Ably bills each connected client for connection minutes. A connection-minute is counted for every minute a client maintains an open connection, regardless of activity. Clients that remain connected but idle still accrue connection minutes. Close connections when the client is done to stop accruing connection minutes.
Cost optimization
Reduce typing indicator frequency
Increase the heartbeatThrottleMs room option to reduce typing indicator event frequency. The default is 10 seconds. Increase this value in rooms that tolerate delayed typing feedback.
Use server-side batching
Server-side batching groups messages into single deliveries. Use this for high-throughput rooms where slight delay is acceptable.
Use occupancy instead of presence
Use occupancy instead of presence when you only need member counts, not individual identities.