I am using OpenAI Agent SDK which contains multi-agents to do some research then write the summary up. I deployed it to streamlit cloud yesterday as a web app. This morning, I found I was charged with a higher amount of API cost and I then checked API call logs which show a list of logs with input, output, model used and logs creation time. I am surprised that the logs were created at 2am, 3am, till 9am and so on when I am not actively using the app.
I wonder how I can manage the API calls in my app in a controlled ways so that it does not automatically call without my awareness or when user does not send any request. Thanks!
First, check if you didn’t had a security breach and enable 2FA.
Second, if you intend to have such firm manual controls, you can forcefully “disable” all api keys in the settings.
( Disable user-based API keys across your entire organization. You can also choose to disable them on a project-by-project basis if needed. )
1 Like
Thank you for answering my question.
Meanwhile, I noticed today that the dashboard of API usage with OpenAI platform is not set as my local time (but UTC?) - I am in the evening of May 14, but the usage shows May 15 already. So, the logs showing running at 3AM might be due to this time difference?
Yes it is UTC time, and sometimes I’ve seen a delay of up to 1 hour to reflect a recent usage in the dashboard. In the dashboards you can export a .csv file to check with more details than the ones visible in the panels, to be more sure if the usage was really yours.
1 Like