Closed lmello closed 1 month ago
Thanks for creating this FR, I've talked with 2-3 teams that have requested this recently. Any interest in working on this? Last I heard OpenAI has billing usage APIs but they are undocumented.
cc @kwombach12 who I believe is also interested in this!
We would love to collaborate with you on this @lmello! If you're interested, here is a blog post on how to get started.
PS: We are offering $1,000 for accepted plug-in contributions as we start to build out our library!
I am working to build an OpenAI usage dashboard in zendesk to track our usage, currently their usage api is undocumented and broken (v1/usage). I talked with the TAM assigned to us and they plan to fix it and release a working api but I didn’t got any dates yet.
The work around I did was using the export api from the usage dashboard , but those api’s only work with a session credential instead of an api key.
I don’t know if we would want to build this integration using a session credential provided this would require us to update the credential every two weeks.
The current usage api returns the usage models, metrics for the model and this can be used to calculate the cost, but it does not return the api key or user id which are essential to display usage and cost per user.
We might be able to use it to display cost and usage per model until they fix the v1/usage api.
@lmello interesting! I think it would be worth looking at the cost/usage per model until they fix that API. Is that something you'd be interested in working on with us?
@kwombach12 discussed it with @ameijer and we will have a meeting next week to start this work. I already shared some details about the api with him in slack.
@lmello That's awesome! Please let me know if I can be of any help testing, identifying scope, or providing feedback. Super excited to work with you on this!
@kwombach12 I am working on it with @ameijer .
basic implementation undergoing review here: https://github.com/opencost/opencost-plugins/pull/38
Is your feature request related to a problem? Please describe. no.
Describe the solution you'd like Integrate the openai usage data and costs with opencost.
Describe alternatives you've considered NA
Additional context