Realtime API and session costs

Hi There OpenAI Forum,

I think it is not documented anywhere how sessions in the Realtime API are billed.

After you start a new session, does that generate any costs? Does keeping a session alive without sending text inputs or user audio chunks generate costs or are we only billed on the audio and text tokens in and out? Is there also a time-out limit for “inactive” sessions?

My use case:

I have developed a general AI Assistant that can perform various tasks for you via Google Workspace integrations and web search, news, weather, phone calling, and messaging implementations. I packaged it as a desktop app and the goal is that the user can keep the app running in the background and start a conversation with the assistant at any time using the wakework implementation. This would mean that the sessions must be able to keep alive over longer periods and not generate hidden costs if no input data is sent. Is that the case?

Thanks!
Aaron

Only speaking from my personal experience testing the Realtime API outside of Playground.

  1. Yes, you are only billed for i/o tokens, session time by itself is not a cost factor.
  2. There is a 15 minute limit to how long the session can be idle (from my understanding, it is idle for X amount of time if there were no events in the connection for X amount of time). After the timeout is reached, the websocket connection is closed.

Thanks for the reply!

Yes, I just saw that too witht the 15 minute limit in the docs (did they update that or did I miss it the first time :upside_down_face:)

That’s cool with the billing counting only for i/o tokens. That would mean we could ping the session with a keep-alive I guess.

Cheers

1 Like