Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openrouter cost tracking #176

Open
tarasglek opened this issue Jul 24, 2023 · 2 comments · May be fixed by #695
Open

openrouter cost tracking #176

tarasglek opened this issue Jul 24, 2023 · 2 comments · May be fixed by #695

Comments

@tarasglek
Copy link
Owner

openrouter has an api endpoint to see how much credit is left. this might actually be more useful than toktoken for counting costs.

/api/v1/auth/key with the token

@AnhChienVu
Copy link

Hi @tarasglek, I'm interested in your issue and I want to give it a try. However, can you help me clarify where do you want to implement this feature ?

@AnhChienVu AnhChienVu linked a pull request Oct 4, 2024 that will close this issue
@tarasglek
Copy link
Owner Author

tarasglek commented Oct 7, 2024

Oh this would be so cool. Chatcraft has a feature:
image
to track token usage.

It's shown like:
image

Would be cool to show cost instead of tokens when on OpenRouter by polling /api/v1/auth/key endpoint before and after chat completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants