[Solved] Assistants Code Intepreter API - How is session pricing defined?

Hi OpenAI team,

First off, congrats on an amazing Dev day, you guys really do deliver and it’s refreshing to get a tech event to be excited for again. Amazing work!

I’m trying to understand the pricing as it’s listed as $0.03 per session to use the code interpreter tool. My question is about how a session is defined. Is a session defined as:

a. I send a query that uses code interpreter and that is $0.03 for one code interpreter usage (i.e. code interpreter executes code = $0.03)? So if a chat had 10 code interpreter triggers, that would be $0.30?


b. I use code interpreter and the instance is “awake” and like in the ChatGPT app, a session is 15 minutes or so from the first initial call. If I call it 10 times within that 15 minute window, it’s $0.03 regardless.

Which one is a correct interpretation or am I wrong on both? If we could get some more clarity on how a session is defined, that would be awesome.

Thank you again team, appreciate the hard work as always.


EDIT: I missed this help article here where they state the following:

Code Interpreter is priced at $0.03 / session. If your assistant calls Code Interpreter simultaneously in two different threads , this would create two Code Interpreter sessions (2 * $0.03). Each session is active by default for one hour, which means that you would only pay this fee once if your user keeps giving instructions to Code Interpreter in the same thread for up to one hour.

Thank goodness! Hope this helps anyone with the confusion.

1 Like

Same question here.

0.03$ per query would be crazy!

I’m hoping I’m wrong on this but so far I believe this is actually the case unfortunately.

1 Like

Your session is a session you can run as many queries as you want until the session is destroyed so

Updated my question with the help article. Thank goodness!