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:

OperationMessages counted
Messages
Send message1 inbound message
Message delivery1 outbound message per subscriber
Update message1 inbound message
Message update delivery1 outbound message per subscriber
Delete message1 inbound message
Message deletion delivery1 outbound message per subscriber
History
History retrieval1 outbound message per retrieved message
Typing indicators
Typing keystroke1 inbound message; repeats every heartbeat interval (default 10s)
Typing keystroke delivery1 outbound message per subscriber per heartbeat
Typing stop1 inbound message
Typing stop delivery1 outbound message per subscriber
Room reactions
Room reaction1 inbound message
Room reaction delivery1 outbound message per subscriber
Message reactions
Message reaction send1 inbound message
Message reaction delete1 inbound message
Message reaction summary delivery1 outbound message per subscriber; multiple reactions may be rolled up into a single summary
Presence
Presence enter1 inbound message
Presence leave1 inbound message
Presence update1 inbound message
Presence event delivery1 outbound message per presence subscriber
Occupancy
Occupancy event1 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.