# How to set max tokens for OpenAI Realtime model

**URL:** <https://community.livekit.io/t/how-to-set-max-tokens-for-openai-realtime-model/162>\
**Category:** Agents\
**Tags:** realtime, openai\
**Created:** [January 21, 2026, 1:36pm UTC](https://community.livekit.io/t/how-to-set-max-tokens-for-openai-realtime-model/162 "2026-01-21T13:36:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LiveKit-Community](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/livekit-community/32/67_2.png) [@LiveKit-Community](https://community.livekit.io/u/LiveKit-Community)\
**Post date:** [January 21, 2026, 1:36pm UTC](https://community.livekit.io/t/how-to-set-max-tokens-for-openai-realtime-model/162/1 "2026-01-21T13:36:45Z")

</div>

_This question originally came up in our Slack community and the thread has been consolidated here for long-term reference._

How do I give max tokens in the OpenAI Realtime model?

---

<div class="post-metadata">

**Author:** ![LiveKit-Community](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/livekit-community/32/67_2.png) [@LiveKit-Community](https://community.livekit.io/u/LiveKit-Community)\
**Post date:** [January 21, 2026, 1:36pm UTC](https://community.livekit.io/t/how-to-set-max-tokens-for-openai-realtime-model/162/2 "2026-01-21T13:36:48Z")

</div>

Use `update_options` on the model:

```python
llm_model = openai.realtime.RealtimeModel()
llm_model.update_options(max_response_output_tokens=500)

session = AgentSession(
    llm=llm_model,
    vad=silero.VAD.load()
)

```
